GO37H3's n00b to 1337 programming/comp thread

  • Thread starter G037H3
  • Start date
  • Tags
    Thread
In summary: Like... George Boole? It seems difficult to imagine a situation where reading a book would be a bad thing. I do not think reading foundational texts on logic would be very directly applicable to the skills you need in computer programming, however, I think it would likely be personally enriching for other reasons.If you want something sort of foundational to read which is related to computer science, I would highly suggest http://mitpress.mit.edu/sicp/. This is a book by MIT press which is free to download and read online. It teaches a completely useless* programming language called LISP, but the language they use is not the important part, the
  • #1
G037H3
280
2
A quick note: when learning anything, I wish very strongly to focus on things that have cross-applications. I have little interest in focusing on learning specific skills, so when I state an interest in programming or closely related subjects, I mean that I wish to learn the metaskills associated with it. Logical, clear, precise programming that can be used even for supercomputers, not a language specific skill that teaches me nothing about computing in general. I don't see anything as a stand-alone field, so it is very important to me to learn very abstract/general aspects that I can use in the future when messing with supercomputers, or for other subjects within the "Engineering" label, such as architecture, drafting, materials science, etc.

So, all-encompassing and general concepts>specific things, k?

As I stated in the other thread (which went off-subject), I believe that Python is the best first language (for me at least). Because I have a tendency to focus on the global picture, a language that doesn't punish me for little mistakes is best. I know that C++ is 'stronger', whatever. It also has a $*%@load of rules and exceptions that I would rather avoid learning for now.

First couple of questions: I noticed a book by Boole at the library. Would that help with programming at all, or would it be best to wait a bit for that? A related question, what prerequisites are really useful? I know that logic helps, but should I seriously jump into logic right away? Anything else?

I am looking for a dull retail job right now. As I wish to make more $ than that, and to have flexible hours so that I may focus on other things (mathematics and German, for instance), I see programming as a way to ensure that I don't become homeless, as well as being a primary job until I begin consulting, or whatever else that my educational growth will allow. Right now I live on roughly $10K a year, so even a $20K year job/freelance work would be great for a year or two. :D So I figure that to develop the habit of working on programming and super closely related stuff, that I should devote a specific amount of time per day to it. For now, I think that 3 hours a day should be satisfactory, and that figure could easily be maintained even in the case that I get a job.

I personally feel that I'm almost unemployable, so my goal is to become employable through programming ASAP. ^_^ It's a contingency plan, so I can have control over my own life and ensure that I go to uni, etc.
 
Technology news on Phys.org
  • #2
I learned JAVA as my first programming language (only because I took AP Comp Sci) and when I look at some Python (not for learning, but I've seen my fair share of Python) I get confused because I'm so used to JAVA's complexity haha.

Oh and for you G037H3, If you haven't already gone to this site, http://www.codingbat.com" [Broken], it has a Python Section and a JAVA section for doing simple to complex problems and since you're learning Python I guess it can help :D.
 
Last edited by a moderator:
  • #3
G037H3 said:
First couple of questions: I noticed a book by Boole at the library. Would that help with programming at all, or would it be best to wait a bit for that? A related question, what prerequisites are really useful? I know that logic helps, but should I seriously jump into logic right away? Anything else?

Like... George Boole? It seems difficult to imagine a situation where reading a book would be a bad thing. I do not think reading foundational texts on logic would be very directly applicable to the skills you need in computer programming, however, I think it would likely be personally enriching for other reasons.

If you want something sort of foundational to read which is related to computer science, I would highly suggest http://mitpress.mit.edu/sicp/. This is a book by MIT press which is free to download and read online. It teaches a completely useless* programming language called LISP, but the language they use is not the important part, the important part is how they teach you how to think about programming.

You also might again if you're interested in the foundations of computer science want to try to read up on automata theory (finite automata, turing machines, etc). This will not be as useful when doing introductory programming but will help a lot with giving you the basis to think about the issues you will encounter if you start working with computer science at a higher level. (Unfortunately I don't have a specific book recommendation in this area.)

Also as long as you're interested in foundational logic texts, Russell and Whitehead's Principia Mathematica is actually surprisingly readable if you skip the proofs... again not very applicable to programming specifically.

* IN SUCH ENDEAVORS HAVE I WASTED MY YOUTH

Right now I live on roughly $10K a year, so even a $20K year job/freelance work would be great for a year or two. :D So I figure that to develop the habit of working on programming and super closely related stuff, that I should devote a specific amount of time per day to it. For now, I think that 3 hours a day should be satisfactory, and that figure could easily be maintained even in the case that I get a job.

If you are looking for small-dollar contracting work and you're already learning python, I suggest once you have some basics out of the way you start trying to learn a web framework such as Django or Pylons. That's where the work is likely to be if you're working at that level.

Also really I think you are probably more likely to be able to get into contract work after you've had at least some entry-level actual employment in the field. The hard part of contracting is not actually the programming but rather your relationship with the customer, and knowing what the customer needs isn't something you're going to learn from a book.
 
  • #4
Are you on Windows? I found a video that can help you get started:


There appear to be a bunch of Python tutorials on youtube.
 
Last edited by a moderator:
  • #5
MysticDude said:
I learned JAVA as my first programming language (only because I took AP Comp Sci) and when I look at some Python (not for learning, but I've seen my fair share of Python) I get confused because I'm so used to JAVA's complexity haha.

Oh and for you G037H3, If you haven't already gone to this site, http://www.codingbat.com" [Broken], it has a Python Section and a JAVA section for doing simple to complex problems and since you're learning Python I guess it can help :D.

I sincerely believe that Python is better as a first language, because the focus is on applications, not explaining syntax. It's self-evident.

Thanks for the site, I bookmarked it.

Like... George Boole? It seems difficult to imagine a situation where reading a book would be a bad thing. I do not think reading foundational texts on logic would be very directly applicable to the skills you need in computer programming, however, I think it would likely be personally enriching for other reasons.

If you want something sort of foundational to read which is related to computer science, I would highly suggest Structure and Interpretation of Computer Programming. This is a book by MIT press which is free to download and read online. It teaches a completely useless* programming language called LISP, but the language they use is not the important part, the important part is how they teach you how to think about programming.

You also might again if you're interested in the foundations of computer science want to try to read up on automata theory (finite automata, turing machines, etc). This will not be as useful when doing introductory programming but will help a lot with giving you the basis to think about the issues you will encounter if you start working with computer science at a higher level. (Unfortunately I don't have a specific book recommendation in this area.)

Also as long as you're interested in foundational logic texts, Russell and Whitehead's Principia Mathematica is actually surprisingly readable if you skip the proofs... again not very applicable to programming specifically.

* IN SUCH ENDEAVORS HAVE I WASTED MY YOUTH

Yes, George Boole. The book was one of his works, and it was printed ~70 years ago. I think that logic would help for CS/programming...it would provide more of a direct problem solving method than arriving at a fully-formed solution. In short, logic allows for the decomposition of problems. :3 But if I am to fully appreciate his work, I assume that I would require a more foundational logic text to begin with. :/

I know about SICP (people on /g/ talk about it every once in a while), but I believe that I should focus on Python+CS, as dispersal of interest/focus is a very real possibility, because of my wide-ranging interests and talents.

Yes, I think that a study of CS would be very useful as a paired study with Python+programming, focusing on architecture and similar subjects. >.< I'm not sure where I should start with that, either.
"[URL [Broken]
Maybe this?[/URL]

I don't want to study something, and then come back to it later. I want to do a detailed study the first time, and understand it in-depth, much like I am doing with Euclid's Elements.

If you are looking for small-dollar contracting work and you're already learning python, I suggest once you have some basics out of the way you start trying to learn a web framework such as Django or Pylons. That's where the work is likely to be if you're working at that level.

I don't know what those are. ;o

Also really I think you are probably more likely to be able to get into contract work after you've had at least some entry-level actual employment in the field. The hard part of contracting is not actually the programming but rather your relationship with the customer, and knowing what the customer needs isn't something you're going to learn from a book.

I'm okay with entry-level or whatever, as long as working conditions are reasonable. But I'd rather be paid $10 an hour to do general stuff and learn tons about CS and programming than be paid $25 to do specific work that only teaches me about that specific language/system/program/whatever.

Are you on Windows?

Win Vista Ultimate 64

I figured out the install (and just installed it); I had to discern whether to install the x86 or x86-64, something about bits I guess. I'll learn that later.

There appear to be a bunch of Python tutorials on youtube.

I will definitely take a look, though I do believe I've found http://www.openbookproject.net/thinkCSpy/#" [Broken]
 
Last edited by a moderator:
  • #6
G037H3 said:
I sincerely believe that Python is better as a first language, because the focus is on applications, not explaining syntax. It's self-evident.
Well when I was put into AP Comp Sci it is not like we had a choice. Plus with the Android OS being built on Java, I could do something with it as I am always expanding my knowledge with Java.

Good Luck with your life :D
 
  • #7
Here you go:

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/index.htm" [Broken]
 
Last edited by a moderator:
  • #8
fluxions said:
Here you go:

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/index.htm" [Broken]

Thanks.

I don't know which IDE to use. :(
 
Last edited by a moderator:
  • #9
G037H3 said:
I have little interest in focusing on learning specific skills, so when I state an interest in programming or closely related subjects, I mean that I wish to learn the metaskills associated with it.

Ah, yes. You want to learn the metaskills of digging without touching a shovel. Unfortunately there is no easy way. You have to get your hands dirty.

In my opinion the best languages to train your metaskills are usually those that have no much general use (Lisp, Prolog, Forth).

Otherwise the languages are pretty the same. What differs is they all use different libraries to help the development of software. So, if you want to use a language for practical purposes you need to get specific.
 
  • #10
G037H3 said:
I don't know which IDE to use. :(

You don't need an IDE to get started. Just use a plain text editor and the command line. That will force you to become familiar with what files you're using and where they are, and exactly what steps are involved in the compilation/linking process.

When your programs get big enough that an IDE actually becomes useful, that's the time to learn how to use one.
 
  • #11
G037H3 said:
Thanks.

I don't know which IDE to use. :(

I use IDLE, which comes with the Python distribution. It should work just fine for you while you are still learning the basics.
 
  • #12
Upisoft said:
Ah, yes. You want to learn the metaskills of digging without touching a shovel. Unfortunately there is no easy way. You have to get your hands dirty.

In my opinion the best languages to train your metaskills are usually those that have no much general use (Lisp, Prolog, Forth).

Otherwise the languages are pretty the same. What differs is they all use different libraries to help the development of software. So, if you want to use a language for practical purposes you need to get specific.

I mean that I want to focus on algorithms+data structures.
You don't need an IDE to get started. Just use a plain text editor and the command line. That will force you to become familiar with what files you're using and where they are, and exactly what steps are involved in the compilation/linking process.

When your programs get big enough that an IDE actually becomes useful, that's the time to learn how to use one.

I know I don't *need* one. But I want one. Preferably with a black background and pretty colors. :O
I use IDLE, which comes with the Python distribution. It should work just fine for you while you are still learning the basics.

I'll see what other people think of it as well. >.<
 
  • #13
G037H3 said:
I mean that I want to focus on algorithms+data structures.
<

The standard 'introductory' book on algorithms is https://www.amazon.com/dp/0262033844/?tag=pfamazon01-20. But attempting to read that book before having some basic programming experience and sufficient mathematical sophistication is futile. When you're ready, there is an OCW based on the book.


G037H3 said:
I'll see what other people think of it as well. >.< <

What does it matter what other people think? Try it, and see what you think.
 
Last edited by a moderator:
  • #14
G037H3;2960145 I have little interest in focusing on learning specific skills said:
Why waste time with metaskills when you can learn meta-metaskills?
 
  • #15
fluxions said:
The standard 'introductory' book on algorithms is https://www.amazon.com/dp/0262033844/?tag=pfamazon01-20. But attempting to read that book before having some basic programming experience and sufficient mathematical sophistication is futile. When you're ready, there is an OCW based on the book.




What does it matter what other people think? Try it, and see what you think.

Yeah, I know I have to go through calculus->discrete mathematics before I can do advanced CS Knuth-type stuff. I already said that I want a black background and colors. :/
 
Last edited by a moderator:
  • #16
fluxions said:
Why waste time with metaskills when you can learn meta-metaskills?

My approach is logical. I have a lot to accomplish in a short amount of time.
 
  • #17
G037H3 said:
I have a lot to accomplish in a short amount of time.

Then start programming and stop worrying about your IDE having pretty colors.
 
  • #18
fluxions said:
Then start programming and stop worrying about your IDE having pretty colors.

I figured it out -_-

But if you want to practice piano, it's not good to practice on a piano that's out of tune. :)
 
  • #19
G037H3 said:
I figured it out -_-

But if you want to practice piano, it's not good to practice on a piano that's out of tune. :)

Your piano is not out of tune. You just wanted red and green keys instead of black and white. :smile:
 
  • #20
Math Is Hard said:
You just wanted red and green keys instead of black and white. :smile:

And a Liberace-style outfit instead of jeans and a T-shirt. :tongue2:
 
  • #21
Math Is Hard said:
Your piano is not out of tune. You just wanted red and green keys instead of black and white. :smile:

well if I'm playing in the dark, I'd like the keys to glow...
 
  • #22
If I have an IDE, for the IDE to check the syntax of what I'm writing, why would that necessitate changing the compiler? I was told that it would, but I don't see why. :/
 
  • #23
Get stuck in. Do some programming, start with the basics ("hello world") and work your way up. There are plenty of tutorials out there and they are what you need.

I personally use Visual Basic to do all my programming. It does the job nicely.

You seem to want an autocorrect facility in your text editor. As helpful as these can be, you will become dependent on it and it can hinder your learning as you will stop concentrating and just let it keep covering your mistakes. I recommend going straight in with a bare text editor (I use gedit - it is free, you can customise font and background colour - plus you can set it to various languages to help you with syntax etc).
 
  • #24
jarednjames said:
Get stuck in. Do some programming, start with the basics ("hello world") and work your way up. There are plenty of tutorials out there and they are what you need.

I personally use Visual Basic to do all my programming. It does the job nicely.

You seem to want an autocorrect facility in your text editor. As helpful as these can be, you will become dependent on it and it can hinder your learning as you will stop concentrating and just let it keep covering your mistakes. I recommend going straight in with a bare text editor (I use gedit - it is free, you can customise font and background colour - plus you can set it to various languages to help you with syntax etc).

I'm working through the first chapter today; I intend on posting what I've learned before I go to sleep tonight.

VB seems to be pretty heavily disparaged.

I don't *want* one, I want to understand why the statement in the last post I made is the case.
 
  • #25
G037H3 said:
VB seems to be pretty heavily disparaged.

I like it. It works well for me and my applications of it. It all depends what you are trying to do. I build apps for use within a Microsoft Windows environment with easy access to api's for Office products and various other windows components, it is exactly what I need.

You should choose your language based on requirements.
I don't *want* one, I want to understand why the statement in the last post I made is the case.

Was only letting you know what I use and how it may be useful for you. And also to point out the problems with having the computer autocorrect for you when attempting to learn.

If you really want to get stuck in and into paying work as quick as possible, keep it simple. Start with HTML and then work on PHP. Shouldn't take you long to get the basics (enough work and you'll have it in days), they are relatively easy to learn, especially HTML. Once you've done that, even with only the basics it is easy to get straight into website development. Do a few simple jobs, continue learning and start taking on the more complex oportunities.

I will say this, although I don't personally like java it is a very powerful language and would be one of the best to learn.
 
  • #26
I think G037H3's heart is set on learning Python, so let's focus on that for now. I don't have experience with it, but I have heard many people say that it is quite suitable for a first language.
 
  • #27
Math Is Hard said:
I think G037H3's heart is set on learning Python, so let's focus on that for now. I don't have experience with it, but I have heard many people say that it is quite suitable for a first language.

correct :eek:
 
  • #28
I was referring more to the desire to earn a quick buck. Web design is one of the best ways to go about this in my experience.
I will limit all future input to python only. Although the op should specify this limitation to the discussion as so far much of it hasnt met that requirement.
 
  • #29
Day 1 of Python:

A high-level language (Python is an example) most be processed into low-level language before it can run. A low-level language (machine or assembly languages) is the only type of language that a computer can execute programs in. Therefore, a program written in a high-level language must be processed into a low-level language before it can run. High-level languages are portable, meaning that programs written in them can run on other computers with zero to few modifications. Low-level languages are specialized ('close to the metal', 'close to the hardware') and must be rewritten for different kinds of computers.

Two kinds of programs process high-level languages into low level languages: interpreters and compilers.

An interpreter reads a high-level program and executes it, processing the program a little at a time, alternatively reading lines and performing computations:

Source code -> Interpreter -> Output

A compiler reads and translates the whole program before the program starts running. In this case, the high-level program is called the source code, and the translated program is called the object code or executable. Once a program is compiled, it can be executed repeatedly without further translation:

Source code -> compiler -> Object code -> Executor -> Output

Many languages use both processes. Programs are first compiled into a lower-level language called bytecode(pyc files for Python), and then interpreted by a program called a virtual machine.

There are two ways to use the Python interpreter: shell mode and script mode. In shell mode, statements are typed into the Python shell and the interpreter immediately posts the result. Shell mode begins with the Python prompt, ">>>", and is good for testing short bits of code, because it provides immediate feedback.

In script mode, a program is written into a file and the interpreter is used to execute the contents of the file. This is called a script. Anything longer than a few lines should be put into a script.

Files that contain Python programs end in .py

A program is a sequence of instructions that specifies how to perform a computation. A few basic instructions are:
  • input: get data from keyboard, file, or something else
  • output: display data on screen or send data to a file or elsewhere
  • math: perform basic mathematical functions
  • conditional execution: check for certain conditions and execute the appropriate sequence of statements
  • repetition: perform the same actions repeatedly, usually involving some sort of variation

Programming errors are called bugs, and the process of tracking down and correcting bugs is called debugging.

Three kinds of errors can occur in a program:

  • syntax errors: A program can only be executed if it is syntactically correct, otherwise an error message is returned. Syntax is the structure of a program and the rules about that structure. A syntax error occurs when a rule about the program structure is violated.
  • runtime errors: An error does not appear until the program is run; runtime errors are also called exceptions, usually indicating that something exceptional (and bad) has happened.
  • semantic errors: The program will successfully run, and doesn't generate an error message, but it will do the wrong thing (something other than what was intended). With a semantic error, the meaning of the program (its semantics) is wrong. To identify a semantic error, it is required to work backwards from the program output.

Debugging: information about errors -> inference -> hypothesis -> program modification

Natural languages
are languages that people speak, which evolved naturally. Formal languages are languages designed for specific applications.

Programming languages are formal languages that have been designed to express computations. Formal languages usually have strict rules about syntax.

Syntax rules pertain to either tokens or structure.

Tokens are the basic elements of a language, analogous to a word in a natural language.

The structure of a statement is the way in which tokens are arranged.

Examination and analysis of the structure of a program is called parsing.

Lets compare natural and formal languages.
  • Ambiguity: natural languages have ambiguity; formal languages are nearly or completely unambiguous
  • Redundancy: natural languages have redundancies/nuances; formal languages are more concise
  • Literalness: natural languages employ idioms and metaphors; formal languages mean exactly what they say
The meaning of a computer program is unambiguous and literal, and can be completely understood through analysis of the tokens and structure of the program.

Hello world:

Code:
>>> print ("Hello, World!")

The output should be:

Code:
Hello, World!
 
Last edited:
  • #30
If anyone spots any errors, or has anything to say about the content of "Day 1 of Python", feel free to correct or educate me. =)
 
  • #31
Ah, good old "Hello world".

Don't take this the wrong way, but it looks like you've just copied a textbook.

I'd say your best bet is to only post the code you want checked. Otherwise this thread is going to go crazy with every little detail of what you have read.

Otherwise, a good start. Good luck with learning it.

Out of curiosity, what sort of development are you looking to do with python in the future?
 
  • #32
G037H3 said:
Files that contain Python programs end in .py
This is only convention, not a necessity. My python scripts usually do not have any extension, but I do Python mainly under Linux.

About debugging. Things can get very hairy sometimes. Experience is quite valuable when you have to fix bugs. Don't be discouraged if you can't find where a bug is hiding. Even most experienced people can spend weeks to fix a bug.
 
  • #33
jarednjames said:
Ah, good old "Hello world".

Don't take this the wrong way, but it looks like you've just copied a textbook.

I'd say your best bet is to only post the code you want checked. Otherwise this thread is going to go crazy with every little detail of what you have read.

Otherwise, a good start. Good luck with learning it.

Out of curiosity, what sort of development are you looking to do with python in the future?

I already stated I was going through a book. I just condensed the material and rewrote some of it, to show what I've learned so far.

Maybe I *want* to show what I've read. It's my thread.

Iunno. Maybe Django.
 
  • #34
Upisoft said:
This is only convention, not a necessity. My python scripts usually do not have any extension, but I do Python mainly under Linux.

About debugging. Things can get very hairy sometimes. Experience is quite valuable when you have to fix bugs. Don't be discouraged if you can't find where a bug is hiding. Even most experienced people can spend weeks to fix a bug.

I can't change it now. :( Maybe if I ask a mod, they'll let me edit it. ._.

And I sort of wish to avoid spending that amount of time messing with mistakes. :)
 
  • #35
G037H3 said:
And I sort of wish to avoid spending that amount of time messing with mistakes. :)

"Messing with mistakes" -- debugging -- comes with the territory. Being able to write good code that has no bugs requires attention to detail, among other attributes.
 
<h2>1. What is the purpose of "GO37H3's n00b to 1337 programming/comp thread"?</h2><p>The purpose of "GO37H3's n00b to 1337 programming/comp thread" is to provide a comprehensive guide for beginners to learn programming and computer science concepts, as well as tips and tricks for becoming a more skilled and efficient programmer.</p><h2>2. Who is the target audience for this thread?</h2><p>The target audience for this thread is individuals who are new to programming and computer science, or those who want to improve their skills and knowledge in these areas.</p><h2>3. What programming languages are covered in this thread?</h2><p>This thread covers a variety of programming languages, including but not limited to Python, Java, C++, and HTML/CSS. It also includes general concepts that can be applied to any programming language.</p><h2>4. Are there any resources or materials provided in this thread?</h2><p>Yes, "GO37H3's n00b to 1337 programming/comp thread" includes links to helpful resources and materials such as online tutorials, practice problems, and recommended books for further learning.</p><h2>5. Can I ask questions or seek help in this thread?</h2><p>Yes, this thread encourages active participation and discussion. You can ask questions and seek help from other members, as well as share your own insights and experiences.</p>

1. What is the purpose of "GO37H3's n00b to 1337 programming/comp thread"?

The purpose of "GO37H3's n00b to 1337 programming/comp thread" is to provide a comprehensive guide for beginners to learn programming and computer science concepts, as well as tips and tricks for becoming a more skilled and efficient programmer.

2. Who is the target audience for this thread?

The target audience for this thread is individuals who are new to programming and computer science, or those who want to improve their skills and knowledge in these areas.

3. What programming languages are covered in this thread?

This thread covers a variety of programming languages, including but not limited to Python, Java, C++, and HTML/CSS. It also includes general concepts that can be applied to any programming language.

4. Are there any resources or materials provided in this thread?

Yes, "GO37H3's n00b to 1337 programming/comp thread" includes links to helpful resources and materials such as online tutorials, practice problems, and recommended books for further learning.

5. Can I ask questions or seek help in this thread?

Yes, this thread encourages active participation and discussion. You can ask questions and seek help from other members, as well as share your own insights and experiences.

Similar threads

  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
8
Views
832
  • Programming and Computer Science
Replies
1
Views
705
  • Programming and Computer Science
12
Replies
397
Views
13K
  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
Replies
32
Views
2K
  • Programming and Computer Science
Replies
3
Views
1K
Back
Top