Getting Into Programming

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
Chfan
Posts: 2141
Joined: Sun Oct 19, 2008 10:26 pm UTC
Location: American East Coast

Getting Into Programming

Postby Chfan » Tue Feb 03, 2009 9:50 pm UTC

Hello, coding forum.

I'm currently a freshman in high school. I want to take Programming as an elective next year. However, it spans three courses which end in AP Computer Science. This would take up an elective slot for the rest of my school career and would probably only teach in C or something. I really want to get into programming, but I'm also taking the Spanish line of courses and there are some electives later on that this would hamper. I also wouldn't be able to get some of the material from these prospective electives somewhere else.

So, my question is: how can I get into coding/programming?
Just FYI, the guy isn't avatar isn't me. But he seems pretty cool.

Filius Nullius
Posts: 72
Joined: Sat Apr 05, 2008 12:24 am UTC

Re: Getting Into Programming

Postby Filius Nullius » Tue Feb 03, 2009 10:16 pm UTC

It really just depends on what you want to do, after you figure that out look around online and find some tutorials and/or ebooks to use as aides and begin teaching yourself what you want to learn.

btilly
Posts: 1877
Joined: Tue Nov 06, 2007 7:08 pm UTC

Re: Getting Into Programming

Postby btilly » Tue Feb 03, 2009 10:41 pm UTC

Take the course now, and you can decide later whether you'd prefer to be taking the Spanish electives, or more programming. Or something else. You're only a freshman, you don't have to have your life planned out yet!

Also there are plenty of online resources around if you want to try some programming on your own. In fact I'd suggest that you do this. Good programmers tend to do a lot of learning on their own, and there is no time like the present to learn the habit of not waiting to be spoon fed stuff by the academic system.
Some of us exist to find out what can and can't be done.

Others exist to hold the beer.

mammothman
Posts: 15
Joined: Fri Aug 24, 2007 6:52 am UTC
Location: Connecticut
Contact:

Re: Getting Into Programming

Postby mammothman » Tue Feb 03, 2009 11:45 pm UTC

I started with PHP when I was 13, now I'm onto Python and it's a lot of fun. GUI programming is simple with wxPython at least, its easy to hook into MySQL and sockets with simple to use libraries...theres pretty much a library for everything in python. The only problem is the syntax is so much different from other languages it can confuse you switching between two, but I found it easy to convert simple Python code to simple C code, because python still provides the basic structure and all...and teaches you the basic theory of how you can control the computer with programming.

The hardest part I found about learning any programming language...is finding something to program. Then I found Project Euler last week...it gives you a goal to work towards that you can use with almost any language and as the problems get harder they require you to be more resourceful with what tools you know and you learn some new tricks.

So, pick a language you find interesting and if you have some simple ideas to start programming just go for it. Start reading online tutorials, e-books, documentation and find some examples maybe to read the source code and understand the structure of how things work in the language.
look chat date touch grep make unzip strip view finger mount fcsk more fcsk yes spray umount sleep

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: Getting Into Programming

Postby Shriike » Wed Feb 04, 2009 12:12 am UTC

If I may just throw in my 2 cents, if you're going to be teaching yourself programming, Apress is a great brand of books in my opinion. Also Python is a great language to start with, but in my opinion if you plan on writing gui's wxPython isn't really that simple, thanks to Visual Studio, C# makes gui programming really easy (though if you're fine with a command line then Python would be easier to learn).
Image

mammothman
Posts: 15
Joined: Fri Aug 24, 2007 6:52 am UTC
Location: Connecticut
Contact:

Re: Getting Into Programming

Postby mammothman » Wed Feb 04, 2009 12:19 am UTC

The only problem I have with C# and the .NET stuff, is that you cant make executables out of it. But I found that C# was harder to learn than python personally, and they also require the user to have the .NET Framework installed, which can be a hassle. I was never able to code anything particularly useful in C# because finding libraries and using them seemed complicated.
look chat date touch grep make unzip strip view finger mount fcsk more fcsk yes spray umount sleep

Shriike
Posts: 127
Joined: Mon Jan 26, 2009 3:27 am UTC
Location: Ohio

Re: Getting Into Programming

Postby Shriike » Wed Feb 04, 2009 12:37 am UTC

mammothman wrote:But I found that C# was harder to learn than python personally

This is like the most important thing, I agree 100%, C# makes GUI programming easier, but everything else is easier in Python (in my opinion too)
Image

User avatar
Chfan
Posts: 2141
Joined: Sun Oct 19, 2008 10:26 pm UTC
Location: American East Coast

Re: Getting Into Programming

Postby Chfan » Wed Feb 04, 2009 1:32 am UTC

btilly wrote:Take the course now, and you can decide later whether you'd prefer to be taking the Spanish electives, or more programming. Or something else. You're only a freshman, you don't have to have your life planned out yet!

Also there are plenty of online resources around if you want to try some programming on your own. In fact I'd suggest that you do this. Good programmers tend to do a lot of learning on their own, and there is no time like the present to learn the habit of not waiting to be spoon fed stuff by the academic system.


Actually, I'm already far into the Spanish chain, so I'm more asking now how I can get into it on my own.

I know I'm just a freshman, but I'd still like to get some ideas for if I decide to do it by myself. Thanks to everyone for your suggestions so far.
Just FYI, the guy isn't avatar isn't me. But he seems pretty cool.

mammothman
Posts: 15
Joined: Fri Aug 24, 2007 6:52 am UTC
Location: Connecticut
Contact:

Re: Getting Into Programming

Postby mammothman » Wed Feb 04, 2009 3:42 am UTC

If you want to be ahead in the class...go with Java because that is most likely what they will be teaching you. Do you have any specific ideas in mind what you'd like to do with programming? Might make it easier for people to make suggestions.
look chat date touch grep make unzip strip view finger mount fcsk more fcsk yes spray umount sleep

User avatar
Chfan
Posts: 2141
Joined: Sun Oct 19, 2008 10:26 pm UTC
Location: American East Coast

Re: Getting Into Programming

Postby Chfan » Wed Feb 04, 2009 7:55 pm UTC

I just want to start with a basic programming language, learn how to use it, maybe join Project Euler. Then I want to work my way up, maybe learn some more sophisticated languages like Python or Perl, and just in general, for fun, learn about programming.
Just FYI, the guy isn't avatar isn't me. But he seems pretty cool.

User avatar
Emu*
Posts: 689
Joined: Mon Apr 28, 2008 9:47 am UTC
Location: Cardiff, UK
Contact:

Re: Getting Into Programming

Postby Emu* » Wed Feb 04, 2009 8:14 pm UTC

mammothman wrote:The only problem I have with C# and the .NET stuff, is that you cant make executables out of it.


WTF?!?!?!?!? :? What project type did you start with?!?!?!?!?!?

It is DEFINITELY possible to make .exe programs using C#.
Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!

User avatar
Xeio
Friends, Faidites, Countrymen
Posts: 5101
Joined: Wed Jul 25, 2007 11:12 am UTC
Location: C:\Users\Xeio\
Contact:

Re: Getting Into Programming

Postby Xeio » Wed Feb 04, 2009 10:33 pm UTC

mammothman wrote:But I found that C# was harder to learn than python personally, and they also require the user to have the .NET Framework installed, which can be a hassle. I was never able to code anything particularly useful in C# because finding libraries and using them seemed complicated.
I might agree .NET is kind of annoying, but as the platform is more adopted, it's going to become similar to java, where everyone has it installed already (I'd assume most do). One of C# (and .NET in general)'s biggest strengths is the large library. MSDN and other resources have a huge amount of documentation available, in addition to intellisense being able to provide a limited documentation as you write the code even.

And I'm not sure about the executable comment, unless you mean that you want it to be run without .NET framework being installed? But a lot of languages have requirements like that (Java and Python are two).

btilly
Posts: 1877
Joined: Tue Nov 06, 2007 7:08 pm UTC

Re: Getting Into Programming

Postby btilly » Wed Feb 04, 2009 10:54 pm UTC

Xeio wrote:I might agree .NET is kind of annoying, but as the platform is more adopted, it's going to become similar to java, where everyone has it installed already (I'd assume most do).

You will never get to everyone. The last figures that I saw suggest that Apple has slightly under 10% of the desktop market, and Linux has 1-2% with both shares growing. Microsoft's monopoly is not in any immediate danger, but that is a pretty large number of people who can use Java but who won't be using .NET any time soon.

And these days, more and more computing is moving to mobile devices as Moore's Law makes them become actually useful. Microsoft's story there is pretty darned weak and doesn't look likely to improve. Beyond the hype, Java has a real story, and that is an area with real growth.

None of this is to say that there is a bad future for .NET users. But if your dream is total world domination, that isn't in the cards.
Last edited by btilly on Thu Feb 05, 2009 1:49 am UTC, edited 1 time in total.
Some of us exist to find out what can and can't be done.

Others exist to hold the beer.

User avatar
Emu*
Posts: 689
Joined: Mon Apr 28, 2008 9:47 am UTC
Location: Cardiff, UK
Contact:

Re: Getting Into Programming

Postby Emu* » Thu Feb 05, 2009 12:50 am UTC

A lot more software requires the .NET framework nowadays, particularly in-house stuff like the Windows Live Messenger. The likelihood is that windows users at least have .NET 1.0, if not .NET 2.0. I'd say that the most exciting parts of .NET 3.5 are for web-applications (MVC etc.).




Back to topic:

I think your best course of action is to go ask the teacher/lecturer.

If you get a headstart on the language your course actually uses you won't have any problem with the content of the course itself, and will probably find dependent courses easier.

Java is a popular teaching language nowadays since it's popular in commercial software development AND is C-based. If you start learning Java and find that your course is based on C or C++, most of the early stuff will make enough sense to you for it to be pretty easy.
Cosmologicon wrote:Emu* implemented a naive east-first strategy and ran it for an hour, producing results that rivaled many sophisticated strategies, visiting 614 cells. For this, Emu* is awarded Best Deterministic Algorithm!

User avatar
Chfan
Posts: 2141
Joined: Sun Oct 19, 2008 10:26 pm UTC
Location: American East Coast

Re: Getting Into Programming

Postby Chfan » Thu Feb 05, 2009 1:28 am UTC

The thing is I'M NOT TAKING THE COURSE. I will, however, find out some of the stuff about the course as one of my friends is taking it; although, he did change the master password or something to the teacher's computer so now he has to use cards...but I digress. I will find out that information.

One point: I don't know what almost everything you're talking about is. Can you put things in stupid people terms whenever possible?
Just FYI, the guy isn't avatar isn't me. But he seems pretty cool.

Poposhka
Posts: 39
Joined: Tue Jan 02, 2007 10:20 pm UTC
Location: So. Cal.
Contact:

Re: Getting Into Programming

Postby Poposhka » Thu Feb 05, 2009 1:34 am UTC

Do you play World of Warcraft?

Write a simple addon for it in Lua.

http://wowwiki.com

btilly
Posts: 1877
Joined: Tue Nov 06, 2007 7:08 pm UTC

Re: Getting Into Programming

Postby btilly » Thu Feb 05, 2009 2:44 am UTC

Chfan wrote:One point: I don't know what almost everything you're talking about is. Can you put things in stupid people terms whenever possible?

The best idea would be to take each word or phrase you don't understand and google for it.

However here is a basic introduction that covers some of the terms that you might not understand.

Programming is the art of giving instructions to the computer that other people can understand. We do this by writing in programming languages that can be understood by people and computers. A few common general-purpose programming languages include C, C++, Java, C#, PHP, Perl, Python and JavaScript. There are many similarities and differences between general purpose languages. There are also many more specialized languages that are not meant for general use. Examples include SQL (for database access), HTML (for display in browsers), and XML (widely used for data interchange).

When you write something in a programming language, something needs to be done to what you wrote before it can be understood by the computer. What that is can vary widely. For instance you run a compiler on C code that results in an executable that can be run. You pass Perl code to a Perl interpreter and which is a program that knows how to read the code and follow the result. Java is kind of a combination, you run a compiler to compile Java code to byte code, and then the byte code executes within a virtual machine. A virtual machine is just a program that can interpret byte code and follow its instructions. Java's is called the Java Virtual Machine, or JVM for short. The byte code the JVM runs does not have to come from a Java compiler. Groovy (a version of Ruby) and JPython (a version of Python) are examples of other programming languages that run in the JVM.

Going a layer lower, your computer does many things at once, and at any given time you likely have several different programs running that do their own thing and don't know much about each other. That is the responsibility of the operating system. I won't discuss operating systems too much, but the various types of Windows are all operating systems. Apple computers generally run some version of OS X. OS X is in the Unix family of operating systems, other representatives of which include Linux (technically not a Unix at all, actually), FreeBSD and Solaris. There are many more operating systems.

Going back up, when you do anything in a programming language, you are probably not going to directly tell the computer what you want it to do in excruciating detail. Instead you program to an API, or Application Programming Interface. This is just a set of available instructions which are supposed to do things. So you issue instructions using the API, which generally means that you just make the right function calls in the right way, and it takes care of the lower level details.

Furthermore programmers have standard sets of tools. These include editors to write with, source control systems to keep revision histories and help coordinate things, debuggers for when things go wrong, and so on. In fact there are so many tools that people have taken to creating IDEs, or Integrated Development Environments to help you manage all of the other tools. An example from the Java world is Eclipse.

Moving sideways, you may have heard of a company known as Microsoft. Microsoft's primary business goal is to try and get people locked into Microsoft products, which you will then be asked to pay for over and over again. When people write in a portable language such as Java, they do not wind up locked into Microsoft's world. And the programs they write do not force other people to use Microsoft products. Therefore Microsoft created a competing virtual machine called .NET. They have developed a number of languages for .NET, various APIs, tools, and so on. In typical fashion. Confusingly people will talk about .NET and sometimes mean the virtual machine, and sometimes include other stuff like the APIs. Microsoft's reputation is that their programming environments are complex and sometimes buggy, but they make it up with good tools.

Moving sideways again, when you write a program you have to ask how it is expected to be used. Many that you are familiar with are GUI programs, meaning that they present a Graphical User Interface that you interact with. (Put your mouse on this button, click, and something happens...) An important special case of a GUI program are interactive games. Another class of programs generate web interfaces, meaning you are supposed to use a web browser to interact with a website. Web programs are a special case of client-server programming, meaning that there is a client program you interact with (in this case a web browser), which is talking to another program somewhere that is called a server (in this case specifically a web server). There are many kinds of servers, and many kinds of clients, and programming them is different. As well there are batch programs that nobody is supposed to interact with, plugin libraries that are supposed to change an existing program, etc. People write code for a lot of reasons.

Does this sound complicated? It gets worse. Specific technologies often combine several of these ideas in unexpected ways. For instance someone mentioned wxPython. That is an API to make it easy to write GUI interfaces in the Python programming languages. Those interfaces are generally portable across multiple operating systems.

As you may guess, I have only scratched the surface of what acronyms will come up. Which is why I say that if you want to know about any particular one, google for it. At first the explanations you will find will confuse, but after a while you'll start to see the same terms come up often enough that it will start to make sense to you.

(Hopefully this helps you orient yourself. I apologize if it confuses you instead.)

Update: Reviewing this I corrected a couple of small wording issues, and realized that I didn't stick to the theme of the thread, which is helping you get into programming. Let me address that by offering you a Python tutorial. You can get a Python interpreter at http://www.python.org/download/. Or pick a different language. Any language. For instance I personally got great value out of The Structure and Interpretation of Computer Programs, which is about a Lisp dialect named Scheme. There are lots and lots of Scheme interpreters out there. That's not exactly a popular or cool choice, but even experienced programmers can get a lot of value from that book.
Some of us exist to find out what can and can't be done.

Others exist to hold the beer.

Grumpy Code Monkey
Posts: 99
Joined: Tue Feb 19, 2008 4:10 pm UTC
Location: Blue Texas

Re: Getting Into Programming

Postby Grumpy Code Monkey » Thu Feb 05, 2009 9:07 pm UTC

To get started programming, you need the following:

1. A computer (duh).

2. A development environment. This can be as simple as a text editor and a compiler (vi and gcc if you're on Unix or Linux, Notepad and MinGW if on Windows) or a full-blown Integrated Development Environment (IDE) such as Visual Studio (Windows), XCode (Mac OS X), or Eclipse (multi-platform). Which you use will be driven by what you want to learn. Most of these tools are freely available for download.

3. Reference materials: books, Web-based tutorials, etc. Quality and accuracy vary widely, so check reviews on those references before committing to them.

Which language you pick to start with isn't really that important, although some languages make better teaching tools than others. My experience with them is very limited, but I hear good things about Python and Ruby. C# and Java are almost indistinguishable at first, and both make decent teaching tools. C and C++ are powerful, but can be confusing at first, and make for poor teaching languages.

I taught myself old-school BASIC on a TI-99/4A while in high school1 just using the book that came with the cartridge, although I think formal training is necessary if you want to learn how to do things right and not develop bad habits. However, exploring on your own is a great way to get started.

1. Late Cretaceous Period, otherwise known as 1981-83.

User avatar
Pesto
Posts: 737
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: Berkeley, CA

Re: Getting Into Programming

Postby Pesto » Fri Feb 06, 2009 12:01 am UTC

Have you asked the programming teacher if you can do the course as independent study? If not, maybe he can provide you with the course work, and you can simply do it on your own for no credit. If he's worth anything as a teacher, he should be thrilled to have a student take that kind of initiative in learning.

I love to program, but I've never been much of an ideas man. I always run out of things to code.

ETHANR26
Posts: 6
Joined: Fri Feb 06, 2009 11:11 pm UTC

Re: Getting Into Programming

Postby ETHANR26 » Fri Feb 06, 2009 11:43 pm UTC

If you are interested in making games,www. kongregate.com/labs will get you started with actionscript pretty well. and if you look on the forums, there is a solution to paying for the actual software. just follow the shootorials, and you will have a game made without much of a hassle (unless you use the free stuff) and you will have learned quite a bit about programming


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 11 guests