2010 da 2 Yeni Proje!

Perşembe, 31 Aralık 2009 13:29 by ikivanc
2009'a dönüp bakınca gerçekten benim için dolu dolu bir yıl oldu umarım yeni yıl da böyle geçer. Yeni yıl demek benim için klasörlerimin sınıflandılması için her hesabımnda, heryerde yeni birer klasör oluşturmak demekti. Ama bu sene bi farklılık olsun istedim, hatta 2 farklılık :)

Ve 2 Yeni projeye imza atıyorum 1 Ocak itibariyle. Birincisi fotoğraf ile alakalı diğeri de blog ve makalelerle alakalı.

Project365


http://project365.ibrahimkivanc.com/

365 gün boyunca hergün o günümle alakalı bir fotoğraf çekip bunları bir fotoğraf projesinde toplayacağım. Bunun için silverlightta fotoğraflarım için bir proje hazırladım.


Uzun soluklu ve cidden sabır isteyen bi iş, umarım günlük hayatımdan güzel karelerle zenginleştiririm, ilk fotoğrafım ile projem başlasın :)

Tip of Day 365


Yeni bir makale yazmak gerçekten çok fazla vakit isteyen bir iş, ve bu dönemki projelerimin yoğunluğundan dolayı bu kadar bol vakti bulamıyacağım sanırım. Sürekli makale yazmak yerine örneklerine yurtdışında denk geldiğiniz "tip of day" günlüklerinin benzeri günün püf noktası isminde hergün özelliklerle, küçük parçacıklar paylaşacağım.

Microsoft teknolojileri ile alakalı, ağırlıklı olarak da Silverlight, WPF, Linq, IronPython tamamen ince detay!

Hergün girdi yapmak için elimden geleni yapacağım fakat internet imkanım olmadığı takdir de sonraki günlerde o güne ait fotoğrafı ve püf noktayı yükleyeceğim. 

Bu projelerimin haricinde 2 ağır projeyi de sene içerisinde sürdüreceğim; bölümümüzde Yar. Doç. Dr. Mete Çelik ve Yar. Doç. Dr. Filiz Çelik ile beraber Data Mining Üzerine bir proje geliştiriyoruz. Bu projemizde nihayete erişince detayları sizinle paylaşacağım. 

Ve zamanımın büyük bir bölümünü ayırdığım Burak Kanmaz, Fatih Coşkun ile beraber de Imagine Cup'a hazırlanıyoruz. Projemizde demomuz oluştu bile, hedefimiz proje gününe kadar tam sürüm, özellikle de piyasada pazarlanabilecek bir ürün yaratmak. Şimdilik tek eksik, takım ismi ;) Tabiki Kanmaz Hosting'in server sponsorluklarıyla :D Detaylar yine önümüzdeki günlerde burada.

E ne diyelim, yeni yıl hepimiz için kutlu ve dolu dolu olsun :D

Ineta NEXT Kayseri - Ardından

Salı, 22 Aralık 2009 16:33 by ikivanc
Vizelerimden ve diğer işlerimden dolayı son zamanlarda teknik girdi yapamadım. En yakın zamanda güzel içerikler burada olacak habercisi olayım ;) 19-20 Aralık tarihinde Daron Yöndem ve Selçuk Yavuz Kayserideydi. Haftasonu 2 mükemmel gün geçirdik.


Bu etkinlikte WPF, Silverlight, VB 10, C# 4.0, Asp.NET MVC 2, LINQ konuları anlatıldı. Ben de sürpriz bi şekilde C# 4.0 dynamic tipi ile IronPython'ın kullanımını anlattım :)


Daron ve Selçuk hocalarla hem teknik, hem muhabbet bakımından 2 mükemmel gün geçirdik, Sık sık bekleriz Kayseri'ye artık sizleri :)

IronPython 2.0 and Access to .NET Libraries

Cumartesi, 7 Kasım 2009 18:31 by ikivanc
In This Article we’ll learn how to access .NET Libraries from IronPython.

IronPython 1.0 verison on CLR (Common Language Runtime) was really bad and Jim Hugunin who has implemented Python on JVM as Jython,  wrote an article about  “Why the CLR is a terrible platform for dynamic languages.” then he hired for CLR architecture team by Microsoft. He prototyped new architecture so IronPython 2.0 version now runs on DLR (Dynamic Language Runtime). DLR is a platform on .NET which is host Dynamicly typed languages on it. Now Dynamic Languages Communicate eachother and C#,VB, COM Objects, .NET Libraries.

Now we can access .NET Libraries from IronPython and access all .NET objects eachother easily.
 

IronPython, with 2.0 version runs on DLR (Dynamic Language Runtime); it’s a platform like CLR architecture. It’s host for Dynamic Languages on .NET. With this architecture Dynamic Languages now faster then running on CLR and easily communicate with other .NET objects!

 
As you see above, DLR works with .NET 4.0, Programming Languages easily bind .NET, silverlight, Python, Ruby and COM objects.

DLR will be part of .NET 4.0, also with this implementation C# 4.0 will have dynamic type feature.

Access To .NET Libraries
Now we’ll learn how to access .NET Libraries from IronPython. We will develop our application in “IronPython Console”. If it’s not installed in your machine you can get it from http://ironpython.codeplex.com the latest version of IronPython, right now there is 2.0.3 stable version and 2.6 RC2 version.

In Python and IronPython we import libraries with "import" command.

import System.String     #  importing System.String library.
from System import String     # also we can use this import template

with import System.String code we imported String library to our workspace and now we can use this library on IronPython workspace.


We can use one library as above also can use after importing clr like below.
 

Let’s check out Python and .NET string methods; in Python there is a “str” module and in .NET there is System.String Library for string operations.

“str” module has been loaded in IronPython for default work space. To use .NET library “import clr” or “from System import String” namespace. After importing .NET Library, IronPython “str” module is still working.

Without importing clr:

>>> word = "İBRAHİMKİVANC" 
>>>word.lower() 
'ibrahimkivanc' 
>>>word.ToLower()     # we took an error because we didn’t import .NET Libraries
Traceback (most recent call last):
  Filer “<stdin>”, line 1, in <module>
AttributeError: 'str' object has no attribute 'ToLower'

import clr
with this command we imported “clr” module in IronPython workspace. Let’s check out the example..

After importing clr module:

>>> import clr
>>> word.lower()        # python method is also working with clr
'ibrahimkivanc'
>>> word.ToLower()    # now it’s working 
'ibrahimkivanc'

As you see we took an error because we didn’t import clr, after importing clr we can use ToLower() function.


In this Console example, we can save the code as “lib.py” and we can import this code from “app.py” application.
 
# lib.py
import clr
def to_lower(word): return  word.ToLower() 
 
# app.py
import lib
word = "HELLO"
print lib. to_lower (word) # print “hello” to screen
#print word.ToUpper()      # we didn’t import clr to this space  so it throw an error 

PDF version of this article >> 7 - IronPython 2.0 and Access to .NET Libraries

If you have any questions or discover any errors / typos please let me know ik@ibrahimkivanc.com

All The Best!
 

Visual Studio 2010 Beta 2

Pazar, 1 Kasım 2009 15:49 by ikivanc

Visual Studio 2010 Beta 2 Geçtiğimiz hafta çıktı!
 
Beta 1'e göre tasarımı ve hızında oldukça gelişmeler var. Fakat IronPython yok daha :( Mart Ayındaki kararlı sürümünde bekliyoruz bu yeniliği.

VS2010 B2 ile birlikte .NET 4.0 Beta 2 de yayınlandı.


E buyrun buradan indirin :)

Introduction to IronPython

Cumartesi, 3 Ekim 2009 11:25 by ikivanc
Python + .NET, That takes the cake! Python runs on .NET… that sounds good.  Flexibility and easy coding of Python and powerful platform .NET together. Also on the great development enviroment of Visual Studio. This must be a dream :)


This news took me to my childhood year; Voltron cartoon! :) Powerful heroes  combined with shining then become most powerful hero, Voltron. IronPython sounds like Voltron :)


In a short time Python became popular and absolutly it will be more popular in the future by performance, easy coding and easy prototyping. Microsoft became aware of Python’s power. Microsoft entegrated Python to .NET platform, and very innovative technology revealed. IronPython is a Python complier runs on .NET.

IronPython Project started at 2004  and now Ipy 2.6 RC1 relaesed. There is the last stable release Ipy 2.0.2 version. It’s on ,Microsoft’s open source portal, Codeplex. And you can easily get the latest release and news from link below.

http://IronPython.codeplex.com/

Jim Hugunin demoed IronPython to Microsoft and was hired by them to work on the CLR architecture team. IronPython 1 is top of CLR. But CLR is too bad for dynamic languages. Then decided create Dynamic Language Runtime(DLR) and built IronPython version 2 on top of the DLR. DLR Including interoperation between statically typed and dynamic languages. DLR will be part of C# 4.0 and .NET 4!

I will write more about DLR as soon as possible in next blog entries.

This license IronPython is released under is the OSI approved Microsoft Public License (MS-Pl), which Microsoft’s licience for opensource projects. IronPython was the first project to be released under this license.

Road Map for IronPython;

•    Visual Studio 2010 integration for IPy 2.6
•    IPy 3.0 which works with Python 3000 together.

As you see versions of IronPython same with which Python’s version is built on. IronPython 2.6 is compatibility with Python 2.6 and IronPython 3.0 is compatibility with Python 3000. Now IronPython developers working on IronPython 3.0.

From codeplex page you can get IronPython Console application which is for exploring IronPython world. You can develop application from IronPython Console command prompt without an IDE like Visual Studio.

With IronPython Console, you can explore IronPython world and develop apps.


With IronPython Console you can easily explore whole Python’s code, Access .NET libraries and use this libraries to build an application.

So what can we do for developing applications with an IDE? We can use Microsoft’s Visual Studio. Like developing C#, Visual Basic projects in Visual Studio we can easily develope IronPython Projects .

We have two options for IronPython IDE. We can use IDE, stand alone IronPython Studio or Visual Studio Integration. Both of them are same. Chose one It’s up to you. Based on IronPython 1.0 and also come with IronPython Intellisense.

How Do I Install IronPython?
http://IronPython.codeplex.com/ on project’s home page there is a download section. You can find easily download the latest version of IronPython msi installer.

How Do I Install IronPython Studio?
There are some pre-request for Installing IronPython Studio. First of all download the IronPython Studio entegrations below.
 
http://www.microsoft.com/downloads/details.aspx?FamilyId=ACA38719-F449-4937-9BAC-45A9F8A73822&displaylang=en

http://www.microsoft.com/downloads/details.aspx?FamilyId=40646580-97FA-4698-B65F-620D4B4B1ED7&displaylang=en

Visual Studio 2008 must be installed on your system and for a succesful installiation, you must install VS 2008 SDK 1.0 which is link below.

http://msdn.microsoft.com/en-us/vstudio/bb887604.aspx

After this installiations;

from Start > All Programs > Accessories > Commad Prompt right-click it and choose "run as administrator" then access the user account control prompt.

Then choose the path which is including IronPythonStudio.msi setup from Command Prompt. Then enter this command “msiexec /i C:\ IronPythonStudio.msi”.
If you are missing any pre-request of installing step there will be a problem about your installiation.


ScreenShot from IronPython Studio it is look like Visual Studio
 

ScreenShot of IronPython Studio which is integrated in Visual Studio

As you see there is a Visual Studio based IDE, IronPython Studio. It has also IronPython code intellisense. Now we can easily develop UI applications with IronPython Studio. It is easy as pressing F5 :)

IronPython is Working With
Now Python combined with .Net and let’s see where can we use IPy.
    * Desktop Applications
    * Silverlight
    * WPF
    * ASP.NET
    * The Microsoft Robotics Kit
    * XNA (Desktop – Xbox/Zune has no DLR)
    * Surface
    * SharePoint
    * WCF
    * WF

Silverlight
Silverlight has Dynamic Languages support now and Silverlight applications can be developing with IronRuby and IronPython code. We can develop web applications with Dynamic Languages! Cool!
 
WPF
With XAML, graphical user interface desing and code independent from each other so we can develop one of them independently.  Now we can use IronPython in WPF code behind side!
 
ASP.Net
We can use IronPython with ASP.NET building web applications. With IPy it’s really short coded and easily fast developing web applications..
 
The Microsoft Robotics Studio
Microsoft’s development platform for various hardware and Robot technology. IronPython can be integrated to Robotic Studio.
 
XNA
With IronPython’s Advantages of being Dynamic Language XNA 3D and game development. In the future this will be a shining star!
 
SharePoint
IronPython can be integrated with share point.

Why do I prefer IronPython to C# or Visual Basic?
There is a lot of reasons for for this question. Python is a Dynamic Language! C# and Visual Basic are static Languages. Because of being Dynamic Language there are some advantages to developing applications. There is no Type validation and Type creation in Dynamic Languages. Types are not verified up front. They are verified when they are used - languages like Python and Ruby are strongly typed languages, not weakly typed. Easliy Prototoyping and rapid development of Applications. For python users It runs on .NET wih same code!. It’s also scripting language.

PDF verison of this article >> 1 - Introduction to IronPython

If you have any questions or discover any errors / typos please let me know ik@ibrahimkivanc.com

All The Best!

Zaman Serileri - Dynamic Time Warping

Çarşamba, 26 Ağustos 2009 18:20 by ikivanc
Bu sene staj deneyimi olarak Üniversitemizdeki bölümümüzden Yar. Doç. Dr. Mete ÇELİK ve Yar. Doç Dr. Filiz ÇELİK ile beraber akademik bir çalışma üzerine çalıştım. Akademik bir makalenin yazılmasında aktif olarak görev aldım.

Herkesin sorduğu soru özel sektör deneyimim varken neden üniversitede stajı seçtiğimdi. Bu zamana kadar hep özel sektörde deneyim yaşamıştım fakat herhangi bir akademik çalışmam ve akademik deneyimim olmamıştı. Bu staj tam da bu eksiğimi gidermek için mükemmel oldu. Gelecek sene için vereceğim bazı kararların  netleşmesini sağladı.

Stajımı Verimadenciliği konusunda zaman serileri üzerine yaptım ve benim için gerçekten mükemmel bir deneyim oldu. Bu yazımda zaman serilerinden Dynamic Time Warping hakkında bilgi vereceğim.


Zaman serileri veri madenciliğinin temellerini oluşturan en önemli bileşenlerdir. Bu serilerin yorumlanması ile ortaya bir kural veya sonuç çıkarılmaya çalışılır. Tekrar etme, belli bir düzeyde azalarak devam etme veya belirli bir cycle ile devam etmesi sonuçları bu zaman serilerinin incelenmesi ile elde edilir.

Zaman Serilerinin incelenmesinde pek çok yöntem kullanılmaktadır. Bunlar durumlarına göre avantaj ve dezavantajlı konumda olabilir.

Araştırma konumuz boyunca Dynamic Time Warping methodunu kullandım.  Bu method zaman axisinde bire bir eşleştirme değil, küçük toleranslar ve değişiklikler mevcutsa bunları yorumluyarak iki zaman serisinin birbirinin benzeri olup olmadığını belirlemek için kullanılır. Özellikle clasification (sınıflandırma) yaparken bu method çok kullanılır.


Dynamic Time Warping başta;
    - imza doğrulama
    - robotic
    - ses işleme
    - imalat
    - biyoloji
    - tıp sektöründe kullanılmaktadır.
    
Bu yöntem sayesinde zaman serileri üzerinde esneklik sağladı. Bire bir lineer olmayan durumların karşılaştırılıp eşleştirilmesi için bize güzel bir örnek sunuyor. Ayrıca bu yöntem O(n^2) karmaşıklığı ile de  en iyi çözümlerden birisini sunmakta.
 
Ben de staj sürem boyunca bu tekniği Microsoft'un yeni teknolojilerinde kullandım, Belki de bu yeni teknolojilerle kullanılan da ilk projeydi bu açıdan:
Visual Studio 2010 & .NET 4.0 Beta
LINQ
C# 4.0
MS SQL Server 2008

VS2010 + C# 4.0 + Blend 3 + Silverlight 3 + DeepZoom + Ipy 2 + Bing Maps

Cuma, 24 Temmuz 2009 12:40 by ikivanc
Son günlerde staja son sürat devam edip, IronPython ile Silverlight hakkında makaleler yazarken; aynı zamanda  Microsoft'un yeni çıkan teknolojilerini inceleyip adapte olmaya çalışıyorum. Yine eskisi gibi, uyku haricindeki tüm zamanım bilgisayar başında geçiyor... Maceralarımı yakında aktaracam :)

İncelediğim arayüz olarak çok mükemmel olan yeni geliştirme ortamları ile insanın aralıksız kod yazası geliyor :))


Visual Studio 2010 ve .NET 4.0 Beta 1
XAML tabanlı olarak yeniden dizayn edilmiş ve bu XAML kodlarında bazı modifikasyonlar yapmamıza bile izin veriyor. Programla birlikte gelen F#, WorkFlow ve Silverlight 3 dikkat çeken yeniliklerden. .NET 4.0 Kütüphanelerini de kullanarak C# 4.0 ve Asp.NET 4.0 uygulamaları da geliştirebilmekteyiz.

C# 4.0
4.0'da Parallel Extension en fazla dikkatimi çeken özellik oldu. Stajda yazdığım programımda sonuç elde etmek için çok ağır hesaplamalar yaptığı için, paralel programlama zaman kazandırma konusunda bana çok faydası oldu. .Net üzerinde bilimsel çalışma yapmak da bi ayrı oluyor böylece :) C# 4.0 yeniliklerinden de yakında bahsedeceğim ;)

Blend 3
Silverlight 3 ile beraber Blend 3 de çıktı. 60 gün deneme süresi olan Blend de en çok dikkati çekense SketchFlow özelliği. Bu sayede çok hızlı bir şekilde program prototipi elde edebiliyorsunuz. Otomatik kod tamamlama ile çok daha kullanışlı.


Silvelight 3
Silverlight 3 Sonunda çıktı. Çok güzel yenilikleri beraberinde getiren silverlight gün geçtikçe muazzam bir teknoloji haline geliyor.


DeepZoom
DeepZoom çok daha kullanışlı hale gelmiş bu son sürümü ile. Menü, SlideShow ve Link özellikleri gelmiş. En çok beğendiğim fotoğraflarımı bir araya toplayıp yayınlayayım dedim DeepZoom'la. Belki ilerde daha düzgün bir şekilde derler ve güzel bir kompozisyonla size sunarım, şimdilik aşağıdaki derlememle idare edin ve test edin derim deepzoom'u :)


DeepZoom - Fotoroman için tıklayın


IronPython 2.6 Beta 2
Python 2.6'nın .NET geçirilme safhası olan Ipy 2.6 Beta 2 ile son beta sürümünü de yayınladı. Açılışlar ve çalışması önceki beta sürümüne göre daha hızlı bir durumda.

IronPython 2.0.2
IronPython 2.0 için en son düzeltmelerden birisi. Açılış ve proje çalışmalarında da hızlanmayı görmek mümkün.

Bing Maps
Virtul Earth veya Live Maps adıyla bildiğimiz, Microsoft'un haritalama sisteminin adı artık Bing Maps. Bing Arama motorunun duyurulmasının ardından, Bing Maps de duyurulanlar arasında. Silverlight ve WPF ile entegre hallerini test edip bir proje geliştiriyorum yine.

Şimdilik gelişmeler böyle :)