programming etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
programming etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

21 Nisan 2009 Salı

GSOC 2009 Again


Well i'm again in the Game :) That summer i will be working on my last year GSOC project FUNC again.Big Thanks to Adrian Alikins(my mentor) for choosing me again. And Bigger thanks to GOOGLE for paying us to do open source programming. If you hear for the first time FUNC,it is a great Remote management Framework for doing things reamotely easier. You can even open your shell and do management by playing with its Python API. My aim that time is to make that cool API even more cooler.Here is the list with ideas :
  • Implementing Func Facts : Wouldnt it be cool to say func update machines that are ">f9" or list the machines with dual core cpus. That is what func facts claims to be an ORM like remote querying system.
  • Implementing a Pluggable Connection Manager for Func :Well that is kind of hard one, currently he FUNC is using XML-RPC over SSL. The aim of that item is to make Func to support different connections by reading its conf files. The first connection to be implemented seems to be qpid/AMQP/qmf. After having the pluggable structure it will be easier to add different connections i hope.
  • Structuring the Results : Currently FUNC recieves different kind of results in different formats. Having a way to query and process that result without too much loops will be realy great.
  • Funcweb Development : Func has a Web interface fo doing all the stuff visually,so new features should be added to that cool app.

I hope to finish all the stuff succesfully again like last year. (INSH ;))

17 Mart 2009 Salı

Ajaxian Even Calendar on Django

That is an independent small app that can be useful for others that need some calendar and want to show some events on it. I couldnt find any django calendars which are ajaxian out there. Therefore if you need something like that use it, it is completely free. Let me know if you have any trouble with it.

Features are:
- Showing every month with events
- Small and big(excel like) versions
- Adding same event for a couple of days
- Adding lots of events on same day
- Facebox display of events
- Dual language arabic/english


Demo small : Link (on the left)
Demo Big : Link
Source : Link
Static directory : Link

For instalation look at README file in the source.
Have FUN and thanks to ADK for his design help ...

29 Ocak 2009 Perşembe

I wrote one use mine !

That is the story about a little and probably useless software i wrote. Everything began in 2007 during my internship in Pardus. Pardus uses pisi (a Python based package manager) and pisi doesnt have any sign/verify mechanism (still doesnt have) to secure package transmission. Well we all decided it would be cool to make the verification process via X.509 certificates so we can have more info about signer and etc. And everything began, i started designing the app. The idea was simple we have a package we sign it via X.509 and put the signature in package an send to users for installation. User has on other site a db with trusted certificates, he/she extracts the signature checks if the cert is trusted. If the cert is good to use user computes the hash of all files in package and compares with hash that is in the signature. Simple yes ...

The implementation part was not so easy for me. I heard that there is a Python package for handling SSL things called Python OPenSSL. I was excited it was my first Open Source program but pyOpenSSL didnt have all my needed classes for certification handling, signing and verification parts (if has man i dont know). Than i found M2Crypto it had some ugly Python code and bad exception handling but had all the cool features i needed. And the 'imzaci' was there an alpha verison maybe, it didnt have a code base i was proud of. The application was not accepted by Pardus members and none asked me about it to make it better or to fix sth. Everyone was silent , man probably i wrote the ugliest program in the world if none says sth :)

I thought it was the way how Open Source works. (People can think about things they have experinced) Well Open Source code development doesnt work like that believe me. People discuss,fight,share,apply patches that is the world i was imaging from the beginning. However i didnt make a good start :) The GSOC2008 and FUNC project showed me that secret and cool Opensource World.

Well lets return to our little useless application, after GSOC2008 i have rewritten most of the code maybe better maybe worse i dont know. I changed its name it is not imzaci anymore it is pysign and it is an independent (no written for specific distro) application. Why i have rewritten the program ? I wondered if i became better after those years. Well the code is here [1] and you know what it was not fun to write it. If someone is going to write an app similar to that one please look at my code maybe you can grap some part of it. I wrote it once dont do it again :)

Ok what is the point :) The point ;is it is very very very important to choose community you are going to contribute. Please before you join look at mail listing conversations, look at documentation of project or community has. The start is very important and if you have luck you will be in a place where people respect every bit of your code. That is the Open Source world i was looking for and found at the end :)

There are two kind of programmers, good programmer gets the old code fixes it (if possible) and completes the job in less time, bad programmer writes all the code from scratch (maybe worse than first programmer). Be the good programmer i wrote it dont repeat yourself :)

[1] http://github.com/makkalot/pysign/tree/master

20 Kasım 2008 Perşembe

Got My Amazon Books




Really excited, i just got my amazon orders two great books. I hope to be better programmer now with those pearls :) The books arrived two weeks later from the estimated date but who cares i got em. One of them is about design patterns and other is about algorithms and programming. Here are the title's of books :

1.Programming Pearls
2. Head First Design Patterns

After finish em will write my reviews :)

29 Ekim 2008 Çarşamba

Recursive fibonacci Case Study

In that post i'm going show u a test that i made about recursive calls in Python compared to other languages. The tests used are Python,Python C extension and Java. I always heard that using recursive calls in Python is not very wise, that time i decided to discover it myself. Well i run the 3 programs to find finacci 40. number and got their times with time command in F9. Tests do not claim anything so do not bother me with garbage :) Here they are :

Python
[makkalot@localhost pyalgorithm]$ time python py_fibo.py 40
The result is : 102334155

real 6m32.110s
user 6m22.153s
sys 0m0.519s



Python_Ex :
[makkalot@localhost fibo]$ time python ex_fibo.py rec 40
The recursive result is : 102334155

real 0m3.039s
user 0m2.902s
sys 0m0.017s



Java
[makkalot@localhost bin]$ time java sorts.FiboMan rec 40
The recursive result is 102334155

real 0m4.053s
user 0m2.755s
sys 0m0.095s

Conclusion : The results suprised me a little bit. I knew that Python as a recursive language is slow but the time above is a disaster. Therefore i know now if i need sth recursive in Python i will write it as a C extension. The java also suprised me because its time was very close to C extension. Those Java guys are getting better, maybe JavaFX may make to become a Java programmer :)

Btw, here are the codes :
Python : Link
C extension : Link
Java : Link

Make Python Smoke


In that post i'm going to talk i little bit (not too much ) about some old computer problems. ı have always been excited bout that kind of problems some of most famous ones are :

* Producers-consumers problem
* Dining philosophers problem
* Sleeping barber problem
* Readers-writers problem

All of them has a main purpose to make computer to solve the problem by using threads/processes and semaphores/locks. When think about those problems always my head is going to explode (hey i'm not so clever) and that is the fun part :) I had OS lessons in university but never had chance to write the implementation of these problems (what a practical school). Therefore i decided to write some of these problems in Python so i can explode my head and have fun with Python. One that i have written is Cigarette smokers problem [1] and put its code on my public git repo so other folks can grab it and play with it. The code is here : Link

To run the code just python cigarrette.py and watch how people smoke and die :) If you discover some deadlock or any other fatal mistake please drop a comment to light me .Have fun!

Resources :
[1]Wikipedia : http://en.wikipedia.org/wiki/Cigarette_smokers_problem
[2]My public git repo : http://github.com/makkalot/pyalgorithm/