473,395 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How big can a Python program be?

Hi,

A C program can be hundreds of thousands lines of code big.
C++ millions.

How about Python?

Suppose , you are a sole programmer (lonewolf). How many lines can one handle?

Thanks,
jan bodnar
Jul 18 '05 #1
14 8714
vr******@post.sk wrote:
A C program can be hundreds of thousands lines of code big.
C++ millions.

How about Python?

Suppose , you are a sole programmer (lonewolf). How many lines can one handle?


What are you actually asking? What technical limitations,
such as maximum line count per module, Python might have?

Or how productive the average programmer can be in terms
of lines of Python code produced per day?

Or something else entirely?

Note that lines of code is a pretty poor measure of productivity,
especially if you just use an average statistic, because it's
hard to judge whether those lines are bug-free or bug-ridden,
and because there is an extremely wide variation in productivity
between different programmers (one oft-published ratio is 30:1).

And more importantly than anything: why do you want to know
such things? This information is critical to providing you
with a useful answer.

-Peter
Jul 18 '05 #2
As many as our tiny, little minds can string together!! :->

<vr******@post.sk> wrote in message
news:90**************************@posting.google.c om...
Hi,

A C program can be hundreds of thousands lines of code big.
C++ millions.

How about Python?

Suppose , you are a sole programmer (lonewolf). How many lines can one handle?
Thanks,
jan bodnar

Jul 18 '05 #3
On 17 Aug 2004 vr******@post.sk wrote:
Suppose , you are a sole programmer (lonewolf). How many lines can one
handle?


$ wc -l my_current_big_project_that_is_very_far_from_being _complete/*
2945

I'm sure others can do better than that.

Jul 18 '05 #4
vr******@post.sk wrote:
Hi,

A C program can be hundreds of thousands lines of code big.
C++ millions.

How about Python?

Suppose , you are a sole programmer (lonewolf). How many lines can one handle?

Thanks,
jan bodnar


Are you suggesting that a solo programmer wrote a multi million line C++
program? If not then what has this to do with 'How many lines can one handle?'

The application I am currently working on has 75,000 lines across some 600
files. But I suspect that the line count is higher when you include the various
libraries. So I am handling 75,000 lines in some sense, is this what you mean?
Or are you talking about the number of lines per file (average 125) or perhaps
lines per method?
Jul 18 '05 #5
vr******@post.sk writes:
Hi,

A C program can be hundreds of thousands lines of code big.
C++ millions.

How about Python?


no limitation

Klaus Schilling
Jul 18 '05 #6
vr******@post.sk wrote in message news:<90**************************@posting.google. com>...
Hi,

A C program can be hundreds of thousands lines of code big.
C++ millions.

How about Python?

Suppose , you are a sole programmer (lonewolf). How many lines can one handle?

Thanks,
jan bodnar


Well, heres my quarter-million line Python 'Program' executing
pad@Williams-McCarthy:/tmp$ python -c 'print "x=0"
for i in xrange(2**18):print "x+=",`i`
print "print x"' > silly.py
pad@Williams-McCarthy:/tmp$ wc -l silly.py
262146 silly.py
pad@Williams-McCarthy:/tmp$ nice python silly.py
34359607296
It did start to swap but didn't take too long to finish on my 256Meg
Debian Linux, Athlon 1470MHz machine

:-) Pad.
Jul 18 '05 #7
Peter Hickman <pe***@semantico.com> wrote in message news:<41***********************@news.easynet.co.uk >...
vr******@post.sk wrote:
Hi,

A C program can be hundreds of thousands lines of code big.
C++ millions.

How about Python?

Suppose , you are a sole programmer (lonewolf). How many lines can one handle?

Thanks,
jan bodnar
Are you suggesting that a solo programmer wrote a multi million line C++
program? If not then what has this to do with 'How many lines can one handle?'

The application I am currently working on has 75,000 lines across some 600
files. But I suspect that the line count is higher when you include the various
libraries. So I am handling 75,000 lines in some sense, is this what you mean?
Or are you talking about the number of lines per file (average 125) or perhaps
lines per method?

Heh,
Are you suggesting that a solo programmer wrote a multi million line C++
program? If not then what has this to do with 'How many lines can one handle?'
No way. This was just another question. One programmer told me that
he
can roughly handle max 10 000 lines in C language. I was curious
about Python. I always hear that Python can be used on larger projects
than e.j. PERL because it is Object Oriented and cleanly designed.
What is a larger project? Mumbers revail more.
The application I am currently working on has 75,000 lines across some 600
files.


This is probably team work. It's helpful for me to know figures. When
you start a project it is useful to know the limitations of a
language. Visual Basic is reported to fail on larger projects.
Jul 18 '05 #8

On 18 Aug 2004, at 15:19, vr******@post.sk wrote:

No way. This was just another question. One programmer told me that
he
can roughly handle max 10 000 lines in C language. I was curious
about Python. I always hear that Python can be used on larger projects
than e.j. PERL because it is Object Oriented and cleanly designed.
What is a larger project? Mumbers revail more.


Of course 10,000 lines of Python will usually encompass much more
functionality than 10,000 lines of C, because Python is a higher-level
language, so you need to be careful you're comparing like with like. I
have never tried to write 10,000 lines of Perl, and would never do so
unless (a) I was being paid an obscenely large amount of money for it
and (b) I had a cast-iron guarantee that I would never have to look at
it ever again.

But a simple line-count is less revealing than actual project scope
IMHO. What does this 10,000-line C program actually do? How much effort
would it be to do that in Python? In a lot of cases, the answer will be
that it is much less effort in Python, and fringe benefits of that are
likely to include shorter and more legible code than you had in C. You
might be able to do it in APL in far fewer lines, but as to effort and
legibility... YMMV!

Tim J

Jul 18 '05 #9
vr******@post.sk wrote:
Peter Hickman <pe***@semantico.com> wrote in message news:<41***********************@news.easynet.co.uk >...
Are you suggesting that a solo programmer wrote a multi million line C++
program? If not then what has this to do with 'How many lines can one handle?'


No way. This was just another question. One programmer told me that
he
can roughly handle max 10 000 lines in C language. I was curious
about Python. I always hear that Python can be used on larger projects
than e.j. PERL because it is Object Oriented and cleanly designed.
What is a larger project? Mumbers revail more.


The problem is that some languages are much more verbose than others, thus a 100
line python program might require 2,000 lines of C or 700 lines of C++ (I'm just
making up numbers here). What then counts is the programmers ability to read the
source and summarise (oh, that's just creating back orders if we are out of
stock). The more verbose the language the more likely they will have a problem
comprehending the intent of the code. Imagine trying to comprehend a C program
against its assembly equivalent. C is easier to read than assembly and Python is
easier to read than C.

I suppose languages have a conciseness metric but I would not know how to
measure it. On the other hand APL is very short by just as hard to read.

Perl is used on some very large projects! The 75,000 lines I mentioned was Perl
and I would not count that as a large project.
The application I am currently working on has 75,000 lines across some 600
files.


This is probably team work. It's helpful for me to know figures. When
you start a project it is useful to know the limitations of a
language. Visual Basic is reported to fail on larger projects.


It was created by a team for sure but when an upgrade or fix is required then
only one programmer is looking at the whole of the code so they have to handle
the entire codebase. A well designed codebase / object hierarchy helps here.

As to Basic, the non VB sort, I have worked on financial systems that were
written in Vax Basic that were many 1,000s of lines long. The language is not
the problem. With VB the problem is that you never really got to work with the
code, the IDE was always in the way and the IDE only existed at the program
level and not the project.
Jul 18 '05 #10
> What are you actually asking? What technical limitations,
such as maximum line count per module, Python might have?
Well this is maybe difficult to define. Programs reach some limit and
become unmanagable. This is one reason why we have OOP, UML etc.

And more importantly than anything: why do you want to know
such things?


Simple. Can you make an ERP in Python? Or is Python limited to little
nice scripts or small programs with nice GUI?
We are thinking to start a huge project, which could be hundreds of
thousands of lines huge. I would finally know the answer, but it is
probably better to ask first...
Jul 18 '05 #11
vr******@post.sk writes:
No way. This was just another question. One programmer told me that
he
can roughly handle max 10 000 lines in C language. I was curious
about Python. I always hear that Python can be used on larger projects
than e.j. PERL because it is Object Oriented and cleanly designed.
What is a larger project? Mumbers revail more.


in scheme I may handle 1000 times more code than in any infix language

Klaus Schilling
Jul 18 '05 #12
vr******@post.sk wrote:
What are you actually asking? What technical limitations,
such as maximum line count per module, Python might have?


Well this is maybe difficult to define. Programs reach some limit and
become unmanagable. This is one reason why we have OOP, UML etc.


Yes, that's true.

In this respect at least Python is fairly widely considered to
have a leg up on much of the competition. One of the biggest
reasons is that it makes the code much more maintainable
(because of greater readability for one thing) than the same
amount of code in many other languages would be.
And more importantly than anything: why do you want to know
such things?


Simple. Can you make an ERP in Python? Or is Python limited to little
nice scripts or small programs with nice GUI?
We are thinking to start a huge project, which could be hundreds of
thousands of lines huge. I would finally know the answer, but it is
probably better to ask first...


Ah, excellent... yes! No problems. In fact, I'm near certain there
was someone around here one or two years ago talking about making
a large ERP system in Python. Don't know who that was, or whether
they might have shipped it yet...

At my last place of employ, we used Python to develop a system
that had something like 60,000 lines of code that we wrote, and
which built on Zope (and, later, Twisted), which had I believe
over 100,000 lines of code. And of course a line of Python code
corresponds to quite a few lines of C code (one group's analysis
says it's a 10:1 ratio: http://www.pythonology.com/success&story=wingide).

Here are some other references for you:

http://mail.python.org/pipermail/pyt...st/233130.html

http://www.pythonology.com/success

http://www.mindview.net/WebLog/log-0036 (Bruce Eckel)

This newsgroup's archives:

http://groups.google.com/groups?q=la....lang.python.*

-Peter
Jul 18 '05 #13
In article <90**************************@posting.google.com >,
<vr******@post.sk> wrote:
Jul 18 '05 #14

Simple answer :
If you don't do it in Python, it'll be twice as big.

Think about the size of Python's library.
What kind of projetc is it ?
Several of us have experience working with Python projects
which occupy hundreds of thousands of lines.


Jul 18 '05 #15

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

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
114
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
0
by: metaperl | last post by:
A Comparison of Python Class Objects and Init Files for Program Configuration ============================================================================= Terrence Brannon bauhaus@metaperl.com...
4
by: Julian | last post by:
Hi, first of all, I have to say I am new to Python. I have been working with a finite element analysis program written in c++. now, I am trying to 'rebuild' this code (possibly a full re-write)...
12
by: adamurbas | last post by:
ya so im pretty much a newb to this whole python thing... its pretty cool but i just started today and im already having trouble. i started to use a tutorial that i found somewhere and i followed...
34
by: Anthony Irwin | last post by:
Hi All, I am currently trying to decide between using python or java and have a few quick questions about python that you may be able to help with. #1 Does python have something like javas...
1
by: Jim Langston | last post by:
Windows. Situation: Using a Python program called OpenRPG. I have a program that displays form data (a character sheet) in C++. I am able in the C++ program to build a string and copy it into the...
8
by: karthikbalaguru | last post by:
Hi, One of my python program needs tkinter to be installed to run successfully. I am using Redhat 9.0 and hence tried installing by copying the tkinter-2.2.2-36.i386.rpm alone from the CD 3 to...
1
by: =?ISO-8859-1?Q?Andr=E9?= | last post by:
Hi everyone, I'd be interested in hearing suggestions as to the "best" way to drive a Python program step by step from another application. Details: --------- I have implemented a "Robot"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.