473,654 Members | 2,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8743
vr******@post.s k 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.goo gle.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

Jul 18 '05 #3
On 17 Aug 2004 vr******@post.s k 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.s k 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.s k 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.s k wrote in message news:<90******* *************** ****@posting.go ogle.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):p rint "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***@semantic o.com> wrote in message news:<41******* *************** *@news.easynet. co.uk>...
vr******@post.s k 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.s k 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.s k wrote:
Peter Hickman <pe***@semantic o.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

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

Similar topics

699
33862
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 capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
114
9815
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
5840
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
0
2499
by: metaperl | last post by:
A Comparison of Python Class Objects and Init Files for Program Configuration ============================================================================= Terrence Brannon bauhaus@metaperl.com http://www.livingcosmos.org/Members/sundevil/python/articles/a-comparison-of-python-class-objects-and-init-files-for-program-configuration/view
4
2122
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) with scripting capability. I did some reading on the web, and found that there are two ways to do this : extending and embedding. and I still haven't figured out what I should be using. I guess the first thing is to figure out what I am to do with...
12
3000
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 the instructions and couldnt get the correct results. heres the code stuff... temperature=input("what is the temperature of the spam?") if temperature>50: print "the salad is properly cooked." else:
34
3667
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 .jar packages. A jar file contains all the program files and you can execute the program with java -jar program.jar I am sort of hoping python has something like this because I feel it
1
2322
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 clipboard, then paste it into the input in the running Python program. I would like to somehow automate this, that is, have the python instance communicate with the C++ instance and vice versa. I'm still trying to think of a way to do this. ...
8
3280
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 my pc. But, it is not getting installed and is failing by throwing the below errors. Should i need to configure / install any specific files for resolving this issue ?
1
2010
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" that can be programmed by a user to perform certain actions. (see Reeborg below for a simple javascript-
0
8375
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
8290
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
8815
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8707
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
8482
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
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
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
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1593
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.