Just finished Call of Duty: Modern Warfare 2

January 16, 2010 erdincyilmazel Leave a comment

I think this is amongst the best FPS games ever. The first game of the series was also very nice. The story really gets you into the game. The only thing I can think of as a negative is that the single player campaign mode is a bit short. (Maybe I felt that way because of the excitement). Looking forward for a third game of the franchise.

Categories: Games Tags: ,

Working on tinymashup.com

I’ve always enjoyed building domain specific languages. The most advanced language that I’ve developed so far comes handy when I need to extract some information from any web page or document. I call this system “Content Retrieval Engine”. You can execute CRE scripts in a single thread to open web pages, extract some information from them and use the retrieved information as an input to another document.

Here is an example to get the search result urls of a query that is made on google:

url = "http://www.google.co.uk/search?hl=en&q=${1}&btnG=Search&meta=&aq=1";
query = "erdinc yilmazel";

echo "opening " + url(query.urlEncode());

open url(query.urlEncode()) as input;
read input {
   locate "<h2 class=hd>Search Results</h2>";
   do {
      locate "<li class=g>";
      locate "<h3 ";
      locate "<a href=\"";
      capture as link until "\"";
      echo link;
      links += link;
   } until "</ol> </div> <!--z-->";
}

The script above prints every url that is gathered to the output and also collects them in a list named as links (Actually an ArrayList in Java). At the time of writing executing the script gives the following output:

opening http://www.google.co.uk/search?hl=en&amp;q=erdinc+yilmazel&amp;btnG=Search&amp;meta=&amp;aq=1

http://tr.linkedin.com/in/erdincyilmazel

http://www.facebook.com/erdincyilmazel

http://blog.erdincyilmazel.com/2010/01/05/open-sourcing-some-projects/

http://developer.amazonwebservices.com/connect/message.jspa?messageID=147347

http://markmail.org/message/x6irtpux7euhnptj

http://www.vclcomponents.com/PHP/Development_Tools/Libraries_and_Classes/MyObjects-info.html

http://www.aboutus.org/erdinc.yilmazel.com

http://groups.google.com/group/javawug/browse_thread/thread/6e0a171748a8b735

http://vaadin.com/forum/-/message_boards/message/89339

http://www.myobjects.org/

The thing about “Content Retrieval Engine” is that it doesn’t have to read all the document and get it into memory to do data extraction. It does everything in a single pass while reading from the input stream. This allows it to run very fast and very memory efficient. You can extract information from huge documents that are several gigabytes.

So what is tinymashup.com? I am planning it to be a hosted service to run CRE scripts. You can write your scripts, run them against any web page and get the output in any format you like such as XML, JSON, plain text etc. You will be able to write scripts and share them with others. I am also planning on licensing the technology to people who need it. (I can also open source it too, haven’t decided yet :) )

Categories: Projects Tags: ,

Open sourcing some projects

January 5, 2010 erdincyilmazel 1 comment

I recently started two new open source projects on googlecode.com. One of them is JdbcHelper which helped me a lot in working on the last project that I was developing. JdbcHelper is a very small library for performing common JDBC tasks. It is similar to Spring Framewors Jdbc Template module, but does not depend on any external library, so it may be your library of choice if you want a lightweight solution.

The other project, which is currently in active development is the Cambridge Template Engine. It is a template framework for Java which I’ve been dreaming about for more than a year. I started working on Cambridge in mid 2008. To be honest, I wasn’t able to devote enough time for it to make it a usable product for a long time. A few months ago, while struggling with JSP, I decided to get back on it and I’ve been working hard for a stable version. One of my colleagues working on istanbul.net already started using Cambridge in a project which will soon become online.

What makes Cambridge different from other template engines like Freemarker or Velocity? Well, first of all Cambridge was designed to generate especially HTML or other markup documents like XML. Cambridge knows the tag structure of your template documents even if they are not well formed. This allows you, as a developer, to use the scope of html tags that is already in the document instead of wrapping your html with external code or tags.

For instance, if you want a portion of html to be viewed based on a condition you would write something like this in JSP

<s:if test="conditionMet">
<div id="someDiv">
<strong>Some content</strong>
</div>
</s:if>

or

<%
if(conditionMet) {%>
<div id="someDiv">
<strong>Some content</strong>
</div>
<% } %>

It would also look like the one above if you were using PHP too. On the other hand, Cambridge knows where the div element starts and ends. So the same code in cambridge is written as this:

<div a:if="conditionMet" id="someDiv">
<strong>Some content</strong>
</div>

The code above is a simple html document which can be viewed in any browser or html authoring tool without a problem. Unless absolutely necessary, Cambridge does not introduce any new tags to the template file. You only need to add extra attributes to your tags to associate some behaviours.

I am currently trying to improve the documentation for Cambridge and I need feedback for both of the libraries. Please report any bugs, feature requests or comments on the project pages.

EXT GWT

Birkac gundur bos vakitlerimde EXT GWT projesine bakiyorum. EXT JS isimli bir javascript framework’unun sagladigi component’leri GWT widget’lari olarak kullanabilmenizi sagliyor. Gercekten hem gorsel hem fonksiyonel anlamda cok basarili buldum. Yalniz ticari urun gelistiriyorsaniz o zaman ticari lisansi almaniz gerekiyor. Open source lisansi olarak yalnizca GPL destekledigi icin ucret odemezseniz, yaptiginiz yazilimin kaynagini yine paylasmaniz gerekiyor.

Categories: Uncategorized

Glassfish + Eclipselink + Maven + DbUnit:

November 22, 2008 erdincyilmazel Leave a comment

Glassfish V3 Prelude sürümünün yayınlanması ile birlikte bu uygulama sunucusunun içerisinde default persistence provider olarak gelen Eclipselink‘i inceleyeyim dedim. Glassfish V3 her ne kadar tam anlamıyla JEE 5 certified bir uygulama sunucusu olmasa da genel anlamda benim ihtiyaç duyacağım her şeyi sunuyor. Web container, ejb container, transaction desteği… Bunların yanında update center’dan JRuby, Grails vb. pek çok desteği de ekstra olarak çekip kurabiliyorsunuz.

Neyse, fazla lafı dağıtmadan eclipselink’e döneyim. Bildiğiniz gibi Oracle persistence provider’ı olan toplink ürününün bir nevi light versionu olan toplink-essentials‘ı open source camiasına hediye etmişti. Glassfish’in bundan önceki sürümlerinde de (V1 ve V2) toplink-essentials kullanılıyordu. Ancak geçen sene içinde Oracle toplink ürününün tamamına ait kaynak kodunu Eclipse Foundation’a bağışladı ve Eclipselink ortaya çıktı. 2008 Mart ayında ise Sun Microsystems, Eclipse ve Oracle ortak bir girişimle Eclipselink’in JPA 2.0 referans implementasyonu olmasına karar verdiler. Şu anda 1.0.2 stable sürümü olan Eclipselink Glassfish V3 ile birlikte bizlere sunuluyor.

Tabi uygulama sunucusu olarak Glassfish V3 tercih edildiğinde geliştirme ve test aşamalarında da yine aynı ortamı sağlamak amacıyla Eclipselink kullanmak zorundasınız. Başka bir JPA provider kullanabilirsiniz elbette ama hem eclipselink’in kendine has özelliklerini kullanmak, hem de uygulama sunucusu üzerinde çalıştırdığınızda sürprizlerle karşılaşmamak için unit testlerinizi de yine aynı persistence provider ile çalıştırmak isteyeceksinzdir.

Bunun için aslında güzel bir tutorial yazmak isterdim ama benden önce çok güzel şekilde yazmışlar. Sade ve işe yarar küçük bir örnek olan bu tutorial’da maven ile eclipselink kullanarak mysql ya da derby database’i üzerinde DbUnit ile nasıl unit testler çalıştırabileceğinizi anlatıyor. (Amma cümle oldu!!! içinde binbir tane buzzword var!!) Tutorial’ı yazan arkadaş örnek kodları da favori ide’m olan intellij projesi olarak da koymuş daha bir güzel olmuş :)

Eclipselink’in kendine has JPA’dan ayrı bir takım eklentileri ve iyi olduğu söylenen cache mekanizması var. (Henüz derinlemesine incelemedim.) Bu kendine has özellikleri Eclipselink JPA Extensions adı verilen bir api ile sunuyor. Bu api içerisinde standard JPA annotation’larına ek olarak kullanabileceğiniz ekstra annotationlar var.

Son olarak glassfish’in de Eclipselink kullanımı ile ilgili kendi dökümantasyonu olduğunu söyleyeyim. Glassfish V3 Prelude her ne kadar Prelude adı insanı yanıltsa da production ready ve Sun tarafından ticari olarak desteklenen bir ürün ve iyi şekilde dökümante edilmiş. Yalnızca eksiği bir V3′e ait planlanan tüm özelliklerin implement edilmemiş olması. Örneğin clustering yok.

Categories: Uncategorized

Intellij 8 Python plugin’i early access olarak yayınlandı

November 20, 2008 erdincyilmazel Leave a comment

Plugin şuanda plugin manager’dan download edilebiliyor. Henuz alpha sürümü olduğunu belirtmek lazım, lakin şuanda henüz çok sorunlu. Tabi alıştığımız intellij ortamında python kodu editlemek şimdiden keyifli ancak doğru şekilde import edilmiş öğeleri unresolved olarak göstermesi autocompletion’ın doğru çalışmamasına ve gereksiz warninglere yol açıyor. Bu problemin standard python modülleri ve sizin kendi projenizdeki modülleriniz için geçerli olmadığını belirtmem lazım. Problem bilgisayarınıza yüklediğiniz django gibi MySQLdb gibi diğer modüllere erişmek istediğinizde yaşanıyor. (site-packages’a yüklenen modüller.) Bu modüllere CTRL+click yaparak doğru şekilde zıplayabiliyorsunuz, yani intellij doğru şekilde ilgili modülü buluyor ancak yine de bulamamış gibi acaip hatalar veriyor.

Şuan için refactoring, debugging gibi desteklerin olmadığını da söylemek lazım. Python kodlamak için pek çok editör denedim, eminim problemleri giderildiğinde intellij’den başkasını kullanmayacağım, ancak şuanda en iyi pytyon ide’si olarak eclipse’in pydev plugini gözüküyor.

Daha önce bahsettiğim Netbeans’in python plugin’i de hızlı şekilde development’a devam ediyor ancak orada da özellikle sistem pathinden import edilmiş diğer libraryler ile ilgili autocompletion özellikleri düzgün çalışmıyor. (Konuyla ilgili bug report ettim)

Categories: Uncategorized

YouTube’dan Canlı Yayın

November 20, 2008 erdincyilmazel Leave a comment

YouTube 23 Kasım günü (Türkiye saatiyle sanırım gece 3′te) canlı olarak ilk kez yayın yapacak. Pek çok ünlü sanatçının yer alacağı etkinliğe ait geri sayım sayacını aşağıda görebilirsiniz.

Categories: Uncategorized

GUI Tasarımı

November 20, 2008 erdincyilmazel Leave a comment

Ffffound.com sitesinin uyguladığı pagination sisteminin demosu. Tasarıma sadece görsel zenginlik değil kullanım kolaylığı olarak bakılması gerektiğinin güzel bir örneği.

UI Highlights from Ffffound from Ryan Singer on Vimeo

Categories: Uncategorized

Netbeans’den Python destegi

November 11, 2008 erdincyilmazel Leave a comment

Sun Microsystems’in scripting dillerine verdigi destek Netbeans’de de kendini gosteriyor. Ruby ve Php desteginden sonra simdi de sirada Python var. Daha once de Ruby destegini gelistiren Java Posse yorumcularindan Tor Norbye simdi de python destegini gelistiriyor. Birkac haftadir takip ediyorum, her yeni build’de biraz daha stabil hale geliyor ve suanda gayet kullanilabilir durumda. Zaten Tor Norbye’nin blog’unda bahsedildigi uzere birkac gun icinde bir early access paketi yayinlayacaklarmis. Sanirim Netbeans 6.5′in release olmasiyla birlikte cikacak bu release.

Nightly build’lere http://deadlock.netbeans.org/hudson/job/python/ adresinden erisebilirsiniz.

Categories: Uncategorized

Vmware Infrastructure 3 Demo

November 9, 2008 erdincyilmazel Leave a comment

Biraz Vmware reklami yapar gibi oldum ama bu demo acaip hosuma gitti: :)

Categories: Uncategorized