Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Starting programming... (http://www.chiefdelphi.com/forums/showthread.php?t=85861)

kenavt 21-05-2010 22:34

Re: Starting programming...
 
Quote:

Originally Posted by Andrew Schreiber (Post 963253)
Canada, 2337 will be running some training for programmers over the summer. I've just been busy with work and haven't worked it out with Clinton. As far as what you can do to get a jump on it. If you want to learn C++ there are a handful of books out there (check your local library). For Labview there are a series of tutorials available online. For Java, I'm not sure what resources exist but I have a handful of Java books I could loan you if you can't find anything. As far as I am concerned I will use whatever language the students want to use. At any rate, you can't go wrong with whatever language you pick. The thought process behind programming is the hard part. Run through Project Euler, finding primes has nothing to do with robots but it will teach you the syntax, it will teach you how to think through a problem too.

Good luck, have fun!

Thanks, Schreiber, I can’t wait for that. I wouldn’t mind borrowing a Java book (perhaps later on in the summer) if you don’t mind.
Quote:

Learning a particular programming language is no where near as important as learning the basics of programming.

For example, learn some of the basic programming structures like:
Sequential code
Subroutine
GoTo or Jump
If-then-else
Case
Do While-Do Until

Learn how to define a problem through reiterative decomposition, a fancy way of saying: break down a problem into smaller components until you can solve it

Learn good programming practices like code reuse, code refactoring, encapsulation. There is a lot of good practices in the object oriented realm to help you write good reusable code.

Know your problem domain. If you are writing code for robots, you need to know different things than if you are writing code for an accounting system. I have yet to use the concept of debits and credits when writing for our robot, and never once needed to filter the noise out of a potentiometer for a AR Aging report ;>

So focus more on the fundamentals of programming, after that, picking a language is usually driven by the environment you are working in, or what you have available at the time. But if you know the fundamentals, it doesn't really matter much which language you end up in.
Quote:

Oh and no matter what language you are learning, books and tutorials can only go so far. Real understanding of the language comes from looking at examples and analyzing every single line (or block) of code in it, knowing exactly how it works and what is happening in that line. That's where the "programmer's mindset" comes from. Not knowing to type in this line here, but knowing why typing this line here does what it does.
Thank you very much! That seems to be how to really become a programmer, especially from what I’m hearing from everyone. Thanks a lot, guys!
Just a quick question: What is the difference between high-level and low-level languages? Thanks!

Radical Pi 21-05-2010 23:01

Re: Starting programming...
 
Quote:

Originally Posted by kenavt (Post 963347)
Thank you very much! That seems to be how to really become a programmer, especially from what I’m hearing from everyone. Thanks a lot, guys!
Just a quick question: What is the difference between high-level and low-level languages? Thanks!

In general, a high-level language abstracts you from the hardware and how it actually works. LabVIEW is a big one, Java too, C++ is somewhat up to this level. low-level languages are ones that expose all of the power of the machine to you, but a side effect of that is making the programming much, much harder (assembly for example)

Andrew Schreiber 22-05-2010 03:10

Re: Starting programming...
 
Quote:

Originally Posted by JamesBrown (Post 963254)
I am still waiting for the day I find a problem that requires me to use Haskell, I had to learn it for a class and am yet to find a situation to apply that knowledge (ProLog falls into this category too).

I know the feeling, Haskell feels powerful but I have never found a good problem for it. Prolog might be able to guess at alliance selection orders if you could nail down the right rules. (I have some work done in Lisp on this but it was the end of term and I was exhausted) Actual thought from earlier today, "What do you mean I have to define the data structure? It is just a freaking tuple!"

Tom Bottiglieri 22-05-2010 04:01

Re: Starting programming...
 
Quote:

Originally Posted by rsisk (Post 963255)
For example, learn some of the basic programming structures like:
  • GoTo or Jump

Don't use that.

rsisk 22-05-2010 12:05

Re: Starting programming...
 
Quote:

Originally Posted by Tom Bottiglieri (Post 963377)
Don't use that.

I agree you shouldn't have a need for a GoTo, but it is a fundamental programming structure and you should know it.

Most of the times a jump is needed is already dealt with by the compiler, such as in Try/Catch blocks, subroutine returns, jump tables, etc. In these cases, the compiler will generate a jump instruction in the low level language to perform a high level function.

Using a GoTo in your code tends to indicate poor coding and sloppiness. If you find you need one, review your code and try to find a better way to code it.

Alan Anderson 22-05-2010 15:00

Re: Starting programming...
 
Quote:

Originally Posted by rsisk (Post 963398)
I agree you shouldn't have a need for a GoTo, but it is a fundamental programming structure and you should know it.

I disagree. It is not a programming structure at all. If you want to learn how to program, it should not even be mentioned.

The distinction I wish to make is between programming and coding. Programming involves analysis of the problem and design of a solution, including the algorithms and data structures used in the design. Coding merely implements a solution on a specific target. There can be valid reasons for including unconditional jump instructions in an particular implementation, but I do not think they are ever warranted in a program's design.

Ether 22-05-2010 21:28

Re: Starting programming...
 
Quote:

Originally Posted by Alan Anderson (Post 963417)
There can be valid reasons for including unconditional jump instructions in an particular implementation

Steve McConnell gives an excellent example on Page 352 of his classic book Code Complete


~


All times are GMT -5. The time now is 23:20.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi