473,699 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there a "Large Scale Python Software Design" ?


I did it.

I proposed python as the main language for our next CAD/CAM
software because I think that it has all the potential needed
for it. I'm not sure yet if the decision will get through, but
something I'll need in this case is some experience-based set
of rules about how to use python in this context.

For example... is defining readonly attributes in classes
worth the hassle ? Does duck-typing scale well in complex
software or should I go for a classic inheritance hierarchy ?

In other words... is there something like the classic "Large
Scale C++ Software Design" (Lakos) for python ? I'm not
looking for a bible, but lessons learned from someone that
already went down this path could be quite interesting.

Any suggestions/pointers are welcome.

Andrea
Jul 18 '05 #1
36 6384
Andrea Griffini wrote:
I did it.

I proposed python as the main language for our next CAD/CAM
software because I think that it has all the potential needed
for it. I'm not sure yet if the decision will get through, but
something I'll need in this case is some experience-based set
of rules about how to use python in this context.

For example... is defining readonly attributes in classes
worth the hassle ? Does duck-typing scale well in complex
software or should I go for a classic inheritance hierarchy ?

In other words... is there something like the classic "Large
Scale C++ Software Design" (Lakos) for python ? I'm not
looking for a bible, but lessons learned from someone that
already went down this path could be quite interesting.


Wouldn't it have been better to ask these questions BEFORE proposing
python as (presumably) a Great Solution? IMO, as great as python is,
it isn't appropriate for projects that are large and include many
developers.

The benefits of static typing, not least among which is the vastly
superior ease of creating tools that "understand " the language,
outweigh python's advantages in an environment when many people are
writing a lot of code. This can be mitigated by reducing the
connectedness of your code, e.g. with a plugin architecture, but that
isn't always an option either...

Good luck.

-Jonathan

Jul 18 '05 #2
On 18 Oct 2004 16:49:29 -0700, Jonathan Ellis <jb*****@gmail. com> wrote:
The benefits of static typing, not least among which is the vastly
superior ease of creating tools that "understand " the language,
outweigh python's advantages in an environment when many people are
writing a lot of code. This can be mitigated by reducing the
connectedness of your code, e.g. with a plugin architecture, but that
isn't always an option either...


On principle, I disagree with this statement. Doing large scale
development using Python isn't certainly the same thing as to do it
with another language - C, C++ or Java, for instance. It will require
a different approach to the problem, and perhaps a particular set of
tools and disciplines to help with the process. But I don't think that
static typing represents such a great advantage per itself, as to make
Python badly suited to the problem, because there are many aspects to
it, and Python has its own advantages too. Give it a solid design,
leveraging Python particular strengths, and the end result has the
potential be a positive surprise. But again, that's just my opinion,
and I'm not the best person around to make a definitive claim on it
:-)
--
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: ca********@gmai l.com
mail: ca********@yaho o.com
Jul 18 '05 #3
Jonathan Ellis wrote:
Andrea Griffini wrote:
I proposed python as the main language for our next CAD/CAM
software because I think that it has all the potential needed
for it.
Wouldn't it have been better to ask these questions BEFORE proposing
python as (presumably) a Great Solution? IMO, as great as python is,
it isn't appropriate for projects that are large and include many
developers.


I don't know what Jonathan's experience with using Python in
large teams and projects is, but mine includes four years
as Director of Software Engineering at a wireless tech company
and a team that ran between ten or fifteen people, and a very
large amount of code. We found Python to be *very* appropriate
for this and of course anything smaller.
The benefits of static typing, not least among which is the vastly
superior ease of creating tools that "understand " the language,
outweigh python's advantages in an environment when many people are
writing a lot of code.


While it appears true that it is easier to develop certain
tools for statically typed languages, it's not at all apparent
that this small benefit outweighs the very significant advantages
that Python brings to large-scale development, and to large-team
development. I'll add "especially when using test-driven
development and any agile process", and to be perfectly honest
I'm not sure I would recommend Python nearly as strongly if one
was forced to use a traditional, non-agile approach to the work.

My past posts on the subject have covered this a number of times.
I have to admit I haven't seen anything from Jonathan on this
topic, so I can't say how his experience compares with mine, nor
why he would feel the way he does.

-Peter
Jul 18 '05 #4
Andrea Griffini wrote:
I proposed python as the main language for our next CAD/CAM
software because I think that it has all the potential needed
for it. I'm not sure yet if the decision will get through, but
something I'll need in this case is some experience-based set
of rules about how to use python in this context.
I know of 2 startups who have decided to construct similar softwares in
Python, due to the fact that they can build entire packages in a year
with a small, but experienced, development team. At least one
of them is funded in the tens-of-millions of dollars range by a
half-dozen automotive and aerospace companies.
Jonathan Ellis wrote: Wouldn't it have been better to ask these questions BEFORE proposing
python as (presumably) a Great Solution? IMO, as great as python is,
it isn't appropriate for projects that are large and include many
developers.


Having recently released a piece of software with 10k lines of Python
running in its backend as a core technology, and being paid for it, I
will say that Python was and is the best tool for the job. A C version
would have been at least 4-10 times as many lines, and we wouldn't be
releasing ~3 months after starting with nearly the confidence we are now.
In terms of developers, some projects require more than one developer,
and in that sense, Python works as well as other languages: planning is
key.

- Josiah

Jul 18 '05 #5
Jonathan Ellis wrote:
Andrea Griffini wrote:
I did it.

I proposed python as the main language for our next CAD/CAM
software because I think that it has all the potential needed
for it. I'm not sure yet if the decision will get through, but
something I'll need in this case is some experience-based set
of rules about how to use python in this context.

For example... is defining readonly attributes in classes
worth the hassle ? Does duck-typing scale well in complex
software or should I go for a classic inheritance hierarchy ?

In other words... is there something like the classic "Large
Scale C++ Software Design" (Lakos) for python ? I'm not
looking for a bible, but lessons learned from someone that
already went down this path could be quite interesting.

Wouldn't it have been better to ask these questions BEFORE proposing
python as (presumably) a Great Solution? IMO, as great as python is,
it isn't appropriate for projects that are large and include many
developers.


The OP would be well-advised to search the Google archives of c.l.py as many
(myself included) take the contrarian view - as the project grows in size it is
harder to justify going with "classic" languages like C++, or even Java - the
associated costs at each stage of the project are relatively larger to begin
with, and grow more quickly as well.
The benefits of static typing, not least among which is the vastly
superior ease of creating tools that "understand " the language,
outweigh python's advantages in an environment when many people are
writing a lot of code.


I'm not so sure - how much of the benefit those "smart" tools provide goes to
helping the developer manage complexity caused by the language itself? It seems
that often (not always, of course) a lot of what they do is help the programmer
manage oodles of little details that the programmer ought not be burdened with
in the first place, _especially_ on large projects.

What specifically do you see breaking down if Python is used in a project with
lots of people? From working on large projects with lots of people, I've noticed
that projects naturally get divided into components as different teams work on
them, regardless of the language (so for any given piece of code, the percentage
of the total programmers touching that piece of code drops, not rises, as the
total size of the development staff goes up). Again, regardless of language,
large projects & teams almost force well-defined interface points between
various components - I don't see how Python would be any hinderance at all.

On the plus side, projects implemented in higher level languages grow more
slowly (and thus become unmanageable more slowly) than would projects
implemented in lower-level languages. The list goes on and on - I've found
Python components generally easier to test than, say, C++ components. It's also
easier for more people to comprehend more of the code (and, in turn, more of the
implications of decisions), etc., etc.

-Dave
Jul 18 '05 #6
Andrea Griffini wrote:
I proposed python as the main language for our next CAD/CAM
software because I think that it has all the potential needed
for it.
I agree, even without knowing the intended scope. ;)
Speaking of scope, if you are allowed to divulge it, that
would be interesting to know. Will it be 2D or 3D (3D I
would assume), and what kind of geometry engine?
Probably one of the open-source ones that already have
a Python API, no?

If it is 3D, a very desirable feature would be STEP
(ISO 10303) geometry import/export, so that you will be able
to exchange CAD data with virtually any commercial CAD
tool, and some open source ones (such as OpenCascade).
That will greatly increase its chance of adoption by
experienced CAD users, who typically have existing
libraries of CAD designs created using a COTS CAD tool.
(This is even more useful if you are planning to support
assemblies of components -- which might even be the most
logical initial feature for a new Python-based CAD/CAM,
since assemblies could be manipulated even without having
native geometric-form-creation capabilities: all you
would need is rendering, orientation, and interfacing
of existing solids -- a.k.a., "parts".)

If you have access to a license for ABAQUS, I recently
discovered that they have implemented a Python API for their
FEA engine, and have implemented STEP geometry as well.
See: http://www.abaqus.com/PAPortal
... I'm not sure yet if the decision will get through, but
something I'll need in this case is some experience-based set
of rules about how to use python in this context.

For example... is defining readonly attributes in classes
worth the hassle ? Does duck-typing scale well in complex
software or should I go for a classic inheritance hierarchy ?


For something as complex as CAD/CAM, you will probably want to
make maximum use of interfaces and adaptors, with minimal and
very judicious application of classic inheritance hierarchies.
I am *not* an expert on interfaces and adapters, but several
of the gurus on this list are.

Since you will probably want to do lots of prototyping, you
can probably delay decisions about matters such as read-only
attributes until your API has stabilized somewhat.

Keep us posted on your progress.

Cheers,
Steve

Jul 18 '05 #7
Josiah Carlson wrote:
Jonathan Ellis wrote:
Wouldn't it have been better to ask these questions BEFORE proposing python as (presumably) a Great Solution? IMO, as great as python is, it isn't appropriate for projects that are large and include many
developers.
Having recently released a piece of software with 10k lines of Python
running in its backend as a core technology, and being paid for it, I
will say that Python was and is the best tool for the job. A C

version would have been at least 4-10 times as many lines, and we wouldn't be
releasing ~3 months after starting with nearly the confidence we are

now.

Heh. "Large" depends on a lot of things, particularly connectedness,
but I really can't picture 10k being large under any circumstances.
-Jonathan

Jul 18 '05 #8
Peter L Hansen wrote:
Jonathan Ellis wrote:
The benefits of static typing, not least among which is the vastly
superior ease of creating tools that "understand " the language,
outweigh python's advantages in an environment when many people are
writing a lot of code.
While it appears true that it is easier to develop certain
tools for statically typed languages, it's not at all apparent
that this small benefit outweighs the very significant advantages
that Python brings to large-scale development, and to large-team
development.


Almost four years ago I started working at a company with about 500
kloc of Java code. Thanks largely to tool support I was able to get in
and start fixing bugs my first day (this is without significant prior
Java experience). A more-experienced co-worker pointed me in the right
direction, and the IDE did the rest. ("Find definition," "Find
references.") Grep can do much the same thing, but painfully slowly --
and inaccurately, when you have a bunch of interfaces implementing the
same method names. Even after years in the codebase, I still used
these heavily; the codebase grew to about 800 kloc during the 3 years I
worked there. Developers came and went; even if my memory were good
enough to remember all the code _I_ ever wrote, I'd still have to
periodically repeat the familiarization process with code written by
others.

I haven't jumped into a project of similar size with python, but the
tool support for this approach to working with a large codebase just
isn't there, and I haven't seen any convincing arguments that
alternative methodologies are enough better to make up for this.
I'll add "especially when using test-driven
development and any agile process", and to be perfectly honest
I'm not sure I would recommend Python nearly as strongly if one
was forced to use a traditional, non-agile approach to the work.


Testing is good; preventing entire classes of errors from ever
happening at all is better, particularly when you get large. Avoiding
connectedness helps, but that's not always possible.

-Jonathan

Jul 18 '05 #9
Jonathan Ellis wrote:
Heh. "Large" depends on a lot of things, particularly connectedness,
but I really can't picture 10k being large under any circumstances.
-Jonathan


It's large to me. Most sys-admin scripts/programs never cross 1K or 2K
at the most. And Python works well for sys-admin tasks.
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1403
by: kf9150 | last post by:
Hello, i'm debating if i should buy this book. it received good reviews at Amazon: http://tinyurl.com/24zvrf. but it was published in 2004 and i'm afraid quite some materials might be outdated? any input? thanks, kelie
0
8703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8623
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9050
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8935
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8893
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4389
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.