Archive for May, 2009

My Article in Alam Rakamy

May 27th, 2009

This is an article authored by “Heba Abdel Hameed” in Alam Rakamy Magazine and was published this week, this is my second opportunity to share some open source news in Alam Rakamy magazine as the first time was more than one year ago when I launched a presentation in Intel egypt last year about Open Source Technologies.

The article summarizes an interview between heba and me and I just see that it’s well written and organized, I would like to hear your comments on it…

Alam Rakamy

Python Course

May 18th, 2009

Hello All,

I will run a Python course in Mansoura during my weekends in the summer period to introduce professional python programming to students and professionals and the python course will include the following topics:

  1. Basics of Python.
  2. Lists, tuples and dictionaries.
  3. Conditionals, loops and some other statements.
  4. Abstraction and Exceptions.
  5. Magic methods and Functional Programming Introduction.
  6. Introduction to AOP.
  7. Iterators, Properties and Attributes.
  8. Handling Files.
  9. Threading and Sockets.
  10. Professional Network Programming.
  11. Database support.
  12. Unit Testing (pyUnit)

The course will be completely comprehensive and will include introduction to algorithms and data structures. All examples are hands-on and we will build a project at the end of the course.

All training will be under Linux, but people can still use windows if they prefer to.

For more information or questions please contact me on my mail me@ahmedsoliman.com

Python or Java

May 10th, 2009

I’ve been enjoying working with C++ and Python for 6 months now in a very interesting project that might change the way people look at storage in data-centers and the mix of using such extremes is because sometime you want fine control over memory and CPU instructions and sometime you just want to get things to work with less headache.

I’ve also been using Java for quite sometime now and I’m using java these days in my project CAT-SCMP that I’m really happy with it and with its progress, and I was thinking about the differences between python and java and when/where to use any of them, after some thoughtful thinking and practical experience, I’ll tell you :)

Java is quite amazing and I like lots of things in Java as a C++ programmer, the language has small vocabulary and consistent thinking in almost all of its API and the performance is stunning even if you are writing I/O programming you can still achieve performance that can really compete with what you can do with C++, especially, while using Java NIO.

Also, it’s platform independent so compile-once, run-any-where is a bless specially for people like me who take care of the differences between operating systems behaviour and different system calls / API. Java is excellent in portability and does lots of healthy emulation for things that are not available in the operating systems and uses the direct calls to the system calls if they are available.

Python is really amazing too but for different reasons, it’s an amazing language for prototyping in general, so you can get something that can really work in one third the time  you will spend on Java doing the same thing, and the dynamic typing is really cool, you don’t have to worry much about types and you can hackingly use the duck-typing that is pythonic, easy, and fast.

However, python will really encourage you to break the rules and does encourage design-less programming which I don’t really like, some people say that iterative programming means that you don’t have to design before you start, this is WRONG, you might want to read the legendary article from Martin Fowler (Is Design Dead?)first before you say that again.

Python will also help you to do more while typing less, but the performance is 1/50 of java, it’s not bad if you are writing something that is small but I really can’t see that it’s good for large systems, Java is really superior in the overall performance compared to python.

Also, python is not so much compile-once, run any-where thing, because some of its standard library methods are not even available on all platforms, so you have to be sure that you write code that is portable (it’s your responsibility) or you may want to involve a continuous integration system to make sure that you have your system running all the time on all the systems that you are targeting.

Conclusion:

  • Java is for larger, well designed, portable, and highly scalable systems.
  • Java achieves excellent performance for overall system performance.
  • Python provide much faster development and allows less thoughtful designs.
  • Python is really excellent for small systems, Gui’s, system administrators.
  • You can still do some enterprise work with python, but you have to create your own boundaries and enough documentation.
  • Java is not very good in GUI and generally slower than python in that particular area because of the platform independent windowing it’s using, while Python is much faster because it has no windowing and it uses whatever native library you choose like PyQt, or PyGTK for example.