Tech
I’ve moved my server to Tilaa
by solomon on Jan.26, 2012, under Dear diary, Tech
I’ve been using SliceHost, a virtual private server, for a year. It was great first, cheaper and efficient. But after RackSpace bought them, the quality decreased a lot, and I guess they changed many things and it effect my product. I didn’t have time to deal with them, all I need is a server there where I pay each month and focus on my projects, not the server’s problems.
The other problem with it that it become REALLY slow. The datahouse is in US and I locate in Istanbul. And Turkey’s internet providers suck.
So I decided to go for a Europian company. In fact, my 1st consideration was an american company, Linode, who has very good critics and considerable price range. But still, after slicehost experience, I didn’t want to go for a similar company.
Then I found Tilaa who has good options for VPS. They’re Netherlands based company and their datahouse locates in there. They aren’t a big company but I guess they have good approach.
So far I don’t have serious problems with them. The 1st thing that I noticed that they billed me 12.26 euros rather than 9.95, soon after I send an email about it, I find out that they charge you from a particular day of the month to another. I subscribed on 23th of January, They’ve charged me from 23th to 25th of January and 25th jan to 25th feb, which is fine for me. I only think that their explanations in their website is lacking, if they improve it they become better.
And hopefully the website you’re seeing now is fast enough because it’s already on Tilaa.
Noob guide to marketing chart
by solomon on Mar.25, 2011, under Tech
I’m not a marketing guy, but the following cool chart will be very helpful anyone in the industry. I put it down here to remember. Yep, primitive way of bookmarking. (inner voice: i want delicious back)
Think beyond DB
by solomon on Nov.12, 2010, under php, Programming, Tech
I found a good presentation by the project lead of Zend Framework. He explains the data persistance and why good OO programming instead of refactoring is saves a lot of time.
Sroups is coming out
by solomon on Aug.27, 2010, under Programming, Tech, Work
Yeah it’s coming soon. We’re developing a social network application at OyunStudyosu where you can turn your website into a virtual world. In sroups (which is a flash application), users will step into a virtual isometric world and interact with other people who visit the website at the same time.
The idea, somehow, reminds me the matrix movie which is by far the most influenced movie for a programmer. In matrix, people log into the virtual world called matrix (not using flash application though
), and interact with other “virtual” people. Everything is software, everything is obkject in that world but the experience is real. I really wish that I have a world like that. Sroups gives us an opportunity to use the matrix (imo). But it’s a pity that we can’t bind our body to that world physically.
Well, I should mention that there are plenty of virtual worlds around, like warcraft (which is awesome), but the main difference is, sroups is like a simulation of the containig website, not a game, not a fantasy. At least it should. Of course the project is in (closed) beta now and it’s too primitive to make an analysis.
But yeah, for me, the idea is very excited.
Btw, I’ve decided to write my posts in english from now on. Will explain the reasons later.
Servlet için Test Driven Development
by solomon on Jun.06, 2010, under java, Programming, Tech
Test driven development çok önemli bir olay. Standard java projelerinde junit kullanıyorum. Ancak bir web uygulaması yazıyorsanız servlet’leri test etmek bir dert olabilir.
Daha önce bu meseleyi şu şekilde çözüyordum: model ve controller class’larım için junit testlerimi yazıyor, servletlerin logic’ini daha basit bırakıyordum. Ancak yeni işimde (Oyun stüdyosu) komplex servlet implementasyonu ile karşılaştığım için servlet testi yazmam farz oldu.
Servlet’lerdeki testing problemi şu: bir container’a (tomcat gibi) ihtiyacınız var. Lakin muhteşem kütüphane HttpUnit kendi build-in container implikasyonuyla (türkçesini bilemedim) geliyor.
Kurulum için web sitesinden kaynağı indirip, jar ve dependency kutuphaneleri classpath inize eklemelisiniz.
Neyse lafı kısa kesip örneğe geçeyim. Örnek olabilecek en basit servlet testi. Ama giriş için iyidir bence.
Test kodu aşağıdaki gibi, bu benim için çalışan konfigurasyon.
@Test
public void testServlet() throws IOException, SAXException, ServletException {
File webXml = new File("./web/WEB-INF/web.xml");
// web.xml deki servlet tanımlarından olayi cozuyor
ServletRunner sr = new ServletRunner(webXml, "/BeerV1");
// servlet asagidaki gibi register de edilebiliyor ayrıca.
// sr.registerServlet("BeerSelect", BeerSelect.class.getName());
ServletUnitClient sc = sr.newClient();
WebRequest req = new PostMethodWebRequest("http://localhost:8080/BeerV1/BeerSelect.do");
req.setParameter("color", "Light");
InvocationContext ic = sc.newInvocation(req);
BeerSelect bs = (BeerSelect) ic.getServlet();
String servletInfo = bs.getServletInfo();
assertEquals("The servlet info is wrong", servletInfo, "My super beer selector");
// evet invocation context kullandıgımız için servlet metodlarını manual olarak cagiriyoruz.
bs.doPost(ic.getRequest(), ic.getResponse());
String color = bs.getColor();
assertEquals("The color is wrong", color, "Efes Light" );
}
Bu da servlet
public class BeerSelect extends HttpServlet {
private String _color = "";
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
try{
String email = this.getServletConfig().getInitParameter("email");
request.setAttribute("email", email);
out.println("
Beer advisor
");
BeerExpert exp = new BeerExpert();
List res = exp.getBrands(request.getParameter("color"));
request.setAttribute("styles", res);
for( String s : res ){
this.setColor(this.getColor() + s);
}
RequestDispatcher dsp = request.getRequestDispatcher("result.jsp");
dsp.forward(request, response);
} finally {
out.close();
}
}
@Override
public String getServletInfo() {
return "My super beer selector";
}
public String getColor() {
return _color;
}
public void setColor(String _color) {
this._color = _color;
}
}
Bu kadar
Zend Framework’da bir Bug
by solomon on May.25, 2010, under php, Tech
Call to undefined method Zend_View_Helper_Placeholder_Container::ksort()
Bu hatayı zend framework bir şekilde veriyor. Sanıyorum bir bug’dan kaynaklanıyor bu sorun. Yeni versionlarda bu hata giderilmiş olması lazım. Lakin en kolay (geçici çözüm) ise aşağıdaki metodu Zend/View/Helper/Placeholder/Container/Abstract.php dosyasına eklemek.
Oh yeah.
/**
* Sort the array by key
*
* @return array
*/
public function ksort()
{
$items = $this->getArrayCopy();
return ksort($items);
}
Elif Melikoğlu Yeni Blog
by solomon on Feb.17, 2010, under Dear diary, Tech
Açtı kendine. Çok da şık oldu. Kıskandım valla. Terzi kendi söküğünü dikemezmiş. Ben de ne zamandır düzenleyeceğim dediğim blog’umu bir türlü düzenlemedim ve artık vazgeçtim bile diyebilirim. Ablamın blogunu yaklaşık 10 dakikada açmamız (toplamda yarım saati geçti sanırım) sebebiyle ben de gaza gelerek temamı değiştirdim. Şimdilik bu kalsın. Daha sonra yine değiştireceğim (ben bu filmi görmüştüm).
Şu anki tema tam sevdiğim gibi minimalistik ancak solda menu olmaması biraz kötü aslında. Site ziyaretçisini yönlendirmiyor. Lakin yazılara konsantre olmamızı sağlıyor. Buraya bir çözüm getireceğim işallah.
Edit: Blog adresini yazmayı unutmuşum. http://www.elifmelikoglu.com
Yapi Kredi Usability Problemleri
by solomon on Feb.11, 2010, under Tech
İnternet bankacılığında tartışmasız en rezil banka yapı kredi. Az önce annemin kredi kartı hesabına 10 TL yatırmak için işlem yapmayı denedim. Başka kredi kartına ödeme menusunden kredi kartı no’su ve ücreti yazdım. Sistem uyarı verdi: “Geçerli bir kredi kartı numarası giriniz”. Sadece rakamdan oluşan (boşluk olmayan) bir şekilde girmiştim kart numarasını.
Sonra 4 hanelik rakamlar ve 1 boşlukdan oluşan şekilde girdim (5454 5454 5454 5454). Yine kabul etmedi. “Geçersiz kredi kartı numarası”. Çıldırdım tabi. Ne yapacağımı bilemedim. Ne bir yardım, ne açıklama bölümü var. Yardımda alakasız şeyler anlatılıyor.
Sonunda 444 0 444 hattını aradım. O kadar uzun sürüyor ki müşteri temsilcisini düşürmek. 2-3 dakika sonra tekrar bir deneme daha yaptım. O anda aklıma boşluk yerine tire koymak geldi (5454-5454-5454-5454). Ve ta taa. İşlemi kabul etti. Bu şekilde yazmak gerekiyormuş. Peki içime doğmasa nasıl bunu bilebilirdim. Ben değil de bilgisayarı zor kullanan insanlar bunu nasıl yapacak.
Neyse bununla da bitmiyor. Ödeme yap butonuna tıkladım. Onay sms’i gelecek. Geldi. SMS de “xxx kullanıcısına yapacağınız 1,000.00 TL tutarındaki ödemenin şifresi xxx” yazıyor. Yine çıldırdım. Tutar kısmına 10.00 TL yazmıştım. Bunun yazılım ekibindekilerin ufak bir hatası olduğuna eminim. Ama hesabımdan 1000 lira çekmemeleri için işlemi iptal ettim. Tekrar girdim. Bu sefer 10TL yazdım. Ve işe yaradı. Ama bir daha bu bankaya girmemeye de yemin ettim
Iphone’u 3G modem olarak kullanmak
by solomon on Jan.28, 2010, under Tech
mümkündür. az önce quiknet bağlantım kesildiğinde aklıma geldi bunu denemek.
olay çok basit: menuden SETTINGS -> GENERAL -> NETWORKS altında “Internet Tethering” i Aktive ediyoruz. Sadece usb mi yoksa bluetooth ile de bağlanmak istiyor musun diye soruyor. ben usb den bağlanmayı tercih ettim ama kablosuz bağlantı için bluetooth da çok kullanışlı bence.
sıra geldi bilgisayarı ayarlamaya. ben mac kullandığım için olay inanılmaz basit oldu. iphone u taktığım anda network bağlantısı bulundu açayım mı dedi. aç dedim ve bağlandı
ayarları kontrol etmek isterseniz system preferences altından network bölümünde ayarlar mevcut.
şu an bu yazıyı iphone 3G üzerinden yazıyorum. 3G olmasaydı Edge üzerinden de bağlanabilirdim ama Edge oldukça yavaş bi bağlantı. dial up günlerine döndürüyo insanı. 3G üzerinden yaptığım ilk hız testi sonucu ise şudur:
sonuç olarak 3G modem için, iphone’unuz varsa, vodafone un falan verdiği usb modemlere ihtiyacınız yok.
Linux Başlangıç Programları
by solomon on Sep.02, 2009, under linux, Tech
Bu diyeceklerim red-hat bazlı distrolar içindir. Debian için de çok farklı değil.
Başlangıçta yani boot sonrası program mı çalıştırmak istiyorsunuz (mesela subversion deamon programı). O zaman tek yapmanız gereken “/etc/rc.d/rc.local” dosyasına gerekli satırı eklemek.
Mis gibi

