LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-01-2005, 08:08 PM   #31
TheGiantPotato
Member
 
Registered: Dec 2003
Location: Kansai, Japan
Distribution: LFS, FedoraCore
Posts: 35

Rep: Reputation: 15

C# is pointless in my view, as there are so many other more mature alternatives.

The main advantage of learning an object-oriented language first (C++ vs C for example) is that you will be learning to structure in objects and encapsulate data from the beginning. It really changes your outlook on larger projects. Proper structure is the difficult part of programming. Why learn to program in a language that promotes spaghetti code, and then unlearn your previous structural design process when you can start out learning a (somewhat simpler, in my view) superset of the same language, and already be advancing your concepts right out of the gate.

The most convoluted C++ code I have ever seen has been from guys who started in C. The best design I have seen is either people who watched OOP form, and caught on that this would be a good idea and save us heaps of time, or started learning OOP from the beginning.

BTW, a strange note on Basic... yes, it is horribly structured (but then again, Pascal is badly suited to large projects for the same reason) but in some variants of Basic (and Turbo Pascal, I believe) they partially included this functionality by allowing you to call subroutines, which could be complete function definitions if you choose, and could accept arguments. The problem comes with the lack of locally defines variables. Last time I messed with Basic and Pascal variants was a few years ago, but they hadn't ever supported truly black-box functions yet... so the huge advantages of complete functional ambiguation and simple reuse of un-altered functions in other code simply don't exist... this certainly limits the language in an immediate way.

That's not to say that someone won't come along and include this functionality in the future in (yet another) superset of Pascal or Basic...

Hey, screw it. You want to learn a process-based language first, how about just going for the gold and learning Brainfuck first? That will give you great habits.
 
Old 09-01-2005, 08:34 PM   #32
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 38
I would not waste my time with Perl (or Java for that matter) other than to just be able to read it (although it will help you to read and write PHP as well). Python is THE way to go for *ALL of your programming needs!

Start programming language holy war now...

-------------------
*DISCLAIMER: Don't expect to be able to do anything with Python that requires intimate contact with hardware. For that, you can use C or Assembly. Hey, you did ask what would be good for first language.
 
Old 09-02-2005, 03:52 PM   #33
Hal
Member
 
Registered: Oct 2003
Location: East Anglia, England
Distribution: Dapper Drake / Slackware
Posts: 151

Rep: Reputation: 30
dub.wav:
I'm aware that BitTorrent is written in Python. I wasn't saying it couldn't be done, but I have _a lot_ of experience tinkering with freezing Python programs for Windows, and the only thing I can conclude is that it is a pain.

A lot of people are still on 56k, and the python24.dll can add significantly to the download time. Even when everything in the Dist directory (from py2exe) is UPX'd, the file size is still quite bad.

Python GUI programs I have frozen are significantly slower than their compiled language counter-parts.

Also some people who have tried out the resulting executables get an error that Windows needs msvcr71.dll for them to run. I have looked into this problem, and there is some _very_ dodgy licensing surrounding how to distribute the .dll, I think it boils down to you having to own some Microsoft IDE.

Maybe I'm a bit cynical after many a frustrated our spent making Python GUI executables... I think the only instance I would recommend doing so is when you're just making a quick hack project.

If you're going down the Frozen Python GUI path I recommend you do the following:

wxPython for the GUI
...Boa Constructor for the IDE (very easy to set up)
py2exe for the freezer.
Only include the widgets that you need, otherwise you're going to get a ton of stuff you don't need in your exe.

Maybe you'll just have to try it for yourself, I admit that it is very cool to get a little .exe from a Python program you have written, as it really is a nice language. I'm sure you'll agree with that dub.
 
Old 09-04-2005, 06:03 AM   #34
dub.wav
Member
 
Registered: Aug 2003
Location: Norway
Distribution: FC4
Posts: 83

Rep: Reputation: 20
I have some experience with freezing both Python/PyGTK and Python/Tkinter apps.
PyGTK is fairly easy - I normally just copy BitTorrent's scripts, and customize them.
Tkinter is a bit of a mess. It takes some trial and error to remove files not needed by the app.

I got the PyGTK app down to 4-5 MB, and the Tkinter app down to 2.5 MB. Admittedly I've only frozen fairly basic apps, but the difference in size should not be too great.

I agree (had forgotten it when writing my other post) that the msvcr71.dll situation is bad.
Going back to Python 2.3 is not really a solution, since future Python versions are also likely to be linked to msvcr71.dll.
So in the case of Windows, I agree with you that until they get rid of the msvcr71.dll dependency, it's sadly not really an option (unless you've bought a compiler from MS, and thus have the right to redistribute the DLL).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
D language greg108 Programming 33 11-18-2004 08:53 AM
Which language? scuffell Programming 1 07-01-2004 08:17 PM
which language? 2k. Programming 4 11-04-2003 09:44 AM
Which language is best? awdoyle Programming 16 03-23-2003 07:34 PM
what language TravisB Programming 2 03-29-2002 04:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration