Re: Java versus Python

  • From: "Littlefield, Tyler" <tyler@xxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sat, 18 Jun 2011 14:01:38 -0600

Hello:
>Now, from that team, what were you able to learn about Python development, as opposed to c++, java, or what not. Something that kind of caught me off guard was the need for a different design, because ppython is a different language from what I am used to. I learned a lot about some different design methods that Python supported that it would have been a lot harder to do in c++. for example, we wanted to keep a registry of objects that inherited a specific class. In c++ I would have had to have somehow registered the objects manually. With Python I was able to create a __new__ method, which got called when the module was imported, and added the object to the registry so it could be created from there. This was nice because we wanted to be able to dynamically create components, and this could be done just by accessing the registry; adding a component was a fairly trivial task, you either added it to an already imported file, or just added an import statement. This was also pretty cool because it allowed me to do some validation on each object that was being automagically added to the registry. For example, I could check for a name attribute to see if the component had a name, (which was required to add it to the dictionary).

As I said before, I like pythons ease-of-use. It allows for me to prototype ideas when I have them, and then if needed I can fall back to another language to fully implement them. I like the ability to quickly create a proof-of-concept that I can play with, before I actually build something. >I'm interested, since you've had multiperson development experience, and are advising folks on >here I'm not advising anyone of anything. This thread started out as a Python vs Java thread, and most of my replies have been killing the "SWT works," which makes it sound like WXPython does not. I've also made comments on the idea that a single misplaced space will bring the world crashing down on your shoulders, as to a single misplaced curly brace or semi colen, for example. But I will proceed with your question anyway. >So for example, did you think Python enabled certain design patterns to be implemented more easily than others?> Of course, each language allows some design patterns to be more easily implemented, based on the language and what it allows. I have not yet reached a point of study on design patterns, but I have done some reading. One specific pattern that I worked with for example was a chain of responsability. The guy I was working with was working on a small mud engine in Python, so we implemented this for events. If you for example, were to put a sword in a box which was in a bigger box, there would be an event fired off that let the smaller box just know it received something. This could travel up the hierarchy of containers (small box to bigger box, bigger box to carrier) to notify each in turn that an object had just been added, at which point weight could be applied. In c++ i would have just used an event and had subscribers to that event, which would have gotten notified on each object. In python we instead used a form of the Command Dispatch pattern, which allowed us to check and see if the method existed on the class; if it did, we could just call that method.
There is a lot more information here on the pattern I just mentioned:
http://www.python.org/workshops/1997-10/proceedings/savikko.html

On 6/18/2011 1:16 PM, Sina Bahram wrote:
Tyler, you continuously respond with vitriol and childish behavior, but let's 
move on.

Now, from that team, what were you able to learn about Python development, as 
opposed to c++, java, or what not.

I'm interested, since you've had multiperson development experience, and are 
advising folks on here

So for example, did you think Python enabled certain design patterns to be 
implemented more easily than others? Perhaps you've had
to deal with a modular program as opposed to a monolithically developed one and 
thought Python had some weaknesses or strengths in
that respect?

I'm sure everyone can benefit from this. That is of course if you take time 
aside from insulting me.

Take care,
Sina

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Littlefield, Tyler
Sent: Saturday, June 18, 2011 3:08 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Java versus Python

Hello mr. c++ i-dream-in-opcodes master,
  >Out of curiosity, have you? been in a multiple person development
team, I mean, so that you can back up how well Python works?
I have. Thanks for what I'm sure was a very constructive question that I
know wouldn't have lead to your vast amount of arrogance making an
appearance.

On 6/18/2011 12:39 PM, Sina Bahram wrote:
I have, as has Ken more than me, and both of us have experienced the complete 
misery that is the lack of proper typing in
multiperson development teams.

Out of curiosity, have you? been in a multiple person development team, I mean, 
so that you can back up how well Python works?

Take care,
Sina

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Littlefield, Tyler
Sent: Saturday, June 18, 2011 9:48 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Java versus Python

Have you coded in python frequently enough to be able to back up the
statement that coding in Python dies after big projects? I've added to
some python projects and you can still code just as fast.
On 6/18/2011 6:45 AM, John J. Boyer wrote:
One reason we chose Java for BrailleBlaster is SWT. It really works as a
cross-platform GUI builder. Once you get into a complex project the
advantages of being able to develop something quickly in Python are much
less.

John

On Sat, Jun 18, 2011 at 03:22:52PM +0300, black ares wrote:
In fact it isn't a matter of preference.
Best trained profesionals in this area choose the platform and technology
best tailored to the project needs.
So If I have a project that I can do better and quick in python than I will
choose that langgage.
If options are better in java I will choose it.
Depends very much on the project requirements.

----- Original Message -----
From: "David Tseng"<davidct1209@xxxxxxxxx>
To:<programmingblind@xxxxxxxxxxxxx>
Sent: Saturday, June 18, 2011 5:15 AM
Subject: Re: Java versus Python


I personally find arguments about programming languages much analogous
to those seen in politics.  Both sides have great points but tend to
drive one another towards opposite extremes.  Some camps are die hard
dynamic language practitioners while others stick to strongly typed
code.

I will say that strongly typed languages have kind of won the battle
historically.  Most of the industry writes in C-styled languages like
C/C++, java, etc.  Lisp, still beloved by many, kind of lost.  Python,
as many have shown, works wonderfully and frees up coders to actually
code, is still largely a wrapper on C.  For those who want absolute
performance, it's considered still an extra level of indirection
that's not worth the productivity gain.

I love python and its free-form style and the amount of progress you
can make using it.  Python excels at the rinse and repeat (compile,
run, fix) style of coding.  The few seconds you need to compile a
C-styled language and run, you're already fixing the bug in python.
You're not babied into writing object-oriented code ala java, but can
independently mix in functional aspects if you wish.  You can just as
easily go OO if you want as well.



On 6/17/11, Alex Hall<mehgcap@xxxxxxxxx>    wrote:
Programming is certainly a matter of preference in most situations. I
would probably give up if the only option were php, since I really
hate that language (no offense to anyone). Java is easy enough, but I
agree that it feels bulky at times. I like Python's ease of use and
readability, plus you can create executables with it, something that
is difficult in java. Some people don't like that python is loosely
typed, but I prefer saying:
name=raw_input("Enter your name: ")
to, if memory serves:
name=new String();
in=new InputReader();
name=in.readLine();
or something along those lines.

On 6/17/11, Littlefield, Tyler<tyler@xxxxxxxxxxxxx>    wrote:
I've used both. I really like python because it comes on most *nix
systems. I also like Python because of it's flexability and versatility.
Java is nice enough, but it feels big bulky and clunky to me. That and
they seem to have some serious naming convention issues. Sometimes
things are capitalized, sometimes they're not--.net makes more sense.
On 6/17/2011 6:49 PM, John J. Boyer wrote:
There has been a lot of discussion on the list lately about Python. Why
is that?Personally i much prefer Java. Its syntx makes a lot more sense
and it is just as powerful, if not more. A command-line build system
like ant can take most of the hassle out of working with Java classes.
personally, I prefer this to Eclipse.

BrailleBlaster is written in Java. I am using openjdk-1.6, Eclipse SWT
and Apache Ant.

John

--

Take care,
Ty
my website:
http://tds-solutions.net
my blog:
http://tds-solutions.net/blog
skype: st8amnd127
My programs don't have bugs; they're randomly added features!

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


--
Have a great day,
Alex (msg sent from GMail website)
mehgcap@xxxxxxxxx; http://www.facebook.com/mehgcap
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind



--

Take care,
Ty
my website:
http://tds-solutions.net
my blog:
http://tds-solutions.net/blog
skype: st8amnd127
My programs don't have bugs; they're randomly added features!

__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: