Tokens — Page 13

Why is Programming Hard?

books


Deutsch: One of the things that I've been thinking about off and on over the last five-plus years is, "Why is programming so hard?"

[...] the world of basically all programming languages that we have is so different in such deep ways from the physical world that our senses and our brains and our society have coevolved to deal with, that it is loony to expect people to do well with it. There has to be something a little wrong with you for you to be a really good programmer. Maybe "wrong with you" is a little too strong, but the qualities that make somebody a well-functioning human being and the qualities that make somebody a real good programmer - they overlap but they don't overlap a whole heck of a lot.


From Coders at Work, Reflections on the Craft of Programming by Peter Seibel.

Başarılı Olmanın Laneti?

Haskell‘in yaratıcılarından Simon Peyton Jones şu aralar okuduğum Coders at Work kitabında “başarıdan mümkün olduğunca sakının” diyor. Bunu programlama dilleri ve özellikle de Haskell için söylüyor ama sanırım başka yazılımlar (ve teknolojiler?) için genellemek çok da yanlış olmaz. İlk bakışta çok anlamsız gelen bir cümle bu, çünkü zaten bunca emeğin amacı popüler olmak, bir sürü insana faydalı olmak ve böylece “başarılı olmak” değil midir?

Simon Peyton Jones bundan sonra nedenlerinden bahsediyor. Yazılımınız popüler olmaya başlayınca insanlar onu daha önce düşünmediğiniz şekillerde kullanmaya başlıyorlar, daha iyi alternatifleri olsa bile. Birçok programcı için popülerlik seçimlerinde yeterli bir sebep. Durum böyle olunca, mimarinize uygun olmasa bile yeni kullanıcılarınızı tatmin edebilmek için yeni özellikler ekliyorsunuz. Ve bu durum neredeyse her zaman kötü birşey. Unix felsefesinin merkezinde “sadece bir işi yapın ama iyi yapın” mantığının olmasının nedeni de bu. Karmaşıklığınız artınca Hoare’nin kuralına da uygun olarak “basitçe görülüyor ki hiç hata yok” durumundan “hiç basit hata yok” durumuna geçiş yapıyorsunuz. Ve kullanıcılara “hayır” demenin zorluğu da işinizi kolaylaştırmıyor doğrusu.

Popüler olmanın diğer bir dezavantajı ise esnekliğinizi götürmesi. Yeni kararlar alırken insanların yazılımınızı nasıl kullandığını da düşünmek zorundasınız. Doğru görünmeyen bir bölümünü değiştirmek artık başlangıçtaki gibi kolay değil. Artık kullanıcılarınız her API değişikliğinde size şikayet edeceklerdir. Var olan yazılımlarının çalışmaya devam etmesi için size yalvaracaklardır. Eğer karmaşıklık yanlış yola sapmak için çok tehlikeli bir tuzaksa, evrimleşememek de bir diğeridir. Bunun nedeni değişimin teknolojinin kalbinde olmasıdır. Eğer değişemezseniz, veya rakibinizden daha hızlı değilseniz o zaman hayatta kalmanız zorlaşır. Eğer gerekli değişiklikleri yapamazsanız birileri sizin yerinize geçecektir.

Sanırım “başarıdan mümkün olduğunca sakının” cümlesinden anladıklarım bunlar. En azından bu fikirlerin önemli bir yer tuttuğuna inanıyorum. Bunların nasıl uygulanacağı ise başka bir şey. Ve bunu öğrenmeye ben de devam ediyorum.

The Curse of Success?

rants

Simon Peyton Jones of Haskell fame says “avoid success at all costs.” He is talking about programming languages and Haskell in particular but I think he would have no problems extending it to other software (and technologies?) in general. At first this seems ridiculous, isn’t all the motivation behind all the work is about becoming popular and being useful to a lot of people and hence becoming “successful”?

He goes on to give his reasons. When you become popular people start using your product in ways you have never anticipated, even when there are better alternatives. For many users being popular is enough to choose a product. You will inevitably start adding features that do not really fit into the grand architecture, in order to satisfy your new users. If you begin to spread your software base and features in many different levels your software becomes much more complex, and this is almost always something bad. Why is “do one thing and do it well” at the center of Unix philosophy? As per Hoare’s principle, you will stop being obviously bug free and become having no obvious bugs. And it doesn’t help that it is not easy to resist new feature requests.

The other disadvantage of becoming popular is the inflexibility it brings. You will have to consider how people are using your software while making decisions. It’s not as easy as in the beginning to change some part of the software that just doesn’t look right. You’ll have legacy users who will complain every time you change your API. They will tell you “please don’t break my code.” If complexity is one of the most dangerous ways to turn to a wrong path, then not being able to evolve is another one. It’s because evolution and change is at the heart of technology. You cannot survive unless you change, and unless you change faster than your competitors. If you cannot make the necessary changes then someone else will come and grab your food.

I think these are more or less what is conveyed by “avoiding success at all costs”. I certainly think these two sides are at the center of discussion. How to implement these decisions are frankly beyond me, I’m also trying to grasp it as best as I can.

Programming

books


Seibel: Do you still program a lot?

Peyton Jones: Oh yes. I write some code every day. It's not actually every day, but that's my mantra. I think there's this horrible danger that people who are any good at anything get promoted or become more important until they don't get to do the thing they're any good at anymore.


From Coders at Work, Reflections on the Craft of Programming by Peter Seibel.

Spheres

photography

Some magnetic spheres my colleague bought and has been playing for some time now :) I just wanted to test my new 50mm prime lens.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/Sz42C4UBPYI/AAAAAAAABaE/S5Vbu-43Z60/s320/PB094839_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5421830424504647042” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/Sz42BwqChdI/AAAAAAAABZk/qeff_WMRoKo/s320/PB094817_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5421830405269652946” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/Sz42Cg0dJaI/AAAAAAAABZ8/BILGah-9DFo/s320/PB094835_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5421830418198242722” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/Sz42CIeEVpI/AAAAAAAABZs/k4dN_Vi4UAE/s320/PB094821_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5421830411661891218” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/Sz42Cje-45I/AAAAAAAABZ0/RpQpG-paWUc/s320/PB094825_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5421830418913485714” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/Sz42wfYLieI/AAAAAAAABaU/XDaos1itfrY/s320/PB094858_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5421831208085195234” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/Sz42vzAWwUI/AAAAAAAABaM/9WiFdzG8m7M/s320/PB094847_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5421831196174106946” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/Sz43q1qmzvI/AAAAAAAABac/nIEvT6qs_YI/s320/PB094814_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5421832210500472562” />