Tokens — Page 15

Türkiye'nin Yönetim Sistemi

Uzun süredir düşünüyorum. Yani ben bu kadar süredir Türkiye’de yaşıyor ama kendi ülkemi anlayamıyorsam yabancıların anlamamasına şaşırmamak gerek değil mi? İdris Küçükömer‘in yaşadığı kafa karışıklığını birkaç on sene sonra ben yaşıyorum. Sonunda çözdüm gibi ama. Aydınlanma anı TCDD’nin (şaka gibi bir kurum bu arada) web sitesini incelerken geldi. Türkiye’de bence komünizm’in en kötü şekli ile kapitalizm’in en kötü şekli uygulanıyor. Bunu bir örnekle açıklayayım. Her sene bayram/seyran/tatil zamanları otobüs firmalarına insanlar akın ediyorlar ve bilet almaya çalışıyorlar. Otobüs firmaları da biletlerinin ücretlerini yükseltiyorlar ve bir kısmını (normalden daha büyük bir kısmını) kendi tanıdıklarına ayırıp satmıyorlar. Sonuçta benim gibi birçok insan bilet bulamıyor veya bulabilenler de normal ücretten fazlasını vermek zorunda kalıyorlar (bu karaborsaya benziyor ama fark şu ki bunu seyahat firmaları yapıyor). Bu durum kapitalizmin başkenti ABD’de bile olmayacak birşey. Denetleme ve düzenleme adına hiçbir şey yok. İsteyen firma istediği gibi at koşturuyor. Bunun yanında serbest piyasa da işlemediği için, yani bu duruma dur diyecek bir seyahat firması kurmak isteyenler için şeffaf bir süreç bulunmadığı için (ne rantlar dönüyordur var ya) rekabet de olmuyor.

Bu saçma sapan kapitalizmin diğer tarafında ise devletin komik devlet demiryolları var. Web sitelerine Internet Explorer haricinde girilmiyor, saçma sapan arayüzleri kullanmak zorundasınız. Yani neden 10 sene önceki arayüz prensiplerini kullanmak zorunda kalayım ki? Pes edip sonuna kadar gittiğinizde ise örneğin Mersin gibi bir şehre direk tren bileti satın alamayacağınızı, aktarma yapacağınız Adana’nın ise 11 saat sürdüğünü görüyorsunuz. Biraz gelişmiş tüm ülkelerde tren daha hızlı bir ulaşım aracıdır ama bizde neredeyse otobüsün iki katı zamanda gidebiliyor.

Bu da komünizmin en kötü şeklini temsil ediyor. Rant, dalavere, torpil ile göreve getirilen insanlar, yeteneksiz yöneticiler ve bunu çekmek zorunda olan insanlar, yani biz.

Making Things Less Complicated

programming

In The Way I Work, Jason Fried of the 37Signals fame talks about how he works. This paragraph about complexity caught my eye:
<blockquote>
I spend another good portion of my day thinking about how to make things less complicated. In the software world, the first, second, and third versions of any product are really pretty good, because everyone can use them. Then companies start adding more and more stuff to keep their existing customers happy. But you end up dying with your customer base, because the software is too complicated for a newcomer. We keep our products simple. I’d rather have people grow out of our products, as long as more people are growing into them.
</blockquote>

Wave, App Engine vs.

teknoloji

Google App Engine büyük umutlarla çıkmasına rağmen çok fazla tutmadı. İnsanlar App Engine’deki çeşitli kısıtlamalar (örneğin günde 250 deployment, sınırlı sayıda e-posta gönderip alabilme vs.) nedeniyle ve ileride App Engine API’sinden çıkmak isterseler bu zor olacağı için (açık kaynak ama yine de kolay değil) temkinli yaklaşıyorlardı. Şimdi Google Wave büyük bir heyecan dalgası (no pun intended!) yaratınca Google App Engine’e de gün doğdu. Niye mi? Çünkü Google Wave’deki robotlar -şimdilik- sadece App Engine’de çalışabiliyor. Buna bir de App Engine’e yeni eklenen özellikleri ekleyin (örneğin 1.2.6 SDK ile gelen e-posta alabilme desteği) ve App Engine olmazsa olmazların arasına giriyor yavaş yavaş.

Öğrenmek gereken bir teknoloji daha…

App Engine’deki sürüm sistemi biraz garip. Yeni bir sürüm deploy ettiğinizde bu otomatik olarak çalışmaya başlamıyor. Versions sekmesinden yeni sürümü seçip varsayılan yapmanız gerekiyor. Bir de log tutma olayında basit bir sorun yaşadım. INFO seviyesinden loglarımı göremiyordum. Meğer logging.properties dosyasındaki seviye daha üst olan WARNING imiş. Şimdi her şey daha iyi :)

Bu arada halen birkaç tane Wave davetiyem var (Google sağolsun baya yollamış bana :)). İsteyen varsa yollayabilirim.

Republic Day

photography

It’s the 86th Anniversary of the Turkish Republic and like every year there have been many events around the country. I was lucky enough to photograph many of these events thanks to the Free Photos Group. I now present some of the shots I have taken today.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/Sun3P_if3nI/AAAAAAAABUg/JVTd-3K4Sic/s400/PA294325_2.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398117482506477170” />Flag sellers. Always colorful images.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/Sun3QIR_ukI/AAAAAAAABUo/5YZJ7WJK_C0/s400/PA294326_2.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398117484853180994” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/Sun3QtkexWI/AAAAAAAABUw/tgxlWcM36HQ/s400/PA294335_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398117494862824802” />Of course, children enjoy the most. Is this part of growing up?

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/Sun3Q7MmgQI/AAAAAAAABU4/S3JC4eczaD0/s400/PA294355_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398117498520764674” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/SuoGvO1Ak-I/AAAAAAAABXw/i_jcc4tzlv8/s400/PA294367_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398134511861011426” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/Sun3ROx1hLI/AAAAAAAABVA/5nW2p_m6R3E/s400/PA294363_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398117503777211570” />


<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/Sun6R4gzW8I/AAAAAAAABVI/SF6Q_Dt_Vs0/s400/PA294365_2.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398120813514939330” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 300px; height: 400px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/Sun6SAjiQ6I/AAAAAAAABVQ/36mOAr9m_NU/s400/PA294377_2.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398120815673885602” />I can easily say that this is the best photo of the day. I like this one a lot. It’s not perfect, the right hand must have had more space, but that’s the beauty of it in my opinion.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 300px; height: 400px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/Sun6SdHZyMI/AAAAAAAABVY/tvtIyfHQ8EA/s400/PA294378_2.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398120823340517570” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/Sun6SvGS_xI/AAAAAAAABVg/LvXjiFccmHk/s400/PA294384_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398120828167716626” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/Sun6S3zLmFI/AAAAAAAABVo/KcRzmlFE000/s400/PA294431_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398120830503458898” />Such a cute child :)

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/Sun8-SRoztI/AAAAAAAABVw/ThP0ayYKqxM/s400/PA294440_3.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398123775368154834” />Janissaries crossing ?

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/Sun8-uHKk6I/AAAAAAAABV4/w-7jILnjV3I/s400/PA294459_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398123782840423330” />Turkish Stars is one of the best flight aerobatics teams in the world. They put on a truly spectacular show.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/Sun8–tN8KI/AAAAAAAABWA/mc-p6FfISQA/s400/PA294481_2.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398123787294994594” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/Sun8-8jRMSI/AAAAAAAABWI/hkKr0A9UywA/s400/PA294508_4.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398123786716393762” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/Sun8_canypI/AAAAAAAABWQ/fDok3p0TXRM/s400/PA294549_3.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398123795270060690” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/Sun-wwEAsGI/AAAAAAAABW4/bdARncZPp0U/s400/PA294656_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398125741869150306” />Bir ters bir düz.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/Sun-wtAz58I/AAAAAAAABWw/wTmfTHWdsLg/s400/PA294614_2.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398125741050423234” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/Sun-wbP7LaI/AAAAAAAABWo/NsQYPtMxJx0/s400/PA294609_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398125736281976226” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/Sun-wNaq7pI/AAAAAAAABWg/ApjIla7djAA/s400/PA294605_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398125732568952466” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/Sun-vz38W9I/AAAAAAAABWY/dRiW6gq5PEw/s400/PA294602_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398125725712407506” />

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/SuoCLPP2aZI/AAAAAAAABXA/I6aa9xRXRS4/s400/PA294686_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398129495451789714” />“Ama uçaklar gitti”. Gözyaşların nedeni bu. / “But the planes went away”. That’s the reason for the teardrops.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/SuoCLkOwq0I/AAAAAAAABXI/EsbKqs9ivF8/s400/PA294689_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398129501084363586” />Getting a photo taken.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/SuoCL4G85tI/AAAAAAAABXQ/qWwZXofLOqc/s400/PA294704_2.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398129506420319954” />“Siz hangi gazetedensiniz?” Cimcime.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/SuoCMNoWSpI/AAAAAAAABXY/1ww7jWFksSQ/s400/PA294709_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398129512197540498” />Simit seller.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/SuoCMcNRS_I/AAAAAAAABXg/4B-xgCWFsgA/s400/PA294733_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398129516110498802” />Never seen such a long line at Anıtkabir before. We decided not to go inside.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/SuoGuybTV0I/AAAAAAAABXo/4gaYAvzcAlU/s400/PA294754_1.JPG” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5398134504236996418” />From Anıtkabir.

Sign Up Forms

programming

We value usability highly at JotForm. That is what sets us apart from other form builders out there. We strive to put as much feature as possible in a single window so that users don’t have to go through endless clicks to find stuff they need. We believe our drag and drop interface provides a central management page which directly engages with our users. At the same time, our user interface has to look simple and feel easy to use. The user interface should not look cluttered because that may put off users who feel like they are lost.

There are many other variables in the usability equation and this includes sign up pages. Sign up pages are very important because a good sign up page can increase your number of members substantially. For example, at ABtests.com there are many AB tests measuring conversion rates for different sign up pages. These reports show up to 30% increase in sign ups for easier sign up forms. It is arguably easy to understand these reports, they are not far removed from our everyday lives. Think of the last time you decided not to become a member of a web page just because you were put off by a long sign up form. I bet it was not long ago.

Designing Sign Up Forms


At JotForm we don’t present a registration page to our users before they can use our product. When someone comes to our homepage, they can start using our form builder immediately and create their forms. Many of the features we call advanced are available to use without requiring becoming a member, let alone becoming a paying one. We believe one should be able to test most if not all of the features before finding it worth their use and ultimately paying for it. In line with our thoughts on registration, we strived to build a simple sign up form.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 206px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/SugCejgGJJI/AAAAAAAABTY/IB1SVoofsjI/s400/Picture+2.png” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5397566877352731794” />

You can see a screenshot of the sign up form which will be live with the new version of JotForm to be released before the end of this year. The first thing to note is being short and concise. We only ask information that is really important from our users: username, email and password. Other information like full name, time zone, website etc. are not as important and they could be filled at a later time from account information pages. Even password confirmation box could be removed here because most of the users will type what they intend, we are penalizing say 99% of our users who type correctly by making them type their passwords again. For the other ~1% of users who type wrong, they could simply request resetting their passwords via their email address.

Going forward, we implemented a live feedback for usernames:

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 200px;” src=”http://4.bp.blogspot.com/_AZvuJ9kmERM/SugCe-EurhI/AAAAAAAABTg/HsYNQM5cA4U/s400/Picture+3.png” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5397566884485705234” />

While you are still typing your desired username, JavaScript on the background checks the server to see if the username is available. This is nice in that you can easily see which options are available to you. So you can choose that nice username you have wanted for so long.

The other improvement to note is the live feedback on other fields like email. We wouldn’t want to do a round trip to the server just to see that we have mistyped our email address, would we?

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 173px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/SugJwPsEA9I/AAAAAAAABUQ/-o3mRpYFWKM/s400/feedback1.png” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5397574877853254610” />

And of course not everything is wrong in a form. Confirming that the form is correct can give encouragement and assurance to the user.

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 192px;” src=”http://3.bp.blogspot.com/_AZvuJ9kmERM/SugJwLWIXDI/AAAAAAAABUY/odAZtFwWfpc/s400/feedback2.png” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5397574876687522866” />

This concludes looking at the design of the form. For those who are interested in the background technical stuff, I do have a few ideas that became relevant while development.
<h2>Technical Stuff</h2>
I always like going into the technical tidbits and finding gems out there, elegant solutions. For my first iteration of the form, username availability check was done for every letter typed. So if someone is typing their desired username continuously that would mean a lot of requests to the server. I changed this so that there is a counting semaphore like single variable that keeps track of how many requests are pending (note that JavaScript is single threaded). If there are more than one request pending, only the last one gets to check the server. The time interval to see if there are other keystrokes is 500 msec for the following example:


function checkKeypress(event) {
... // other stuff
newKeyPress++;
setTimeout(checkAvailibility, 500); // Wait half a sec.
}

function checkAvailibility(event) {
newKeyPress--;
if (newKeyPress != 0) {
// There's a newer event out there. Let him handle this.
return;
}
... // other stuff
}


The next improvement I made was a similar one, but regarding images. I was adding a class name to a div so that the spinning image denoting that something was being done in the background would be shown in the page. Every time I added “loading” to the class name, the browser went to the server and asked the image. Even though the browser replied with a 304- Not Changed, this was still not the right way to do it. I changed the code so that both “loading” div and “error” div etc. are on the page always, just not shown. I used the “display” property to hide and show the divs and the browser seemed much more relaxed this way. No sweat.

The final improvement was made by transferring view logic from JavaScript to CSS. I was initially changing the display property of each div individually by javascript, but that meant a lot of code. Since this is all about the view, it also doesn’t make sense to use JavaScript this way. Sure adding a class name is OK but doing inline styles was ugly. I was talking to Seyhun about this and he suggested using a bit more complex CSS rules to achieve the same effect without using a single line of JavaScript. So now I have these kinds of CSS rules:

div.error > div.errorMessage,
div.correct > div.correctMessage,
div.neutral > div.neutralMessage {
display: inline;
}

div.error > div.correctMessage,
div.error > div.neutralMessage,
div.correct > div.errorMessage,
div.correct > div.neutralMessage,
div.neutral > div.errorMessage,
div.neutral > div.correctMessage {
display: none;
}

It is making the CSS file more bloated but more concise JavaScript is the way to go. It is now easily understandable, maintainable and much more efficient.

<h2>Further Reading</h2>
[1] Smashing Magazine has a two post series on web forms and sign up forms in general: First post and the second one.

[2] Examining how other big websites do their forms is a good way to learn. Yahoo, Google, StackOverflow and Twitter are good options. I especially like twitter, they have subtle differences that make a huge difference. Take their Capthca for example:

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 142px;” src=”http://2.bp.blogspot.com/_AZvuJ9kmERM/SugGoTkOxkI/AAAAAAAABUA/nWbIYLDzcHE/s400/twitter2.png” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5397571442920310338” />

It is a simple reCaptcha implementation, right? Not quite, see what happens if you have an error in your form when you submit and your form is shown to you again:

<img style=”display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 85px;” src=”http://1.bp.blogspot.com/_AZvuJ9kmERM/SugGoepN1QI/AAAAAAAABT4/xcGqbbcBy_Y/s400/twitter1.png” border=”0” alt=”“id=”BLOGGER_PHOTO_ID_5397571445894010114” />

Yep, if you have typed the captcha right the first time you won’t need to type it again if you have forgotten something else on the form. Nice isn’t it?