Sunday, January 25, 2009

Kitap Önerisi - Better

Better: Tıp sektöründe başarıya ve sürekli daha iyiye nasıl ulaşılabileceğine dair fikirler ve örnekler sunuyor Atul Gawande. Sanıldığının aksine çözümün ağırlıklı olarak yeni tedavi yöntemlerinin keşfi ile değil, mevcut bilgi ve deneyimin paylaşılmasında ve hastalara doğru biçimde uygulanması ile sağlanabileceğini iddia ediyor. Bu da ayrıntılara özen göstermek, istatistik tutumak ve her gün birşeyi biraz daha iyi yapmaya çalışmakla olur. Daha önce Complications kitabını okumuş ve beğenmiştim. Hepimizi eninde sonunda hayati olarak etkileyen tıbbı anlamak ve herşeyi daha iyi yapmak isteyenlere tavsiye ederim.


Saturday, January 24, 2009

Kitap Önerisi - The Best American Science Writing 2006

The Best American Science Writing 2006: 2006 yılında Amerikan gazete ve dergilerinde yayınlanmış popüler bilim makalelerinden bir seçki sunuyor. Makaleleri internette de bulmak mümkün. Kitap çok farklı konuları derlemiş. Makalelerin çoğu zaten bildiğim ya da çok ilgimi çekmeyen şeylerdi. Ancak bir iki tane nefis çalışma vardı ve onları keşfettiğim için kitabı aldığıma memnunum. Örnekler:

* Clone Your Troubles Away, David Quammen

* The Coming Death Shortage, Charles C. Mann

* Devolution, H. Allen Orr

* pdf: Mighty White of You, Jack Hitt


[p.56] The monochromatic sort of history that most of us grew up with did not allow for events like the drought that destroyed Tell Lailan. Civilizations fell, we were taught, because of wars or barbarian invasions or political unrest.

[p.174] ... many things people do nowadays are, in my opinion, perniciously stupid. Not all of them are illegal, and so, I suppose, human cloning needn't be either.

[p.175] ... when you see something that is technically sweet, you go ahead and do it and you argue about what to do about it only after you have had your technical success.

[p.186] ... marriages dissolved at about the same rate in 1860 as in 1960, except that in the nineteenth century the dissolution was more often due to death of a partner, and in the twentieth century due to divorce.

[p.187] Children will become ever briefer parentheses in long, crowded adult existences. It seems inevitable that the bond between generations will fray.

[p.199] ... there are several different ways that Darwinian evolution can build irreducibly complex systems. In one, elaborate structures may evolve for one reason and then get co-opted for some entirely different, irreducibly complex function.

[p.205] ... a good theory is one that inspires new experiments and provides unexpected insights into familiar phenomena.

[p.254] Here is Blumenbach explaining the etymology of the new word [Caucasian] he hoped to coin: "I have taken the name of this variety from Mount Caucasus, both because its neighborhood, and especially its southern slope, produces the most beautiful race of men, I mean the Georgian." ... The word itself is lovely. Say it: Caucasian. The word flows off the tongue like a stream trickling out of Eden.

[p.256] When we look at different races, according to Jablonski's theory, what we're actually seeing is not "superiority" or "good people" or "race". All that we are seeing, the only thing we are seeing when we look at skin color, is a meandering trail of of vitamin D3 adaptation rates.

Kitap Önerisi - Stumbling on Happiness

Stumbling on Happiness: Mutluluğun psikolojisini, özellikle de neden mutluluğa ulaşmanın sandığımız gibi olmadığını anlatıyor.


[p.70] If the goal of science is to make us feel awkward and ignorant in the presence of things we once understood perfectly well, then psychology has succeeded above all others.

[p.87] ...when we want to remember our experience, our brains quickly reweave the tapestry by fabricating - not by actually retrieving - the bulk of the information that we experience as a memory. This fabrication happens so quickly and effortlessly that that we have the illusion ... that the entire thing was in our head the entire time.

[p.156] ... people generally don't like to buy the most expensive item in a category, hence retailers can improve their sales by stocking a few very expensive items that no one actually buys.

[p.182] ... we derive support for our preferred conclusions by listening to the words that we put in the mouths of people who have already been preselected for their willingness to say what we want to hear.

[p.184] ... even when people do encounter facts that disconfirm their favored conclusions, they have a knack for ignoring them, forgetting them, or seeing them differently than the rest of us do.

[p.243] ... couples generally start out quite happy in their marriages and then become progressively less satisfied over the course of their lives together, getting close to their original levels of satisfaction only when their children leave home.

[p.245] We are nodes in social network that arises and falls by a logic of its own, which is why we continue to toil, continue to mate, and continue to be surprised when we do not experience all the joy we gullibly anticipated.

[p.252] ... the average person doesn't see herself as average.

En güzel insan ödülü

Bu yılki en güzel insan ödülü için kriterler:

* Akıllı ve dikkatli olacaksın
** Farkedilmeyeni ortaya çıkaracaksın
** Etrafındaki saçmalıkları görecek, kendini saçmalamaktan alıkoyacaksın
* Depresif ve bezgin olmayacaksın
** "Yapabilirim" yaklaşımı (can do attitude) içerisinde olacaksın
** Söyleyecek pozitif birşey bulamadığında susacaksın

Dikkat ederseniz kriterler arasında "iyi niyetli olacaksın" yok. İyi niyet genellikle saçmalığı gizlemek için kullanıldığından seçimimizi bulandırabilir. Güzel bir yazı için bkz: The Intentionality of Evil

Benim adayım en çok beğendiğim insanlardan biri olan Cem Yılmaz'dır. Ne pişirse yerim (!):

Tuesday, January 20, 2009

Change Diary

A diary of organizational change in a software company, by James Shore.

Week Nine, Monday:
The mantra was, "failure is not an option"... so failure was swept under the rug. Little failures, unaddressed by unaware management, cascaded into big failures that were "addressed" by blaming and bullying. This led to a vicious cycle in which fewer little failures were reported, more big projects went under, more blame and bullying, and still more people stopped reporting problems.
Week Nine, Tuesday:
...by good planning I mean something very specific: developers estimating their own tasks and business folks prioritizing those tasks.
Week Ten:
I am able to introduce new ideas when people trust me.

I no longer approach my work from the standpoint of "I'm here to Change Things." Instead, I'm interested in showing people ideas, seeing what they think, talking about alternatives, listening to experiences, etc.

I have a pretty low tolerance for bullshit and it seems that organizations always accumulate some amount of bullshit. My intolerence makes me seem unfriendly and critical, which makes it harder for people to trust me.

By "asking permission," I mean just that. I don't assume that people want me to tell them my ideas. I don't assume that they want me to show them how to do something... I'm just offering to help out.

I've seen how hard organizational change can be, and so I no longer attempt it. I just share ideas, lead by example, and have fun doing it. If things change, great! It's a much easier approach to life... and you know what? I think it's made me more effective as a consultant, and as a change agent, too.
Week Seventeen:
Q: How many psychologists does it take to change a light bulb?
A: Just one, but the light bulb has to want to change.
Week Eighteen:
People in positions of authority need to stand up and say, "We need to do this, this, and this, or we're going to fail. Trust my judgement and let me do my job, or accept my resignation."

Monday, January 19, 2009

Herkes aynı...

Ben de bu slogan bizim memlekete özgü sanıyordum:

Friday, January 16, 2009

Judicious use of getline() in C++

When reading text files in C++ I use the getline() function. There are two getline() functions. One is a method of ifstream class. The other is a standalone function. I think it is either in string.cpp or istream.cpp. I am too lazy to look it up now. When you use ifstream.getline(), you have to specify the number of characters that you want to read. You have to make sure that you choose that number such that it is not less than the character count of the longest line in the file that you are trying to read. If it is less than that and you use "while (!ifstream.eof())", you run into an infinite loop! This is a big deal if you are writing a generic file manipulation library since you cannot know the maximum number of characters in a generic file. With the standalone getline() there is no such problem. I have written two functions that implement the above getline() functions: The text file I am reading is: The output is as follows: As you see, in the second method the number of characters is not sufficient to read "hello". It interestingly reads "hell" which is the place the program goes at that point I guess(!). Once that happens, the rest of the file cannot be read. It doesn't stop either. If I hadn't put the "if (lineNumber>maxNbOfLines)" block into the second function, it would not be able to detect eof and there would be an infinite loop. I don't exactly know the reason of this behaviour. To learn that I have to study details of getline() and eof()... and right now I am too lazy for that. Lesson learnt: Use the standalone version of getline()

Thursday, January 08, 2009

Turkcell'le mücadele teknikleri

Fatura detayımı görebilmek için Turkcell'in müşteri hizmetlerini aradım (444 0532). Ancak daha önceki bir yazımda da belirttiğim gibi o merkezdeki menüleri takip ederek sonuç almam mümkün olmadı. Müşteri temsilcisine nasıl bağlanırım diye düşünürken "hattınızı değiştirip Turkcell'e geçme" seçeneğini farkettim (444 0532'den sonra sırayla 1 ve tekrar 1 tuşla). Kesin bir müşteri temsilcisi çıkar dedim, hakkaten de hemen bir temsilci çıktı!

Çıktı da sistemleri arızalıymış, ayrıntılı fatura servisine abone olamadım. Normaldir, doğru dürüst iş beklemiyordum zaten. Sonra tekrar denerim şansımı.

Sonuç: Eski müşteriler adam yerine konmuyor, sağılacak inek olarak görülüyorlar. Bu durum sadece Turkcell'e has değil. Misal TTNET de benzer şeyler yapıyor. Fimaların nasıl düşündüğünü  bilerek hareket ederseniz daha çabuk sonuç alırsınız. Siz onların ipinde değil onlar sizin ipinizde oynar.

Hatta şimdi "yetti gayrı, hattımı iptal edin" dedim, hemen beni bir becerikli elemana bağlayıp daha biraz önce halledilemeyen ayrıntılı fatura aboneliğimi yaptılar. Söylentilere göre altı ay bedava konuşma benzeri lütuflarda da bulunuyorlarmış. Denemek lazım.

Sunday, January 04, 2009

Kalp nasıl atar?

Discovery-perver çift D&Ş'nin bu geceki son konusu: Kalp nasıl çalışır, emirlerini beyinden alır mı? Beyinden alıyor olsa kalp ameliyatı sırasında durdurulan kalp basitçe elektrikle canlandırılamazdı herhalde. Saat 23:44, uykudan önce çok yerinde bir konu(!)

Cardiac Muscle:
The central nervous system does not directly create the impulses to contract the heart, but only sends signals to speed up or slow down the heart rate through the autonomic nervous system using two opposing kinds of modulation:

1. Sympathetic nervous system
2. Parasympathetic nervous system

While the majority of the heart is composed of cardiac muscle cells, specialized conducting pacemaker cells in the sinoatrial node exhibit automaticity whereby they determine the overall rate of contractions, with an average resting pulse of 72 beats per minute. However, in the absence of any nervous system or hormonal input, the conducting cells of the sinoatrial node exhibit an intrinsic firing rate of 100 beats per minute. This indicates that the parasympathetic division of the autonomic nervous system predominates at rest... the heart can still beat properly even if its connections to the central nervous system are completely severed.

Cardiac pacemaker:
Although all of the heart's cells possess the ability to generate these electrical impulses (or action potentials), a specialised portion of the heart, called the sinoatrial node, is responsible for the whole heart's beat.

Sinoatrial düğümünün nasıl olup da sinüs ritmini sağladığını anlamak için bilinmesi gerekenler: Kalp hücrelerinin kendi kendine depolarize olması, iyon kanallarından geçen potasyum iyonları, sodyum akışı... Akıl işi değil! Bir dahaki hayatımda doktor olma niyetim perçinlendi(!)

İlginç bilgiler:

* Cardiac Muscle: Cardiac muscle is adapted to be highly resistant to fatigue: it has a large number of mitochondria, enabling continuous aerobic respiration via oxidative phosphorylation

* Heart: The heart is effectively a syncytium, a meshwork of cardiac muscle cells interconnected by contiguous cytoplasmic bridges. This relates to electrical stimulation of one cell spreading to neighboring cells.

* Syncytium: In biology, a syncytium is a large cell-like structure filled with cytoplasm containing many nuclei.

Akla takılan husus: Türkiye'de nesiller boyu mitokondri tanımı "hücrenin enerji ocaklarıdır" olmuştur. Tamam akılda kalıcı bir tanım ama hacı, enerji ocağı ne yahu? Böyle birşey yok ki benzetme olarak kullanılsın!

Düşünce hatasına suçüstü

Mantık hatasına konsantre olmuşken düşünce hatalarını görmek kolaydır. Zor olan günlük hayatın içinde çabucak olup biten hataları yakalayıp tedbir alabilmektir. Güzel bir örneğini biraz önce Discovery Channel'de bir katilin ifadesini dinlerken yaşadık. Katil karısının kendisinin önünde 5 kişi ile birlikte olduğunu, kendini kaybettiğini ve hepsini öldürdüğünü söyledi.

Derya: E adam haklıymış tabi!
Şamil: Sakın adam yalan söylüyor olmasın? Katil dışındaki tanıkların hepsi ölü netekim.
Derya: (sinirli yüz ifadesi)
Şamil: Haklıymış bence de! Yalan söylemekte ne gibi bir çıkarı olabilir ki canım? Benimkisi de laf işte (!)

Kıssadan hisse: Hergün tonla saçmalığa maruz kalıyoruz. Kafanızı saçmalıkla doldurmak istemiyorsanız uyanık olmalısınız. Yoksa haberiniz olmadan etki altında kalırsınız. En kestirme yolu tabi ki medyayı (haberler, gazeteler) takip etmemektir, hataları ayıklayıp gerçeğe ulaşmak için harcanan zihni efora değmiyor.

The Campus War

The Campus War: A Sympathetic Look at the University In Agony, John R. Searle, 1971

The Search for the Sacred:
People in general, but especially young people, have a need to believe in something and to act on behalf of something that they regard as larger than themselves. They need goals that they can regard as somehow transcending their own immediate needs and desires; these goals make more tolerable the mediocrity and insignificance of their daily lives... Western democracies do not provide adequate outlets for these religious impulses... the search for the sacred is primary, and is not to be explained as a derivation from some other motive or set of motives.

Both the creation of intense feelings of community within the student movement and the pursuit of the sacred goals require an adversary. Someone must play the role of the enemy... efforts at compromise are doomed to failure simply because any compromise with the evil enemy is regarded by the militants as morally unacceptable, a sellout to the enemy.

Stage two: The creation of a rhetorical climate:
It is tempting, and I think rewarding, to compare this style of rhetoric with the McCarthyite witch-hunts of the 1950's. In both cases, there are extreme accusations against those in authority: they are out to get us (loyal Americans/ students); they are working in a conspiracy with our enemy (the Communist Party/the military-industrial complex), all their (liberal/liberal) talk is really a mask to disguise their real aims of (treason/oppression), they are really running this (government/university) not for the benefit of us, the (loyal citizens/idealistic students), but for the benefit of them (the international Communist conspiracy/the corporations and the Defense Department).

... it is in the interest of the TV news teams to conceal from the viewer (and from themselves, if possible) the extent to which the scenes are staged for the cameras. For their task is not to provide a comprehensive picture of an independently existing reality -- if they did that they would produce the most boring TV show in the world and no one would watch -- but to provide dramatic entertainment based on current events.

RADICALISM AS A RELIGIOUS MOVEMENT:
...a standard objection to the movement is that it lacks a coherent program. There is no political platform, no set of specific objectives which the revolution is supposed to achieve. What the critics here fail to note is that the style is the platform, and the means are the end. The liberation and commitment involved in being fully in the movement is a more important objective than this or that political victory. Where personal salvation is concerned, such things as electing a candidate to public office, passing a piece of legislation, or amending the Constitution, seem relatively unimportant.

The Double Standard:
The double standard -- the insistence that the administration should comply with impossible standards of rectitude while forgiving its adversaries everything short of murder and arson -- is often manifest in the recurring instances of the fallacy of misplaced concreteness.

While the administration finds that it could not describe the weather without being accused of lying, its adversaries and their apologists are able to purvey wildly inaccurate accounts of events and be readily believed.

Film Tavsiyesi

Geçen hafta AROG'a gittik, eğlenceli idi. Konu bütünlüğü ince esprilerle zengileştirilmişti. Stand-up havasında değil, film havasındaydı.

İkinci tavsiyem 1991 yapımı Delicatessen (Şarküteri) filmidir. Tuhaf, kara mizaha sahip eğlenceli bir film.

Sosyal İnternet ve Stackoverflow Yaklaşımı

İnternetin sevdiğim yanı yemek tariflerinden programcılık ipuçlarına kadar her konuda bilgi bulabilmem. Özellikle yazılım konusundaki bilgiler genellikle forumlarda bulunur. Ancak forumlarda cevaplar bazen hatalıdır, kritik bir ayrıntıyı atlamıştır, aradığını bulana kadar lüzumsuz/çöp girdileri okuman gerekebilir. İnternet'teki topluluk sayfalarının sorunları hakkında bilgi için bkz. A Group Is Its Own Worst Enemy

Benzer sıkıntıları Joel ve Jeff de yaşadığı için buna bir çare bulmaya karar verip Stackoverflow sayfasını açtılar. Bilgisayarlarla ilgili konularda (programcılık, donanım, alışkanlıklar, kültür vb.) soru sorabilir, cevap alabilirsin. Şu an baktığım sayfa What’s your favorite “programmer” cartoon?


Sayfayı benzerlerinden ayıran en önemli hususlar:

* Sorulara verilen cevaplar oylanıyor, yüksek oy alan üstte yer alıyor (Digg gibi)
* Yeterince saygınlık (reputation) puanın varsa hem soruları hem de cevapları edit edebiliyorsun. Böylece tüm yazılar zamanla daha iyi hale geliyor (Wikipedia gibi)
* Joel ve Jeff'in sunduğu Podcast'ler mevcut.

Stackoverflow sayfasındaki prensipleri her türlü bilgi paylaşım ortamında kullanmak lazım. Böylece sayfanın çöple, kavga döğüşle dolmasını engelleyebilir ve işe yararlığının sürekli artmasını sağlayabilirsin.

mp3: Frank Sinatra - That's Life

Thursday, January 01, 2009

Programming

Tools for clean code:
"If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime."

Weinberg’s Second Law:
If builders built buildings the way programmers write programs, then the first woodpecker that came along would destroy civilization.

Napoléon Bonaparte:
Never ascribe to malice, that which can be explained by incompetence.

The meaning of "It's done"

A matter of style:
Our goal is not creating code or building widgets. It's getting a product to market. "It's done" means the product is ready to go.

"It's done, well except for that last bit of optimization" is nothing more than a lie, as that last little task is probably one of a dozen last little tasks, like testing the optimization, or updating the documentation, or going through the release procedure. Yet we know our supervisors want to hear "it's done" - sometimes, when a project is running months late, it's all they dream of - so we do a bit of truth management to get them off our back, to make them happier, or to relieve some of the pressure on us.

A wise boss hearing "it's done" will question you deeply to understand the exact level of "done". A novice - or one working in the desperation of excessive hope - may believe "done" means ready to ship, and start making commitments no one will live up to.

...

Change works best when we change the way we do things. Forget the vague promises - invent a new way of accomplishing your goal. Planning on reducing your drinking? Getting regular exercise? Develop a process that insures you're meeting your goal. Log the results daily.