The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 23, 2019, 10:36:29 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Need advices  (Read 5293 times)
nubie
Rookie
**
Offline Offline

Posts: 28


View Profile
« on: July 07, 2008, 05:36:38 AM »

Hi, sorry if i ask some stupid question, now i'm just a novice in python cause i'm new with python.
i'm just want to know can python create full application/program without use like pygtk/wxpython ?,
and everyday i practice coding python with ebook from "novice to proffesional python" but everytime i read and practice with one chapter and another chapter, what i learned in previous chapter easy forgotten when i step to the
next chapter, i hope i can get some advices and criticsm about this happen.
Thank's a lot and i'm sorry for this stupid question  Need Help
Logged
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #1 on: July 07, 2008, 05:49:05 PM »

everyone starts out as a newbie.
programming is like riding a bike, you can read all the books about bikes but until u get on the bike ........

Anyway think up a simple program you want to make.
Then just go make it.
Even simple programs that do something like calculate the area of a triangle can be good places to start.
Or quadratic equations etc.
Logged
nubie
Rookie
**
Offline Offline

Posts: 28


View Profile
« Reply #2 on: July 07, 2008, 10:45:00 PM »

Thank's for your reply Sir nop_90, do you think i must try to make simple program just use python at first not use
any like wxpython/etc ?. Thank's a lot for your advices Sir nop_90, it's very help me.
Logged
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #3 on: July 07, 2008, 11:59:28 PM »

Conventional wisdom saids that you should learn basic programming first before you learn GUI like wxpython.
Reason is that regular programs have a beginning and an end, while GUI never really does, it just reacts to events.
Also u have to learn 2 things, GUI and python.
Logged
arms
Expert
****
Offline Offline

Posts: 235



View Profile
« Reply #4 on: July 08, 2008, 08:07:32 PM »

sir nop_90 is correct, you should just focus on understnding what you are learning.
gui programming is not much fun, it is very tedious (even with tools like glade).
command line apps will cover all of what you need and most of what you want to do.

btw python is a good language to start with.
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #5 on: July 08, 2008, 09:08:01 PM »

btw python is a good language to start with.

I'm intrigued... why do you say that? I felt (when I overviewed the language) that it looked more idiosyncratic than, say, PHP or even C - although php has a lot of funkiness with various functions, the language syntax is about as straight ahead as you can get. Why do you think Python is a good place to start?

(f'reals asking, not sarcasm - and sir nop  ROFLMAO ROFLMAO ROFLMAO please fell free to jump back in as well)
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
arms
Expert
****
Offline Offline

Posts: 235



View Profile
« Reply #6 on: July 09, 2008, 08:55:47 AM »

it is idiosyncratic in a some ways but i think in a good way for someone starting out.
for example no semicolons or braces seems strange when coming from c-like languages like java or php but not if you're coming from vb.
for me the forced indentation seem strange at first but i got used to it fast because really who doesn't indent their code properly anyways? (except maybe perl guys)
for someone starting out, semicolons and braces don't feel like their missing because they never used them anyways, and it's a few less syntax errors they'll make.
the forced indentation encourages clean readable code.

but it's more other things like being able to go object oriented, but it's not forced. unlike java you need to create a class in it's own file just to do hello world.
basically you need to tell a student with no programming experience nevermind what a class is, never mind what public static void main is....etc.
php is better, but you need to set up a server, and understand request + response just a little bit. unlike python just run the script. it starts, it ends.

hello world is just
Code:
print "Hello World"
you can really go one step at a time.

later you can get into more advanced features of the language like list expressions, generators (i don't even know how to use them), etc.
you can code strictly object oriented, or not (like me, i've decended into mostly only using objects only as structs except a few other situations).

btw you can use semicolons, they actually end a statement like other languages, so does a line break.
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #7 on: July 09, 2008, 09:18:23 AM »

A fair explanation arms, thanks.

On reflection, I can see that a certain amount of syntactic cleanliness is a good thing for a beginner, such as no semi colons and forced indentation. And you're right, this does promote cleaner looking code in the future when someone is "on their own" in a free form editor.

Totally agree that Java is a clusterfuck from the word go, no sense sending a n00b there Wink

I would argue that the syntactic capabilities of the language make it more challenging for a beginner - it is harder to read intricate code IMO. So in this way I feel that PHP is still superior because it is rather incapable of complex articulation. But that being said, I like your argument as well about not having to understand request response and a server. Of course, you can simply run php from a shell just like python though, so this is not a completely clear issue.

All in all though an excellent argument.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
arms
Expert
****
Offline Offline

Posts: 235



View Profile
« Reply #8 on: July 09, 2008, 09:46:50 AM »

you are right about php from the command line i always forget that.
another advantage to php is that moving to other languages would be more natural, whereas coming from python everything looks ugly and messy. 
except Vomit vb or ruby.

still, if you are any kind of a programmer you should be able to overcome that quite easily.
Logged
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #9 on: July 09, 2008, 10:26:12 AM »

From what I've read, Ruby is probably the best if you want to get into that style of language. Easy to learn and encourages good habits.

I don't like its level of obfuscation from what's actually going on, but that's just me.

And once again, from what I've read. I've not really written a lick of Ruby code, and as much as I love Python, I've never done anything "heavy" with it.
Logged

hai
arms
Expert
****
Offline Offline

Posts: 235



View Profile
« Reply #10 on: July 09, 2008, 01:06:23 PM »

don't know much about ruby except it looks a bit like python.
i don't do anything really heavy so i've never come across a situation where i couldn't do the same thing in php, python, java or perl.
i just like python's clean, concise syntax and focus on readability and productivity.
Logged
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #11 on: July 09, 2008, 02:53:54 PM »

ruby was/is basically python's japanese cousin.
Before ruby on rails came allong it had little audience outside japan, the biggie for ruby is from the ground up it was designed with utf8 support.
Both are very similar, only big difference is ruby has closures,and relies heavily on them while python does not. http://www.artima.com/intv/closures.html
Also another biggie is ruby does not have native threads.

PHP basically was designed to convert C/C++ programmers to a scripting language.
As a result it has all these {}; crap like that, which are not for the programmer, but for the compiler.

Comparing PHP's shell to python's is like .........
Python's shell you can inspect the objects at runtime, you can see all class methods,variables etc.
There are numerous shells out there for python.
You also with python can do modify the classes at runtime.
Also python does have metaclasses.

Also when it comes to interfacing C/C++ code, shared libraries etc, into python, python has more ways then you can shake a stick at.

Also correct me if i am wrong, but PHP does not have a module system, as a result you end up with all the functions being dumped like a load of slop in one namespace.
PHP also has the require/include problem, again not a problem with python since it has a module system.
PHP objects are like thier C++/Pascal cousins, poorly designed etc.

PHP is good for web programming but that is about it, and much better then python in this area.

About the only thing that python lacks is proper macros (but then again every language compared to lisp/scheme has shit macros)
Also the python shell compared to lisps is primitive Wink

Logged
arms
Expert
****
Offline Offline

Posts: 235



View Profile
« Reply #12 on: July 09, 2008, 07:53:19 PM »

Quote
Also correct me if i am wrong, but PHP does not have a module system, as a result you end up with all the functions being dumped like a load of slop in one namespace.
this is a show stopper for me because i can't remember shit. remembering the namespace where i know stuff is, is a lot simpler for me than remembering all the functions.
it also make it easy for the ide to code complete if you are lazy like me.

php is only better than python for the web if you need to throw something up quick, mixing code and html.
for anything bigger than that, php has nothing over python except ease of deployment (drop it in a folder) and wide support on shared hosts.
even the argument that there is some many php developers & support is null because most of them are shit.
that's not to mean someone who programs in php is shit, just that there are so many weekend coders who learned a bit of php but never any programming.
php has a few points over python but python (django, pylons, etc.) are closing in. of course they will never overtake php in adoption but they're no RoR or j2eeshit.

but bottom line is good programmers in any language are better than shit programmers in language with x features.
Logged
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #13 on: July 10, 2008, 05:07:50 AM »

but bottom line is good programmers in any language are better than shit programmers in language with x features.
True.
But it is a heck of a lot easier if u are shit programmer like me, with language with lots of features Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!