Posts Tagged ‘Personal Reviews’

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.

فيروز – خالية من الكحول

February 21st, 2009

لمدة طويلة كنت مصدق الايميلات اللي بتقول ان مشروب فيروز (مشروب شعير مصري) فيه كحول و كرات كتير كنت ادعوا الناس لعدم شربه كلني بصراحة بحبة جداً و في الفترة الاخيرة و عشان انا مقاطع المشروبات الغازية الامريكية فامفيش قدامي غير شويبس او فيروز.

النهاردة طلبت فيروز و لقيت المفاجأة و قولت اوريكوا

فيروز

زي مانتم شايفين مكتوب بالعربي (خالي من الكحول) و كمان بالأنجليزي (Non Alchoholic) و كان دايماً الايميلات اللي بتقول انه فيه كحول كانت بتستشهد بأنه مش مكتوب علية انه خالي من الكحول.

الحقيقة دا نوع جديد و خطير من حروب المنافسه و اللي بتستخدم اساليب ذكية جداً بأنه يخليك تبطل و تبعد عن مشروبات معينة فاوتوماتيك تشرب ان منتجات تانية!

The Sexiest OS Ever, MAC OS X Tiger 10.4.6

May 5th, 2007

After waiting 5 days of downloading, I finally got the installation DVD iso of the sexiest operating system ever – MAC OS X Tiger 10.4.6 for Intel with SSE2 and SSE3 patches for older and new processors support. I didn’t waste much time and I burnt the DVD and freed a partition of 6 GB to have the system installed on.

In the past few days I had some reading about this system and its hardware compatibility to expect the types of problems I might face with my hardware. I was dying to see it and finally it’s here on a DVD :)

So I rushed and booted the system and I got a nice Apple Icon in the center of the screen and I waited for 5 minutes with complete patience in hope to see the next, the thing which didn’t happen! :D

Quickly I started searching on the internet and I found two great website http://www.osxx86.info/ http://forum.insanelymac.com then I started searching for how to get the boot log, I found the -v and -x boot options for verbose and safe mode. I discovered that the installer was printing out a message “still waiting for root device”!, After some search I discovered that I should set the DVD and the Harddisk as Master devices (primary master, secondary master). then quickly I had things working but this time with a new error :) “Load of /sbin/launchd failed, errno 88″, so again quickly to google and I found that it may have millions of reasons! – I tried a very strange one which is reburn the DVD but using the lowest speed 2.4x and surprisingly it worked!!

» Read more: The Sexiest OS Ever, MAC OS X Tiger 10.4.6

Sound Blaster X-Fi XtremeMusic

January 11th, 2007

Hello Guys,

I wanted to share you my happy experience with Creative SoundBlaster XtremeMusic Sound Card.

I was searching in cairo for audigy 4 sound card from creative and I didn’t find it at all and suddenly I found this amazing piece of art and I didn’t hesitate getting it even if its price exceeded 650 L.E but I’m a musician and I use those type of cards as best as it can be used.

prod14066_hdr_1_6_2.jpg

This card brings the best sound I’ve ever heard out of a machine :) really guys it’s awesome specially on PCI 2.1 bus because I’ve heard that it has some problems with older buses because of its high I/O bandwidth to the mainboard but it worked fine with me on my nVidia mainboard.

» Read more: Sound Blaster X-Fi XtremeMusic

AMD Athlon 64 3000+

August 3rd, 2006

I’d upgraded my “Desktop Box” earlier and I fell into the choice maze “Intel or AMD” andAMD Logo ofcourse I was very interested in the 64bit approach as my work will be improved and go faster with this architecture.

» Read more: AMD Athlon 64 3000+