Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning.
Programming
5 AprBulut bilisim, sen nelere kadirsin…
5 NovTeknolojide son bir iki yilin gundem maddesi, bulut bilisim. Orjinali, herkes bilir cloud computing’dir. Isin ilginc yani yazilim yapan da bilir yapmayan da bilir. Cloud dendiginde, (bulut dediginizde o kadar havali olmuyor) guzel bir seyler canlanmis olmali ki son kullanicilarin aklinda, mesela pek cok uygulama da gitti bunu kendine isim edindi. Mac’te iCloud var yeni, OSX Lion ile geldi. Sonra Cloud diye bir uygulama daha var, dosya paylasimina yariyor. Eminim daha pek cogu vardir piyasada ki, cloud terimi tuttu.
Zaten son kullanici gormezse populer olmaz, o yuzdendir ki Steve Jobs oldukten sonra milyonlar goz yasi doktu de, Dennis Ritchie’nin ardindan taziyeler sunulmadi (Su anda Dennis Ritchie’yi Google’a yazdiysaniz tespitim dogru demektir).
Buluta geri donersek, biz de dustuk teknoloji onderlerimizin pesine ve hemen Bulut diye cevirdik ve yerlerstirdik dilimize. Bu arada kim bulut ismini hop diye araya soktu bilmiyorum, ama tebrikler, cok hizli davrandi. Pek cok kisinin dilinde simdiden, ornegin okuldaki hocalarimin cabalari bu kadar basarili sonuc vermemisti (Register yerine kutuk gibi).
Bulut kavraminin populerlesmesinin bir diger sebebi de teknoloji ile alakali sirketlerib yonetim kademelerinin de bu kelimeyi diline pelesenk etmis olmasi. Aslinda bulut kavrami cok uzun zamandir geyik noktasina gelmis olan scaling (olcekleme) olayindan bikmis olanlara ilac gibi geldi. Mesela benim eski sirketlerden birinde sunum yapilirdi, denirdi ki sunum esnasinda: Yazilimimizi olcekleyerek 1 milyar kullaniciya ayni anda hizmet verebiliyoruz. Sonra yonetimden hemen bir soru gelirdi: 1 milyar kullanici mi? Yani sinirli sayida kullaniciya hizmet veriyoruz(Hmm, sounds like a limitation to me. – true story). Simdi ise keyifle bulutun tadini cikariyorlar ve diyorlar ki nasil olsa bulutumuz var istedigim kadar kaynak eklerim. Moore yasasi sizinle olsun dostlarim, ama lutfen yazilimdaki performans sikintilarini bulutla mulutla ortebileceginizi sanmayin.
Neyse bilen bilir, Turkiye’de internetten, teknolojiden Ulastirma Bakanligi sorumludur. Ben pek anlatmadim bulut kavraminin ne oldugunu ki, sayin bakanimiz anlatsin, onun bulundugu yerde soz bana dusmez:
alt: herkes bilir kimse uygulamaz
31 Mar
Hemen her tasarimci <img> etiketindeki alt ozelliginin ne ise yaradigini bilir. Ama uygulamaya geldiginde cogunlukla ya bos birakilir ya da kopyala-yapistir tasarimcilikla tum imajlar ayni alt metniyle dolar. Bu cogunlukla promosyon maillerinde gorunuyor. Yanda bir tane ornek var, Garanti’nin gonderdigi mail gmail tarafindan bloklanmis ve normalde erisilebilirlik amacli kullanilan alt ozelligi acik bir sekilde yanlis kullanilmis.
Web genelinde internet sitelerinin erisilebilirlige onem vermedigi zaten bir gercek. Ancak bunun bir de diger boyutu var. Bu tip basit dokunuslari yapmadiginizda gorme engellilerin web sitelerini kullanma ihtimalini ortadan kaldirmis oluyorsunuz. Denemek icin tarayicinizi seceneklerden imajlari ve flash icerikleri gostermeyecek sekilde ayarlayin. Ve birkac saat interneti bu sekilde kullanmayi deneyin.
Community WIN
24 Mar
As some of you know, Jenkins was introduced after Oracle claimed the rights on the name “Hudson”. You can see the story here, from the first hand. The one interesting thing is, it is not a surprise, the new Jenkins community is growing rapidly, while Hudson is losing power.
I think it is an important thing that the opensource community may reacted so fast, since some people had “concerns” about the famous purchase. This is a clear community WIN.
Here are some observations about the community movement.
UE: Acilimi “user experience”
16 Mar
Turkiye’nin en cok ziyaret edilen haber sitelerinden birinde yeni bir reklam kampanyasi gordum. Kampanya kariyer.net’e ait. Ekran goruntusunden de anlasilacagi gibi siteye gomulu bir is arama formu koyulmus. Guzel bir fikir, cok muhtemel ilk de degil. Ama gordugum anda aklimda bir soru belirdi.
Arama yapilacak kelimeler alaninda kullanicilara yardimci olmak icin su yazilmis:
Anahtar Kelime (Örneğin java, flash, grafiker)
Aklima ilk gelen su oldu: Ornek kelimeler neden java, flash ya da grafiker? Eger ki kariyer.net’in en cok aranan kelimeleri bunlarsa anlarim, benim hatam, ozur dilerim.
Bir de diger tarafindan bakalim. Bunlar bana daha cok bu reklam formunu tasarlayan kisinin arayabilecegi seyler gibi geldi. Yani biraz “geek” isi. Soyle bir durum mu soz konusu? “Yazilimci Hasan, gel buraya, bize bir reklam formu yap bakalim.” Ben Hasan olsam, ben de bu tip kelimeler koyarim. Java’yi ornegin kesin koyarim.
UE, Turkce’de “kullanici deneyimi” (ya da en azindan oyle bir sey). “UE tasarimi” da herhangi bir urun tasarlarken kullanicilari neyin mutlu edecegini ya da ornegin reklamsa kullanicilari nasil cekecegini goz onunde bulundurarak yapilan tasarim.
Oncelikle tesekkur edelim kariyer.net’e bizim gibileri kullanici olarak sectigi ve bize ozel bir deneyim hazirladigi icin. Sonra soralim. Gercekten de bu 3 kelime mi en cok araniyor? Yoksa UE tasarimini yazilimciya birakanlardan misiniz?
Note to the non-turkish followers of the blog: Sorry to post this all in Turkish. But the whole story is based on a Turkish website, so won’t mean too much even if I translate.
Shipping code
16 Feb
We always had the discussions of when software is actually ready. Developers usually want the software should be shipped earlier than the QA wants. It is a matter of balance, but as you know it is never tested enough. You can always do more tests to say that the package is “safe”, even then the software can surprise you with an evil bug.
Facebook is one of the companies that I admire, which the rule “if you break it, fix it” applies. See this for more.
Anyway this screenshot is from the new chat and messages implementation, see the bottom images of myself appearing multiple times.
What?
Images of the user appears as contacts?!!?!
Multiple times?!?!?
So you expect an outcome of this bug, right? You cannot deliver a buggy piece of software.
No! You don’t need to take software this seriously. Ok, well, Facebook has a bug like this, nobody says their code sucks or stop using Facebook.
We JUST laugh about it.
Be cool!
As QR gets popular…
11 Feb
QR codes are square shaped barcodes that you can see in many places around the web, even when you are walking in the street. Likely any barcode, they carry encoded information. For example the barcode you see on the right side gives the url for the post. And if you take the photo of the code with a QR code scanner (lets say for your android phone) it will lead you to this post.
Generating QR codes are easy, there is a google service for that. So you don’t need to do any kind of image processing. You can construct a URL and your image is ready:
http://chart.apis.google.com/chart?cht=qr&chs=350×350&chl=test
There are many solutions for reading, parsing or processing the QR code. The one I tried was ZXing project. I checked the Java version for processing a QR code, it was pretty good, straight-forward and fault tolerant.
Here is a snippet from the code that I used:
Reader reader = new QRCodeReader();
File file = new File(“path to file goes here”);
BufferedImage myImage = ImageIO.read(file);
LuminanceSource source = new BufferedImageLuminanceSource(myImage);
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
Result result = reader.decode(bitmap);
String text = result.getText();
There are couple of recognized standarts for actions you can take with QR codes. These actions (I guess but I am not sure) are mostly recognized by the scanners from different sources, and the user can take actions based on that. One example is URLs that leads to user to a page or an email address that leads to composing email. Also there are platform specific features for android and iphone, from automatic network config to play youtube videos from QR codes.
You can see some examples here.
You can see the parameters to create custom QR codes here, just select it from the dropdown list.
Bottom-up. Is it that hard?
10 FebMost of the companies focuses on features thown to the development teams from marketing, share holders or the management. This might look true, because most of the non-developers don’t trust developers’ judgement and sees them as beasts that should be tamed and kept under control.
However, this is not entirely true. Of course, the features should mostly come from marketing department, because it is their job to observe the market and customer to decide the needs. But this doesn’t keep the company to create some space to the developers, that they can also feel part of this system.
If you are imagining a developer as a robot that will fullfill whatever requirement that you throw at him, sorry but you are truely mistaken. This will work for a while, then you will see disatisfaction and you will lose spirit. Because we also have feelings, and mostly we are the ones that care about your product even more than you.
Developers want to give their best to the product because they know that they will see the benefit of the product in the future, and there is no need to mention the satisfaction of a product that reachs millions. So create them some space and make them show their talent.
Here is a really nice video from Facebook, showing how they designed the video feature.
Give us space, give us hackathons!
Need a JS interpreter?
10 Feb
Rhino is for you!
There was something bothering me on a project I used to work. We needed to provide some text box to the user, and the user can enter some simple calculations as a preset, and we were supposed to use these instructions inside our logic to calculate some values. Sorry for not giving too much, but shortly we needed to get a string from a user with some simple logic in it. For example something like this:
monthsToAdd = 24
age = 20
newAge = age + (monthsToAdd / 12)
Back then, we didn’t have enough time to work on this, and did our stuff mostly embedded. But this was still bothering me so I ended up with the idea of using a JS interpreter and embedding it into the project.
As most of you know JS has a fairly easy syntax. In my case for example the calculations above is valid JS code. Actually, what I want is so easy that you wont even need functions at all.
So I searched the net and found this Rhino project from Mozilla.
Rhino makes it really easy to interpret JS code.
Here is the source string for JS as I defined before:
String source = “monthsToAdd = 24; age = 20; newAge = age + monthsToAdd / 12;”;
Remember, you can also use “\n” instead of semicolon, so representing this as a textarea would ease the process.
Then you need to make Rhino interpret this:
context.evaluateString(scope, source, null, 0, null);
Afterwards, you can extract the variable from the context:
Object newAge = scope.get(“newAge”, scope);
Dont forget to check if it is defined or not, to validate the script:
newAge != Scriptable.NOT_FOUND
That was really easy, wasn’t it? You can find the whole source here.
You will need the js.jar from Rhino, so download the latest from here.
