Learning to Program (Serial Thread)

Discussions on introductory science topics. Ask simple or beginner questions and expect clear and level answers.

Moderators: BioWizard, Natural ChemE, Paralith

Learning to Program (Serial Thread)

Postby Natural ChemE on July 6th, 2010, 8:24 pm

This is a serial thread on my attempt to learning computer programming. It is my hope that fellow novices will learn with me and that our resident experts will be able to provide guidance.

I've been spending much of my time this summer trying to learn how to be an effective programmer. It's taken a lot of effort, but I'm starting to get on track with it. A major problem along the way has been just finding how to do simple things. None of the material has been hard; it's just hard to find concise explanations.

To both help focus my own learning and to join up with anyone else interested in a similar journey, I wanted to start sort of a How-To thread. I'll start off with what I knew to start with, link resources that have helped me, and provide simple explanations along the way.

By the end of this, I hope to have prepared myself to use technology at a level appropriate for what I will need in graduate school this coming Fall. I hope that anyone following along will be able to learn much of the same.

It should be noted that while I'm fairly familiar with the process of learning a new discipline, I am not an expert on either Computer Science or Programming. And while I have every intention of passing along only that which I am reasonably confident about, it is possible that I will be off at some points and blatantly wrong at others. I hope that some of our professionals may give a few pointers when such misconceptions arise.
Natural ChemE
Forum Moderator
 
Posts: 545
Joined: 28 Dec 2009
Location: Existential Desperation, VA
Blog: View Blog (0)


Re: Learning to Program (Serial Thread)

Postby Natural ChemE on July 6th, 2010, 9:07 pm

SECTION I: Preparing the Computer

I'm using mostly Microsoft products. They're powerful but potentially expensive. Thankfully, Microsoft has taken pity on us poor university students, so there are some great offers for students.

Since most everyone has Windows, and Visual Studio 2010 Express is free, the only issue that most will find here is getting a copy of Office 2007/2010. If unavailable, this can be skipped without too much loss.

1. What is needed

To fully follow along without much translation, the following software will be necessary:
-Windows XP SP3, Windows Vista SP2, or Windows 7.
-Microsoft Office 2007 or 2010
-Microsoft Visual Studio 2010

Also plan on using:
-SQL Server 2008
-MASM
-Eclipse

2. Where to get it

DISCLAIMER: Listed prices and sources are provided without warranty. These represent what I currently believe to be accurate at the time of posting, but I make no guarantee on the accuracy of this information. Please be careful to observe all license agreements.

a. Windows 7
-If you're a student, you can get Windows 7 Professional for $65 at Win741.com.
-If you're a student, your university may have an MSDNAA program which will provide you with Windows 7 Professional for free.
-If you're a student, you can buy the upgrade to Windows 7 for $30 through the Ultimate Steal program.
-You can try buying Windows 7 online or in a store.

b. Microsoft Office
-If you work in a corporation, you may be able to download Office 2010 Professional Plus through Microsoft's Home Use Program. (Ask the IT department if your company participates in the Home Use Program.) It costs about $10 to get the best version (Professional Plus) through this program.
-If you are a student, you can get Microsoft Office 2010 Professional Academic through the Ultimate Steal program for $80.
-You can try buying Office 2010 online or in a store.

c. Microsoft Visual Studio 2010
Version order: Express, Professional, Premium, Ultimate
-If you're a student, you can download Visual Studio 2010 Professional through DreamSpark.com for free.
-If you're a student, your university may have an MSDNAA program which will provide you with Visual Studio 2010 Premium for free.
-You can download Visual Studio 2010 Express for free from Microsoft. This is the most basic version, and you'll notice that it comes in four parts.
-You can buy Visual Studio 2010 from Microsoft (but it can be expensive).

I'll touch on the other three - SQL Server, MASM, and Eclipse - when I get to them, if I do. They're not bad on the price. SQL Server offers a 180-day trial so that you can learn (or free offers for students), MASM is free, and Eclipse is free. Just no point in installing them now.


3. Setup
1. After installing the necessary software, be sure to check for and install Microsoft patches.
2. Enable the Developer tab in Excel (for Excel 2007, for Excel 2010).


4. Alternatives
Although I suspect that the setup I'm using is a fairly good one, there are probably other good alternatives. I will not recommend any here as I cannot vouch for them, but I'm sure that they can be found.

Since 90% of computers use Windows, I'll assume that it's available. Since Visual Studio 2010 Express is free to everyone, that shouldn't be a problem. The biggest issue may be with Office.

If Office 2007/2010 isn't available, 2003 may work alright for the most part if you know how to translate between the versions. OpenOffice and other suites will not work for the purposes of this thread.

5. Deep breath
Finding and setting this stuff up wasn't fun. But I think that it's proven worth-while.
Natural ChemE
Forum Moderator
 
Posts: 545
Joined: 28 Dec 2009
Location: Existential Desperation, VA
Blog: View Blog (0)


Re: Learning to Program (Serial Thread)

Postby Nick on July 7th, 2010, 7:58 am

At the risk of throwing a spanner in the works, do you know which environment you'll be working in at your uni? I would suspect that you'll be working with linux, so it might not be the best idea to spend time and money getting used to Visual Studio.
User avatar
Nick
Forum Moderator
 
Posts: 1844
Joined: 18 Jun 2006
Location: Geneva
Blog: View Blog (4)


Re: Learning to Program (Serial Thread)

Postby Terry on July 7th, 2010, 1:51 pm

What study materials you begin with?
Terry
Member
 
Posts: 234
Joined: 01 Sep 2008
Blog: View Blog (0)


Re: Learning to Program (Serial Thread)

Postby Natural ChemE on July 7th, 2010, 6:13 pm

Nick wrote:At the risk of throwing a spanner in the works, do you know which environment you'll be working in at your uni? I would suspect that you'll be working with linux, so it might not be the best idea to spend time and money getting used to Visual Studio.


Yeah, you're right, I think that it will be Linux. Still, I got Visual Studio for free, and my occupation pretty much binds me to ASP.NET.

I'm hoping that much of the conceptual understanding will readily transfer over, as well as stuff like C++.

PS- I want to get into Assembly next, so I'll probably have to set up a Linux box soon anyhow. It should be fun; I've never even seen Linux before. I'm kind of afraid to invest too much time into it, though, since I don't know how practical it'll be in the corporate world.
Natural ChemE
Forum Moderator
 
Posts: 545
Joined: 28 Dec 2009
Location: Existential Desperation, VA
Blog: View Blog (0)


Re: Learning to Program (Serial Thread)

Postby Natural ChemE on July 7th, 2010, 6:29 pm

Terry wrote:What study materials you begin with?


I had a modest background in programming when I started. I intend to post most of the basic concepts from that background soon.

For a new programmer, a good choice would be to start here, which is part of Microsoft's Beginner Learning Development Center.

If you go to that "here" link, it gives you three choices of languages:
•C++ ("C plus plus")
•C# ("C sharp")
•Visual Basic.NET ("VB.NET" or just "VB")

It's probably best to choose only one of these before advancing on to the Tier 2 lessons. C# and VB are basically the same thing program-wise (Wikipedia). For the most part, they're just written differently. C++ and C# look like eachother on the surface, but they're different program-wise.

Personally, I liked learning C++ to start out with. The website provides a downloadable C++ text book. Still, any of the three could be a good starting point.

NOTE: You can download the programming environment for each of these three programming languages here.
Natural ChemE
Forum Moderator
 
Posts: 545
Joined: 28 Dec 2009
Location: Existential Desperation, VA
Blog: View Blog (0)


Re: Learning to Program (Serial Thread)

Postby Terry on July 10th, 2010, 3:19 pm

I happen to come across an introductory book on C# and brush through it. I definitely love it which explains seemingly complex ideas in a simple and clear way. On the way, I find that the concept of object-oriented programming (Abstraction, Encapsulation, Inheritance, Polymorphism) is even more fundamental. It is a philosophy of modeling the real world and is universal in computer science. I will go back to get a more solid foundation on OOP.

I see it more natural to follow the C# path to get the latest improvements and new features in OOP. Learn its philosophy well. As the language evolves, you will have a natural sense of catching up with it.

I would also like some experienced one to provide a roadmap and useful on-line resources for further study.
Terry
Member
 
Posts: 234
Joined: 01 Sep 2008
Blog: View Blog (0)


Re: Learning to Program (Serial Thread)

Postby Natural ChemE on July 10th, 2010, 5:51 pm

It's really, really hard to find a good, concise book on programming. And I say this after having torn apart several libraries and bookstores in the attempt. I suspect that suffering through the verbose, time-consuming wasteland of words is an unavoidable rite of passage.

The primary reason that I wanted to make this thread was to spare others from the grossly wordy nature of the programming texts. Yet I find myself short on time. Part of me wonders if that's why the books are the way that they are - the people who live hurried lifestyles (and thus like concise explanations) don't have time to write a good, concise book, so we're left with everyone else's writing.

Ah wells. It might be a Saturday night, but I really have to get back to work. You know, instead of writing about programming.
Natural ChemE
Forum Moderator
 
Posts: 545
Joined: 28 Dec 2009
Location: Existential Desperation, VA
Blog: View Blog (0)


Re: Learning to Program (Serial Thread)

Postby Nick on July 10th, 2010, 9:59 pm

I don't know how many people actually use text books for learning to program. In my experience they are only really useful to get you started and then later for reference if you are using a language with bad online documentation in your native language.

That said Java: How to Program is a book worth checking out (even if you don't plan on using Java). One feature of this book that I quite liked is that it covers one of the areas that many programmers (especially scientists in my experience) never really get round to doing well: designing code.
User avatar
Nick
Forum Moderator
 
Posts: 1844
Joined: 18 Jun 2006
Location: Geneva
Blog: View Blog (4)


Re: Learning to Program (Serial Thread)

Postby Terry on July 30th, 2010, 7:07 am

It seems that learning a programming language is only dealing at the syntax level while the OO principles sit at the higher organization level with the design patterns being emerged on top. Is that the big picture?
Terry
Member
 
Posts: 234
Joined: 01 Sep 2008
Blog: View Blog (0)


Re: Learning to Program (Serial Thread)

Postby neuro on August 18th, 2010, 2:19 pm

I am afraid that if one plans to use programming for scientific applications they will have to get familiarity with both object oriented code and philosophy and serial code programming.
In other words you will have to care both about sequential program flow, loops, conditionals, indexing, memory management and interrupts in computational routines and object hierarchy, structure and methods for user and graphical interfaces.
A nice way to approach both is using Matlab - which should generally be available at any Institutional site - because it lets you write computational code without caring about graphical interfaces, but lets you play with graphic objects as well, and the latter are designed and dealt with according to an object oriented approach
User avatar
neuro
Forum Moderator
 
Posts: 283
Joined: 25 Jun 2010
Location: italy
Blog: View Blog (0)



Return to Beginner Science (NEW)

Who is online

Users browsing this forum: No registered users and 1 guest