Still Going Nowhere With Python..... :(

B

blackneos940

Guest
Well, I made a simple Web Browser that rides on top of your default one, and also a Phonebook, but beyond that, and despite going to Github (I can't understand the Programs there)....... Sigh, I just don't seem to be going anywhere..... Every time I think of making a Program, I just draw a BLANK..... :( Bear in mind, I've been at Python for less than a Year, but..... I don't know.... :\ I wanted to get into Security, and become a Hacker, (I started thinking of ways to creatively do non-Computer-related things, for instance), but as far as Computers.....? People say I'm so smart, but compared to anybody ELSE.....? Eh.... D: Perhaps someone on here could help me.....? I don't have any money, but I COULD do something in return..... :) Sometimes, it's HARD learning on your own, y'know.....? :)
 


Ok first thing I sense in your message is that you need to believe you can do it. Secondly understand that good programmers got that way by getting it wrong quite a bit and building a foundation on what was done wrong versus this is the correct way to address the problem. Third suggestion is that you post the python code you are talking about so that others can offer insight into the code. Good luck!
 
Ok first thing I sense in your message is that you need to believe you can do it. Secondly understand that good programmers got that way by getting it wrong quite a bit and building a foundation on what was done wrong versus this is the correct way to address the problem. Third suggestion is that you post the python code you are talking about so that others can offer insight into the code. Good luck!

I know..... I guess it's just BECAUSE I'm new at it..... :D So..... There is more than one correct way to do things.....? :3 Sounds like my way of THINKING..... :D Just like how a Hacker WOULD think..... :D Well, it's not that I have any PARTICULAR Program that I'm having trouble with, but I DO seem to have trouble with the def command, in that using it in this text-based Game of mine seems to cause it to nor run at ALL in the Terminal (meaning it has no syntactical errors, I believe)...... :)
 
As with anything, it takes time to learn a programming language well enough to be competent with it. It also takes a bit of dedication - reading books/tutorials/documentation, asking questions, writing programs, making mistakes, and most importantly - learning from them!

When it comes to learning your first programming language, alongside the basic syntax of the language, you also need to learn some other fundamental skills that are language independent. Things like learning how to think algorithmically and break problems down into smaller, logical chunks; using procedural and/or object oriented program design; design patterns; data structures; debugging skills etc. Once you have these fundamental skills nailed, learning to program in other programming languages simply becomes a case of learning the syntax of the language and any other language specific quirks/oddities - at least, for the most part anyway!

WRT learning Python, find a good book or tutorial that goes right from the beginning and teaches the fundamentals of programming (see the transferable skills listed above).

Once you feel that you have a good grasp of program design and you are comfortable designing programs and implementing them in Python code, the next step is to start looking into some of the (many) 3rd party GUI libraries that have Python bindings (tkinter, QT, wxWidgets etc), or perhaps a game engine like pygame or SFML (Small Fast Media Library); And start writing some graphical/desktop applications.

Don't try to learn all of these frameworks at once, just pick one or two to focus on. Most Python libraries have really good documentation, including tutorials and example applications that you can study and learn from. There are also a wealth of ebooks available online (both free and commercial) - that cover using various libraries in Python.

When it comes to learning how to use any 3rd party library/module, searching for documentation, tutorials and/or code examples is just about all you need to do before plugging it into your code.

Once you are comfortable designing/implementing GUI code and using other 3rd party libraries/modules in Python, you're pretty much there - you've pretty much mastered the language!
 
Last edited:
Also, when it comes to looking at other peoples code, that's a completely different kettle of fish. Don't expect to understand all of it right away. Reading and understanding somebody else's code can be extremely tricky in any language. Especially if it is a large, complex project with a large code-base spread over lots of different modules!

Even with a small project with clean looking code, containing sane, descriptive variable names and comments, you'll probably still have a high count of WTF's per minute when you first start reading it. Again, it just takes time, persistence and a methodical, analytical approach in order to understand what is going on and why.

Sometimes you might get lucky and you'll find a project that has a clean code-base, and has great documentation on the design and implementation of the project (class hierarchies, interactions between various modules that make up the program etc). So looking through the source and understanding it isn't too bad. But this is not often the case!

In lieu of any decent design documentation, I usually start by looking at the main module/source file. The one that controls everything, and try to get a feel for what is going on at the highest level; before gradually working my way down into the guts of the various classes/modules used in the main program, to understand the more specific parts of the functionality.

Taking notes can also aid in your understanding of a programs source code. Reading somebody else's code is basically an exercise in reverse-engineering the program. You gradually build a picture of the structure of the program.

Another way to understand code is to run the program through a debugger. Set some breakpoints at parts of the code that you want to examine. Then you use the program until you trigger your breakpoint and you can examine the state of any variables of interest and step through the code to see any modifications that are made and try to understand what is happening and why.

Finally, if any of the developers of the project in question are contactable online, then you also have the option to talk to them directly via email, mailing lists, IRC etc. and ask questions about the design of the project and the structure of the source code. They would be best placed to help you to read and understand their code!
 
Though I lack the attention span to respond to each part of your post, rest assured, I read ALL of it, and will remember it next time I'm Trollin' the Interwebs in search of Python-based Projects..... :)
 
Heh heh, yeah sorry about that. A lot of my posts tend to be a bit TLDR, but there was a lot of information I was trying to convey.
 
Heh heh, yeah sorry about that. A lot of my posts tend to be a bit TLDR, but there was a lot of information I was trying to convey.
No worries, good sir..... :3 Rest assured, I read it, and am applying it as we speak..... :3 But I do Python3 mainly..... When will Pygame be imported (pun intended :D) to Python3.....? :)
 
No worries, good sir..... :3 Rest assured, I read it, and am applying it as we speak..... :3 But I do Python3 mainly..... When will Pygame be imported (pun intended :D) to Python3.....? :)
http://www.pygame.org/wiki/python3porting?parent=index

*Note: I was able to build pygame from the bitbucket repository (unstable) for python 3.4 on Ubuntu 14.04.1 Some of the tests failed but I think it is because of the developmental state.
 
Last edited:
http://www.pygame.org/wiki/python3porting?parent=index

*Note: I was able to build pygame from the bitbucket repository (unstable) for python 3.4 on Ubuntu 14.04.1 Some of the tests failed but I think it is because of the developmental state.

Ah, ok..... ^^ I'll look into it....... :) Unfortunately, my Chromebook charger is malfunctioning (like the last one did), and I have t9o use my ASUS Laptop with Windows..... >.> Ah well, I hear that my PS3 can have Linux on it..... :)
 
Ah, ok..... ^^ I'll look into it....... :) Unfortunately, my Chromebook charger is malfunctioning (like the last one did), and I have t9o use my ASUS Laptop with Windows..... >.> Ah well, I hear that my PS3 can have Linux on it..... :)
at one time the PS3 could run Linux. Sony released a patch...
 
at one time the PS3 could run Linux. Sony released a patch...
Yeah, I heard..... :( I like playing COD and FF games, along with GTA IV and Tomb Raider for the PS1, but how awesome would it be to run Linux off of it.....? :3 I heard of a Jailbreak to REVIVE that dead feature..... :D But how do people like Geohot even know what code to WRITE that will circumvent the PS3's security.....? :( I'd like to do it with Python, since it's basically written WITH C..... :)

(edit: Final Fantasy games are also abbreviated to FF) :)
 
Last edited:
Code:
print ("Enter items now:\n")

Shopping_List = input()

with open ("Shopping_List.txt", "wt") as output:

    output.write(Shopping_List)

    output.close()
I DID it!..... :D It's a Shopping List generator, and turns your input into a Text File with the items on your Shopping List!.... :3 As with all of my Programs, it's Open Source..... :3 Hmm..... I wonder....... What could you guys do to IMPROVE upon it.....? :3
 
I do not know how you have learned Python, but you may want to read the official documentation thoroughly. Python3 is a better choice than Python2 (in my opinion).

https://www.python.org/
https://docs.python.org/3/

Some of the Python cheatsheets that I have made can be found at http://dcjtech.info/topic/free-pdf-cheatsheets/

Some Python libraries that I have made are perfect for studying or using in your own programs (LGPLv3) - http://dcjtech.info/topic/pybooster/

One of my favorite websites (http://learnxinyminutes.com/) has a helpful page for Python3 - http://learnxinyminutes.com/docs/python3/
 
I do not know how you have learned Python, but you may want to read the official documentation thoroughly. Python3 is a better choice than Python2 (in my opinion).

https://www.python.org/
https://docs.python.org/3/

Some of the Python cheatsheets that I have made can be found at http://dcjtech.info/topic/free-pdf-cheatsheets/

Some Python libraries that I have made are perfect for studying or using in your own programs (LGPLv3) - http://dcjtech.info/topic/pybooster/

One of my favorite websites (http://learnxinyminutes.com/) has a helpful page for Python3 - http://learnxinyminutes.com/docs/python3/


Actually, I'm not sure if I asked you already, but would it be okay if you could help me.....? We could go through the stuff I ALREADY know, and then move onto the stuff that I have YET to learn..... :3 In return, I could write an Article for you again...... :3 Also, I use Python3 so there won't be any confusion and stuff..... :D
 
Actually, I'm not sure if I asked you already, but would it be okay if you could help me.....? We could go through the stuff I ALREADY know, and then move onto the stuff that I have YET to learn..... :3 In return, I could write an Article for you again...... :3 Also, I use Python3 so there won't be any confusion and stuff..... :D

Sure, my email address is [email protected]
 
Code:
print ("Enter items now:\n")

Shopping_List = input()

with open ("Shopping_List.txt", "wt") as output:

    output.write(Shopping_List)

    output.close()
I DID it!..... :D It's a Shopping List generator, and turns your input into a Text File with the items on your Shopping List!.... :3 As with all of my Programs, it's Open Source..... :3 Hmm..... I wonder....... What could you guys do to IMPROVE upon it.....? :3

Here is an suggestion about your code. "output.close()" is not needed since the file will close after the "with" construct ends.
 
Here is an suggestion about your code. "output.close()" is not needed since the file will close after the "with" construct ends.
Thanks for agreeing to teach me..... :3 I'll amend your suggestions as well..... :3 God, I Love this community..... :D I don't know what I'd DO without my friends here..... :( I'll send you an Email now!....... ^^ When you're free, let's DO THIS..... :)
 
One way that helped me learn my first programming language (VBA then VB6) was to write psuedo-code. That is where you write out in plain English what you want, step by step, the program to do. For instance:

#declare variables
#assign values to variables
#if the values are not correct, inform user and have them check values
#insert the variables into the database
#update the user if the all went well

Then write the logic underneath each line of the psuedo-code. You will learn easier if you write in small segments and write re-usable code. That means that you can use that small snippet of code in other places. Plus, writing it out in psuedo-code you take care of commenting. I get really lazy when it comes to commenting and it has come back and kicked me in the patootie a few times. So be sure you always comment in some way what you are trying to do. (This also helps others who may try and help see what is wrong with your code)

I am new to Linux, so I need to learn python and C/C++. I was going to tackle python first, so if you would like to have a study-buddy I would be glad to be yours. We can learn together and who knows, we might create something really awesome that other people can use to make their lives easier. :p
 

Members online


Top