Saturday, March 31, 2007

A geeks interpretation of nature scenery

Think Geek:

Camtasia and Microsoft Visual C++ .NET

Recently, I have been busy with Microsoft Visual C++ .NET. As always, learning a new development environment has its ups and downs. I was annoyed of .NET's habit of creating a default project that always included stdafx.h, mscorlib.dll, using namespace System... I usually just need a simple main method and iostream.

So I examined alternatives and found that simply creating an empty project works easiest for me. During that learning process I wondered how I should share it. Then came to my mind Camtasia that I used years ago. Briefly, it is a tool that captures whatever you do on screen and gives you a video.

Below is the video of my little .NET advanture captured via Camtasia (unfortunately, Google video quality is shitty):



I highly recommend Camtasia to anyone who prepares tutorials of some sort. It is much more effective to explain things using videos than just static text and images. You can download the fully functional 30 day trial Camtasia from their download page.

Friday, March 30, 2007

Success Factors for Software Projects

Accoring to the Standish Group survey, many software projects fail or perform miserably:


That's no news. What caught my attention was the following table:


Here, formal methodologies score pretty low on the importance scale. This scale should serve as a guidance of resource allocation in software development projects, i.e. don't waste time on trying to set up a formal quality system if the user doesn't care and your project manager sucks.

mp3:
Tesla - Love Song

Wednesday, March 28, 2007

Why to Not Not Start a Startup

Why to Not Not Start a Startup:

"If an adult says "that's a stupid idea," a kid will either crawl away with his tail between his legs, or rebel. But rebelling presumes inferiority as much as submission. The adult response to "that's a stupid idea," is simply to look the other person in the eye and say "Really? Why do you think so?"

"Each person should just do what they need to without anyone telling them... If that sounds like a recipe for chaos, think about a soccer team. Eleven people manage to work together in quite complicated ways, and yet only in occasional emergencies does anyone tell anyone else what to do. A reporter once asked David Beckham if there were any language problems at Real Madrid, since the players were from about eight different countries. He said it was never an issue, because everyone was so good they never had to talk. They all just did the right thing."

Recursion

It has been a long long time (>10 years) since I have written any recursive code. Today, for the first time in my life I was in need of a practical one.

In one of our projects we use Subversion as our source control tool (the other one is Visual Source Safe). Subversion has an annoying habit of creating hidden .svn directories in all the directories you checkout. These .svn directories contain a lot of pesky little files which take a lot of time when you try to copy or delete directories of large projects.

So, I wanted a tool that would automatically remove .svn from all the subdirectories. Since I have a few programming tricks up my sleeve, I could do it myself. Recursion was the way to go. I toyed with the idea of using Phyton, Perl and Ruby. But then I went back to our good old Matlab (yeah, lazy here) and wrote the following recursive script (update: Code re-designed and refactored):

%--- This is the main Matlab script ---
%Remove all .svn direcotries in and under current directory
clc; clear all;
global svnCount
tic
disp('Checking for .svn directories...')
svnCount = 0;
fileList = dir; %get list of files and dir's in current dir
deleteSVNDir('.',fileList) %delete .svn directories
disp(' ')
disp(['# of .svn directories removed = ',int2str(svnCount)])
disp('Finished.')
toc

%Delete all .svn directories
function f=deleteSVNDir(currentPath,fileList)
global svnCount

for i=3:length(fileList),
if fileList(i).isdir, %if it is a directory
aDir = fileList(i).name;
subPath = [currentPath,'\',aDir];
disp(subPath)
if strcmp((aDir),'.svn') %if it is .svn directory
rmdir(subPath,'s')
disp(['...deleted'])
disp(' ')
svnCount = svnCount+1;
end
%directory is not .svn and contains subdirectories
if ~strcmp((aDir),'.svn') && (containsSubDir(subPath))
newFileList = dir(subPath);
deleteSVNDir(subPath,newFileList); %recursive call
end %contains subdir
end %if dir
end %for

%checks if current path has subdirectories
function f = containsSubDir(currentPath)
result = false;
fileList = dir(currentPath);
for i=3:length(fileList)
if fileList(i).isdir, %if it is a directory
result=true;
break;
end
end
f=result;

Saturday, March 24, 2007

300

Geçen hafta 300 filmine gittik. Filmden tek beklentim vahşi savaş sahneleri eşliğinde Nine Inch Nails müziği dinlemekti. Herhangi bir tarihsel gerçekçilik beklentim yoktu, sert müzikler ve fantastik görüntüler arzu ediyordum. Bir miktar Sin City gibi yani...

Sonuç: Tiksinç. Evet biraz fantastik görüntü var, ama müzik benim beklediğimin aksine Lorena Mekkennit tarzında, gereksiz duygusal diyaloglar serpişmiş sağa sola, lüzumsuz özgürlük söylevleri almış yürümüş. Zannedersin Sparta'lılar demokrasi havarileri, biz de filme insanlık dersi almaya gitmişiz...

Filmi yerden yere vuran hoş bir yazı:

"Only amateurs like Frank Miller are dumb enough to think that being dumb, mean and inflexible like the Spartans is the route to military success."

"Contrary to what amateur fascists think, the really successful military elites encourage discussion, train mid-rank officers to react independently, and discourage yelling, steroid use and macho bullshit in general. Hell, even the Wehrmacht was filled with calm, polite and cultured men. We could use a few of them now."

MIT Artificial Intelligence Lab Story

Celebrate the Joy of Programming:

"To most people, "anarchy" means "wasteful, destructive disorder", but to an anarchist like me it means "voluntary organization as needed, with emphasis on goals, not rules, and no insistence on uniformity for uniformity's sake." Anarchism does not mean advocating a dog-eat-dog jungle. American society is already a dog-eat-dog jungle, and its rules maintain it that way. We wish to replace these rules with a concern for constructive cooperation."

Tuesday, March 20, 2007

Google Summer of Code

Google Summer of Code:

"Google Summer of Code is a program that offers student developers stipends to write code for various open source projects. Google will be working with a several open source, free software and technology-related groups to identify and fund several projects over a three month period. Historically, the program has brought together over 1,000 students with over 100 open source projects, to create hundreds of thousands of lines of code. The program, which kicked off in 2005, is now in its third year, following on from a very successful 2006."

mp3:
Nine Inch Nails - Just Like You Imagined
Doom 3 Soundtrack (Intro)

Monday, March 19, 2007

SketchUp Basics

I got my hands dirty with SketchUp that I discovered some time ago. It seems that I could make use of it while preparing 3D images for presentations, reports, educational material etc. My old way was to use Mechanical Desktop, but that is an expensive overkill (and a pain in the butt).

It is wonderful to learn something totally different once in a while.

The basic concepts and operations I needed to make myself familiar with are:

* Inference
* Drawing a line, rectangle, arc, circle
* "Follow Me"
* "Move/Copy"
* "Rotate"
* Make component
* Assign material
* Text
* Scene
* Reverse faces

I advise you to watch all the videos in Video Tutorials. Also see SketchUp Wiki and Ruby plugins that allow to add functionality like drawing helices.

Don't forget to check out the 3D Warehouse where you might find useful components and inspiration. A good idea might be to browse the user uploaded tutorials.

Below is a figure showing a typical use of SketchUp:

Wednesday, March 14, 2007

Maslow's Hierarchy of Human Needs

Maslow's Hierarchy of Human Needs:


Maslow writes the following of self-actualizing people:
  • They embrace the facts and realities of the world (including themselves) rather than denying or avoiding them.
  • They are spontaneous in their ideas and actions.
  • They are creative.
  • They are interested in solving problems; this often includes the problems of others. Solving these problems is often a key focus in their lives.
  • They feel a closeness to other people, and generally appreciate life.
  • They have a system of morality that is fully internalized and independent of external authority.
  • They have discernment and are able to view all things in an objective manner. Prejudices are absent.
  • Tuesday, March 13, 2007

    The Zen of Drinking Alone

    The Zen of Drinking Alone:

    "One of the greatest pleasures in life is a comfortable silence between friends. You know what I’m talking about: you’re having a quiet drink at a table with an old friend, and both of you feel absolutely no need to engage in idle prattle, there is a fine understanding that nothing needs to be said, you merely sit and bask in the light of each other’s company."

    "...he is you without social constraints. A slave unchained. He is you without the worry of what other people think. He is what you want to be, not what your parents, friends, lover, boss and God want you to be."

    Can a sperm donor be forced to pay child support?

    An interesting case study in law: Can a sperm donor be forced to pay child support? And the court rulings are depressing news for men:

    "Wisely or not, courts traditionally have defined parents as those who contributed the gametes that made the baby...So yes, sperm donors are sometimes liable for child support, and it doesn't look like the situation will change any time soon"

    Get hold of your sperm, people!

    Sunday, March 11, 2007

    Faraday Kafesi

    Faraday kafesi iletken bir madde ile sarmalanmış kapalı bir alandır. Böyle bir alan dış statik elektrik alanlarını bloke eder. +’dan -‘ye doğru giden bir elektrik alanımız olsun:


    Elektrik alanının içine iletken malzemeden yapılmış bir kutu koyalım:


    Kutunun duvarlarındaki elektronlar elektrik alanına uygun olarak solda toplanacak böylece kutu duvarının solu -, sağı + olacaktır. Bu durumda kutu içinde oluşacak elektrik alanı dışardaki elektrik alanının tersi olacaktır:


    İç ve dış elektrik alanları birbirini götürdüğünden kutu içindeki elektrik alanı olmayacaktır:


    Peki kutu içinde elektrik alanı yaratırsak ne olur? Mikrodalga fırınlar tam da böyle çalışmaktadır:


    Kutu duvarlarındaki elektronlar içteki elektrik alanının etkisiyle sol tarafa toplanacaklardır. Böylece kutunun solu -, sağı + olacaktır. Bu durumda kutu duvalarında kutu içindekine ters elektrik alanları oluşup birbirini yok edecektir. Böylece kutu içindeki elektrik alanı kutu dışına çıkamayacaktır.


    Ancak hepimizin bildiği gibi mikrodalga fırınların her tarafı metal değildir, içerisini görebilmemiz için camdan penceresi vardır. O zaman içerdeki elektromanyetik dalgaların camdan geçip dışarı çıkması gerekmiyor mu? Camın içerisine araları 12 cm’den küçük iletken teller yerleştirilmiştir. Mikrodalga’da kullanılan elektromanyetik dalgaların boyu 12 cm civarındadır. Camdaki kafes aralığı 12 cm’den küçük olduğundan elektromanyetik dalgalar yukarda anlatıldığına benzer şekilde camdaki iletkenlerde yok olmaktadır. Görünür ışık ise elektromanyetik dalga olmasına rağmen geçmektedir çünkü görünür ışığın dalga boyu çok küçüktür (400-700 nanometre – metrenin 0.4 milyonda biri). Böylece mikrodalganın içindeki mikrodalga dışarı sızamaz, ancak biz fırının içini görebiliriz.

    Benzer şekilde biz arabadayken arabaya yıldırım çarparsa yıldırımdaki elektrik enerjisi arabanın dış yüzeyinden geçer, içeri geçemez. Arabada pencereler olmasına rağmen yıldırımdaki elektrik enerjisinin dalga boyu pencerelerden büyük olduğundan içeri geçme olmaz. Yıldırımı görebiliriz çünkü yıldırımdaki görünür ışığın dalga boyu küçüktür.

    Cep telefonları araba içinde çeker çünkü cep telefonlarının kullandığı dalga boyları araba camlarından küçüktür. Ama cep telefonunu alüminyum folyoya sararsak folyo Faraday kafesi etkisi göstereceğinden telefon çekmez. İnanmıyorsan dene gör. Bilime hoşgeldiniz :P

    Dawkins Quotes

    Quotes from Richard Dawkins:

    "The total amount of suffering per year in the natural world is beyond all decent contemplation. During the minute that it takes me to compose this sentence, thousands of animals are being eaten alive, many others are running for their lives, whimpering with fear, others are slowly being devoured from within by rasping parasites, thousands of all kinds are dying of starvation, thirst, and disease. It must be so. If there ever is a time of plenty, this very fact will automatically lead to an increase in the population until the natural state of starvation and misery is restored. In a universe of electrons and selfish genes, blind physical forces and genetic replication, some people are going to get hurt, other people are going to get lucky, and you won't find any rhyme or reason in it, nor any justice. The universe that we observe has precisely the properties we should expect if there is, at bottom, no design, no purpose, no evil, no good, nothing but pitiless indifference."

    "People sometimes try to score debating points by saying, "Evolution is only a theory." That is correct, but it's important to understand what that means. It is also only a theory that the world goes round the Sun -- it's just a theory for which there is an immense amount of evidence. There are many scientific theories that are in doubt. Even within evolution, there is some room for controversy. But that we are cousins of apes and jackals and starfish, let's say, that is a fact in the ordinary sense of the word."

    "It is absolutely safe to say that, if you meet somebody who claims not to believe in evolution, that person is ignorant, stupid or insane (or wicked, but I'd rather not consider that)."

    "It really comes down to parsimony, economy of explanation. It is possible that your car engine is driven by psychokinetic energy, but if it looks like a petrol engine, smells like a petrol engine and performs exactly as well as a petrol engine, the sensible working hypothesis is that it is a petrol engine."

    "After sleeping through a hundred million centuries we have finally opened our eyes on a sumptuous planet, sparkling with colour, bountiful with life. Within decades we must close our eyes again. Isn't it a noble, an enlightened way of spending our brief time in the sun, to work at understanding the universe and how we have come to wake up in it? This is how I answer when I am asked -- as I am surprisingly often -- why I bother to get up in the mornings. To put it the other way round, isn't it sad to go to your grave without ever wondering why you were born? Who, with such a thought, would not spring from bed, eager to resume discovering the world and rejoicing to be a part of it?"

    Tüm bunlar bana sözlerini Aysel Gürel'in yazdığı ve Sezen Aksu'nun söylediği Ünzile şarkısını hatırlattı (ve şu an dinlemeye başladım):

    Korkar, durur, gitmez köyün en son çitine
    İnanır o sınırda Dünya'nın bittiğine.
    Ünzile insan dölü, bilinmezlere gebe
    Sırların mihnetini yükleyip de beline...
    ...
    Yağmuru kim döküyor?
    Ünzile kaç koyun ediyor?
    Dayaktan uslanalı
    Hiçbirşey sormuyor.

    Bana göre Ünzile yurdumdaki çoğu insanın düşünce dünyasını temsil ediyor, sadece kadınları değil...

    Otomobil

    Yazın otomobil almayı planlıyoruz. Otomobili özellikle şehir içi trafiğinde kullanmak için istiyoruz. Şehir içinde dur kalk çok olduğundan otomatik vites önemli konfor sağlar. Park problemleri nedeniyle boyutlarının büyük olmaması gerekir, uzun süre (>10 yıl) kullanmak üzere alacaksak mini birşey olamaz çünkü çok küçük olursa ilerde arabayı değiştirme ihtiyacımız olabilir. Şehir içi kullanım demek fazla km yapmamak demek, yani dizel değil, benzinli olmalı çünkü dizeller düşük yakıt masrafına rağmen ilk alış fiyatı pahallı ve yılda 100bin km civarında yol yapılmazsa kendilerini amorti etmiyorlar. Yazları havanın sıcak ve bunaltıcı olduğu gerçeği klimayı da olmazsa olmazlar arasına sokuyor. Bütçemiz ise sınırsız değil, 30 kaattan fazla kasmak istemiyoruz. Otomobilden anlamadığımız için ikinci eli değil, sıfır km'yi tercih ediyoruz.

    Biraz araştırıp işten anlayan, araba sahibi konu komşuya sorduktan sonra Honda Jazz (Amerika'daki adıyla Honda Fit) ön plana çıktı. Jazz'ın dış boyutları orta sınıfta olmasına rağmen içi ferahmış. Honda mevcut arabalar içinde az sorun çıkaranlar sınıfındaymış, ayrıca otomatik vitesi yaygın kullanması ile ünlüymüş. Civic de öneriliyor ama aralarındaki 10bin lira fark azımsanamaz. Öyle araba sevdalısı da olmadığımızdan hesaplı olması performanstan daha önemli oluyor.

    İnternete baktığımızda da Honda Jazz hakkında epey övgü var. Örneğin Top Gear programının araba sahipleri ile yaptığı ankette 2006'da ikinci sırada yer alan araba Honda Jazz. Yerli bir vatandaş ta kendi Jazz'ı hakkında blog yazıyor, oradan da fikir edinebiliriz.


    Kriterler:
    • Fiyat < 30bin YTL
    • Sıfır km
    • Otomatik vites
    • ABS
    • Hava yastığı
    • Klima (özellikle yazları lazım)
    • Orta boy
    • Uzun süre (>10 yıl) kullanıma uygun olmalı (yani iyi kalite olmalı, ikinci el piyasası mühim değil)
    • MP3 çalarlı müzik sistemi

    Wednesday, March 07, 2007

    Youtube'a Erişim Yasaklanmış!

    Youtube'a erişim mahkeme kararı ile engellenmiş!


    Okuma parçası: What You Can't Say

    Güncelleme: 9 Mart Cuma itibari ile youtube'a tekrar bağlanabiliyoruz.

    Kime Saygı Duyulur?

    Sıkça duyarız büyüklere saygının kalmadığını. "Saygı duyulması için sahip olunması gereken özellikler nedir" sorusunu ise pek duymayız şükür (!)

    Saygı yaşla birlikte otomatik mi gelir yoksa insan yaşı işin özü değil sadece dış görüntüsü müdür?

    Benim kimlere saygı duyduğumu düşündüğümde iki özellik öne çıkıyor:
  • Herhangi bir konuda benden fazla bilenlere, bana birşeyler öğretebilenlere (40 yıl kölesi olurum :P )
  • Kendisini geliştirmek için fanatik bir çaba içinde olanlara

    Peki neden yaşlılara saygı duyulur(du)? Eskiden bir insan ömrü içinde olaylar muazzam değişiklikler göstermez, baba nasıl yaşadıysa oğul da benzer yaşardı ve tamamlardı kısa ömrünü. Sürprizlerin seyrek, teknolojik gelişmenin ağır olduğu o zamanlarda bilgi ve tecrübe hayatta kaldığınız süre ile yakından ilgiliydi. Yaşlı insanlar çoğunlukla daha fazla şey bilir ve gençler bu bilgilerden/tecrübelerden fayda görürdü. Yaşlıların koruyucu şemsiyesi olmadan hayat çok zordu, hatta imkansızdı. Yaşlılara saygı duymak kadar normal birşey olamazdı. Ama saygının kaynağı yaş değil, bilgiydi. İnsanoğlu için şekli anlamak içeriği anlamaktan kolay olduğundan geçmiş zamanda yaşlıya otomatik olarak saygı duymak kolay ve garantili bir yöntemdi.

    Bugün de temelde saygının kaynağı bilgi. Ancak öyle enteresan bir zamanda yaşıyoruz ki 10 yıl öncesi bile yontma taş çağı gibi geliyor. Zaman adaptasyon zamanı, öğrenme zamanı... Sadece pasif bir şekilde etrafı izleyerek çok kısıtlı bilgi toplanıyor. Öyle olunca da akıl almaz bir hızla evrinen dünyayı algılamakta zorlanan yaşlılar (ve pek çok genç) başları dönmüş, çevrelerine birşey sunamaz halde, "niye bize saygı duymuyorlar" diye hayıflanıyorlar.


  • mp3:
    Dudar - Lhaperise
    Dudar - Zefauk Chihh

    Friday, March 02, 2007

    Google Earth coşmuş

    Bir müddettir Google Earth ile iştigal olmuyordum. Keratalar 4 sürümünü çıkarmışlar. Hemen yeni sürümü yükledim. İlk göze çarpan özellikler insanların yükledikleri fotoğrafları görebilmemiz. Diğeri ise coğrafi yerlerle ilgili wikipedia yazılarını da göstermesi!


    Müthiş birşeylere gebe bu Google Earth. Dünya çapında binlerce insan bir yandan foto çekiyor, bir yandan wikipedia'ya yazı yazıyor, bir yandan Google SketchUp ile binaların, köprülerin üç boyutlu modellerini yapıyor... ve bunların hepsine Google Earth'ten ulaşıyor! ...ve bunların hepsi bedava! ...ve sözcükler kifayetsiz minnettarlığımı anlatmaya.

    Linkler:
    Wikipedia yazılarının görünür kılınması
    SketchUp için zibil hazır model
    SketchUp ve Google Earth'ün birlikte kullanımı videosu

    Tangaya mühendis yaklaşımı

    Yer: Yemekhanede yemek yenmekte, havadan sudan konuşulmaktadır.
    Kişiler: Dört mühendis

    Müh1: İnternette ikinci el satan site var mı?

    Müh2: Var abi, ebay.com

    Müh1: Türkiye’de var mı?

    Müh3: gittigidiyor.com var.

    Müh4: Evet, hatta geçen oradaki açık arttırmada "Bilkentli kız tangası" diye birşey vardı, bayaa da yüksek fiyattan gidiyordu.

    Müh2&Müh3: Hadi yaa (gülüşmeler)

    Müh1: (saf bir ses tonuyla) E bari Bilkentli bayan tanga diil de erkek donu giyseymiş de onu açık arttırmaya çıkarsaymış. En azından alan eleman kullanabilirdi.

    Müh2: Abi mühendissin di mi?!

    Bu muhabbet golf oynayan mühendis fıkrasını anımsattı bana.