www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Rookie requesting advice

reply >:< <>:<_member pathlink.com> writes:
I am curious if you guys can provide some advice on what tools I should arm
myself with as I prepare to learn programming. I should make it abundantly clear
that I have no programming experience, just a desire that I would like to
fulfill. Donít know why I am choosing D either but Iím sure itíll all be clear
after gaining some experience.

Thanks
:<

Feb 03 2005
next sibling parent reply clayasaurus <clayasaurus gmail.com> writes:
Just curious, how did you learn about the D programming language?

If you're the brave type, goto http://www.dsource.org/tutorials/ and try 
to figure out how the programs work.

If you need more help, get a book on C++ and learn the basics before 
attempting D, since there are no books on D written yet.

You'll need a good programmers text editor (google it). I use Kate on 
linux.

Good luck.

:< <>: wrote:
 I am curious if you guys can provide some advice on what tools I should arm
 myself with as I prepare to learn programming. I should make it abundantly
clear
 that I have no programming experience, just a desire that I would like to
 fulfill. Donít know why I am choosing D either but Iím sure itíll all be clear
 after gaining some experience.
 
 Thanks
 
:<


Feb 03 2005
next sibling parent "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
 If you need more help, get a book on C++ and learn the basics

I'd suggest a book on D might equally be appropriate, since the first steps to a brand new programmer will involved basic types, and all the compile/link/test challenges
 before attempting D, since there are no books on D written yet.

We're working on that ... ;)
Feb 03 2005
prev sibling next sibling parent John Reimer <brk_6502 yahoo.com> writes:
clayasaurus wrote:
 Just curious, how did you learn about the D programming language?
 
 If you're the brave type, goto http://www.dsource.org/tutorials/ and try 
 to figure out how the programs work.

For a new programmer, perusing those tutorials will likely be confusing at this point. I'm not really sure what to recommend for such a person who wants to learn D with no prior programming knowledge. It's probably better to tackle some none "beta" languages to get a better idea of programming concepts. As much as I love D, I consider it to be a moving target right now. You don't want that when you're starting out. Python (or Ruby to learn strong OOP concepts) might be a better language to approach first. See online book: /How to think like a Computer Scientist/ at http://www.ibiblio.org/obp/thinkCSpy/ I have a younger brother who is just starting out in programming. I purposely avoided recommending that he learn D. He's working on Python right now instead. D is better matched for those moving from C, C++, C#, and Java languages. These people tend to have the experience necessary to troubleshoot around D's rough edges. They also tend to have more appreciation for what D has done to improve upone those languages.
 If you need more help, get a book on C++ and learn the basics before 
 attempting D, since there are no books on D written yet.

C++? Ouch! That's a cruel language to start learning! I got a headache studying that language even after having used C for several years. On the other hand, one would certainly enjoy D after trying to learn C++.
 You'll need a good programmers text editor (google it). I use Kate on 
 linux.

I agree; Kate is great! Also try Scite as another simple, but powerful cross-platform editor. Both solutions support many languages (including D). - John R.
Feb 03 2005
prev sibling parent reply rookie >:< <rookie_member pathlink.com> writes:
In article <ctud8s$10pp$1 digitaldaemon.com>, clayasaurus says...
Just curious, how did you learn about the D programming language?

Some guy placed a flyer in the local library here in Jacksonville, NC. The librarian said she thought he was a Marine but she couldn't remember his name. Anyways, I just thought I'd check it out.
If you're the brave type, goto http://www.dsource.org/tutorials/ and try 
to figure out how the programs work.

If you need more help, get a book on C++ and learn the basics before 
attempting D, since there are no books on D written yet.

You'll need a good programmers text editor (google it). I use Kate on 
linux.

Good luck.

Thanks.
:< <>: wrote:
 I am curious if you guys can provide some advice on what tools I should arm
 myself with as I prepare to learn programming. I should make it abundantly
clear
 that I have no programming experience, just a desire that I would like to
 fulfill. Donít know why I am choosing D either but Iím sure itíll all be clear
 after gaining some experience.
 
 Thanks
 
:<



Feb 04 2005
parent reply John Reimer <brk_6502 yahoo.com> writes:
rookie >:< wrote:
 In article <ctud8s$10pp$1 digitaldaemon.com>, clayasaurus says...
 
Just curious, how did you learn about the D programming language?

Some guy placed a flyer in the local library here in Jacksonville, NC. The librarian said she thought he was a Marine but she couldn't remember his name. Anyways, I just thought I'd check it out.

Ha! I wonder if that was our friendly Marine, Andrew Edwards. I don't know if he's from that area or not. But if so, good for him! - John R.
Feb 04 2005
parent reply "Walter" <newshound digitalmars.com> writes:
"John Reimer" <brk_6502 yahoo.com> wrote in message
news:cu06pa$2opo$1 digitaldaemon.com...
 rookie >:< wrote:
 In article <ctud8s$10pp$1 digitaldaemon.com>, clayasaurus says...

Just curious, how did you learn about the D programming language?

Some guy placed a flyer in the local library here in Jacksonville, NC.


 librarian said she thought he was a Marine but she couldn't remember his


 Anyways, I just thought I'd check it out.

Ha! I wonder if that was our friendly Marine, Andrew Edwards. I don't know if he's from that area or not. But if so, good for him!

Andrew has been indefatigable at helping people get to know about D. He tries things I'd never think of!
Feb 04 2005
parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
"Walter" <newshound digitalmars.com> wrote in message 
news:cu1ije$vic$1 digitaldaemon.com...
 "John Reimer" <brk_6502 yahoo.com> wrote in message
 news:cu06pa$2opo$1 digitaldaemon.com...
 rookie >:< wrote:
 In article <ctud8s$10pp$1 digitaldaemon.com>, clayasaurus says...

Just curious, how did you learn about the D programming language?

Some guy placed a flyer in the local library here in Jacksonville, NC.


 librarian said she thought he was a Marine but she couldn't 
 remember his


 Anyways, I just thought I'd check it out.

Ha! I wonder if that was our friendly Marine, Andrew Edwards. I don't know if he's from that area or not. But if so, good for him!

Andrew has been indefatigable at helping people get to know about D. He tries things I'd never think of!

Maybe we can get him to publicise "D Programming Distilled"? (And maybe "Imperfect C++" !?) :-)
Feb 04 2005
parent reply John Reimer <brk_6502 yahoo.com> writes:
Matthew wrote:
 "Walter" <newshound digitalmars.com> wrote in message 
 news:cu1ije$vic$1 digitaldaemon.com...
 
"John Reimer" <brk_6502 yahoo.com> wrote in message
news:cu06pa$2opo$1 digitaldaemon.com...

rookie >:< wrote:

In article <ctud8s$10pp$1 digitaldaemon.com>, clayasaurus says...


Just curious, how did you learn about the D programming language?

Some guy placed a flyer in the local library here in Jacksonville, NC.


The
librarian said she thought he was a Marine but she couldn't 
remember his


name.
Anyways, I just thought I'd check it out.

Ha! I wonder if that was our friendly Marine, Andrew Edwards. I don't know if he's from that area or not. But if so, good for him!

Andrew has been indefatigable at helping people get to know about D. He tries things I'd never think of!

Maybe we can get him to publicise "D Programming Distilled"? (And maybe "Imperfect C++" !?) :-)

He'd be the guy for the job! - John R. PS. Are you charging more for autographed copies? I'd like one (or two). :-)
Feb 04 2005
parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
"John Reimer" <brk_6502 yahoo.com> wrote in message 
news:cu1qu7$16gl$1 digitaldaemon.com...
 Matthew wrote:
 "Walter" <newshound digitalmars.com> wrote in message 
 news:cu1ije$vic$1 digitaldaemon.com...

"John Reimer" <brk_6502 yahoo.com> wrote in message
news:cu06pa$2opo$1 digitaldaemon.com...

rookie >:< wrote:

In article <ctud8s$10pp$1 digitaldaemon.com>, clayasaurus says...


Just curious, how did you learn about the D programming language?

Some guy placed a flyer in the local library here in Jacksonville, NC.


The
librarian said she thought he was a Marine but she couldn't 
remember his


name.
Anyways, I just thought I'd check it out.

Ha! I wonder if that was our friendly Marine, Andrew Edwards. I don't know if he's from that area or not. But if so, good for him!

Andrew has been indefatigable at helping people get to know about D. He tries things I'd never think of!

Maybe we can get him to publicise "D Programming Distilled"? (And maybe "Imperfect C++" !?) :-)

He'd be the guy for the job! - John R. PS. Are you charging more for autographed copies? I'd like one (or two). :-)

I'd be happy (although completely embarrassed) to sign one for you, when we meet up at the inaugural OSI-D. (Unless you're going to get to Aus this year, or we make the long-talked-about-but-little-acted-on move to the US. <G>)
Feb 04 2005
parent John Reimer <brk_6502 yahoo.com> writes:
Matthew wrote:
 "John Reimer" <brk_6502 yahoo.com> wrote in message 

PS.  Are you charging more for autographed copies?  I'd like one (or 
two). :-)

I'd be happy (although completely embarrassed) to sign one for you, when we meet up at the inaugural OSI-D. (Unless you're going to get to Aus this year, or we make the long-talked-about-but-little-acted-on move to the US. <G>)

Great! We'll meet someday, I'm sure. I can't say I'll make it to Australia anytime soon (although it would be great fun to make the trip). OSI-D would be /the/ event of the year... sometime down the road.
Feb 04 2005
prev sibling next sibling parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
I strongly don't recommend that you *don't* start with an IDE 
(Integrated Development Environment: a GUI tool that allows you to edit, 
compile, build and debug all in one comfy environment).

I think you should start using a simple text editor, although one with 
syntax highlighting would be preferential. (I'm sure lots of chaps will 
be able to make recommendations here, as I use Visual Studio 98 and 
GVIM, neither of which are either modern or terribly neophyte-friendly.)

The basic process one goes through is:
    - write some code
    - compile it - the compiler (dmd.exe) will tell you if/what 
syntactic errors you've made in the code. If all is well, it will 
convert it into machine-readable blocks of 'object code'
    - build it - the linker (link.exe; linking is also available via the 
compiler, dmd.exe, and is easier that way when you're beginning) will 
attempt to assemble those blocks into an 'executable'. If any bits are 
missing, it'll tell you
    - test it - run your program, and see what happens. This is where 
the real fun begins. :-)

So, the tools are:
    - text editor
    - compiler/linker - dmd.exe (comes with the DMD download).

HTH

Matthew

Once you
">: :" < <_member pathlink.com> wrote in message 
news:ctuai4$ufl$1 digitaldaemon.com...
I am curious if you guys can provide some advice on what tools I should 
arm
 myself with as I prepare to learn programming. I should make it 
 abundantly clear
 that I have no programming experience, just a desire that I would like 
 to
 fulfill. Don't know why I am choosing D either but I'm sure it'll all 
 be clear
 after gaining some experience.

 Thanks
:<


Feb 03 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Matthew wrote:

 I strongly don't recommend that you *don't* start with an IDE 
 (Integrated Development Environment: a GUI tool that allows you to edit, 
 compile, build and debug all in one comfy environment).

Why not ? Sounds like an excellent beginner "support" I would even suggest starting with a language that does *not* need compiling, such as the scripting languages...
 I think you should start using a simple text editor, although one with 
 syntax highlighting would be preferential. 

Most IDE's have quite decent such text editors as well. (shouldn't text editing be done from the console too then?) [edited]
 The basic process one goes through is:
     - write some code
     - compile it - the compiler
     - build it - the linker 
     - test it - run your program
 
 So, the tools are:
     - text editor
     - compiler/linker - dmd.exe (comes with the DMD download).

These steps are exactly the same in a decent IDE, but without having to use the console commands... Design / Edit, Compile, Link, Unittest / Debug, Profile Starting to hack out code without a general design, or starting debugging without a simple test program, is just wasting time and effort - IMHO. --anders
Feb 04 2005
parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
"Anders F BjŲrklund" <afb algonet.se> wrote in message 
news:ctveb5$1vav$1 digitaldaemon.com...
 Matthew wrote:

 I strongly don't recommend that you *don't* start with an IDE 
 (Integrated Development Environment: a GUI tool that allows you to 
 edit, compile, build and debug all in one comfy environment).

Why not ? Sounds like an excellent beginner "support"

Because it's a simple (and relieving) transition to go from a basic, but sufficient, understanding of command-line program preparation/execution to using a GUI. It's not so simple to go the other way.
 I would even suggest starting with a language that does
 *not* need compiling, such as the scripting languages...

I totally agree. My brain requires me to suggest Python, though my heart would suggest Ruby
Feb 04 2005
next sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Matthew wrote:

I strongly don't recommend that you *don't* start with an IDE 

Why not ? Sounds like an excellent beginner "support"

Because it's a simple (and relieving) transition to go from a basic, but sufficient, understanding of command-line program preparation/execution to using a GUI. It's not so simple to go the other way.

Probably a matter of different "teaching" philosophies ? I tend to show off the easy path and final results first, and then do the long and tedious path later when they get interested in really learning all the basics of the craft. Or it could just be my Macintosh upbringing speaking. :-) --anders
Feb 04 2005
parent "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
"Anders F BjŲrklund" <afb algonet.se> wrote in message 
news:ctvgmh$21br$1 digitaldaemon.com...
 Matthew wrote:

I strongly don't recommend that you *don't* start with an IDE

Why not ? Sounds like an excellent beginner "support"

Because it's a simple (and relieving) transition to go from a basic, but sufficient, understanding of command-line program preparation/execution to using a GUI. It's not so simple to go the other way.

Probably a matter of different "teaching" philosophies ? I tend to show off the easy path and final results first, and then do the long and tedious path later when they get interested in really learning all the basics of the craft.

Well, it depends whether one wants to teach the specifics of a particular language, in which case the GUI approach is reasonable, or teaching the fundamentals of programming (compiled languages), in which case I think it's good to teach the whole command-line schebang first, so there's no 'hidden skills' crutch which will make a transition to mature and flexible skills more difficult.
 Or it could just be my Macintosh upbringing speaking. :-)

Well, my first Mac is due on Wednesday, so I may be in harmony with you within a week! :-)
Feb 04 2005
prev sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Matthew wrote:

 I totally agree. My brain requires me to suggest Python,
 though my heart would suggest Ruby

My own stomach still has problems with Python, but Ruby is indeed a great scripting language. (it even comes pre-installed on Mac OS X systems) And probably better to learn than ECMAScript...
  If you want a language for easy object-oriented programming, or you
  don't like the Perl ugliness, or you do like the concept of lisp, but
  don't like too much parentheses, Ruby may be the language of your choice.

--anders
Feb 04 2005
prev sibling next sibling parent reply "TonyW" <talktotony email.com> writes:
I'm about to suggest something that a lot of people will probably disagree
with.

Your first language should be BASIC.  D can be second :)

It is simply a matter of how many concepts need to be mastered before a
beginner can obtain some sort of positive feedback from the programming
experience.

Consider the classic hello world in BASIC:

print "Hello world"

with the equivalent in Java (I used Java as it forces object orientation and
makes for a more dramatic example):

public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello world");
    }
}

Because most BASICs only support structured programming, this is the only
paradigm/technique that needs to be mastered when learning them.  Having
done that, it then becomes more realistic to go on to other languages that
support object orientation, functional programming etc.

The additional facilities in languages like Java and D, while valuable for
writing serious applications, are a barrier to entry for anyone just
starting out.

Tony


">: :" < <_member pathlink.com> wrote in message
news:ctuai4$ufl$1 digitaldaemon.com...
 I am curious if you guys can provide some advice on what tools I should

 myself with as I prepare to learn programming. I should make it abundantly

 that I have no programming experience, just a desire that I would like to
 fulfill. Don't know why I am choosing D either but I'm sure it'll all be

 after gaining some experience.

 Thanks
:<


Feb 03 2005
next sibling parent reply "Walter" <newshound digitalmars.com> writes:
"TonyW" <talktotony email.com> wrote in message
news:ctuk3e$16v0$1 digitaldaemon.com...
 I'm about to suggest something that a lot of people will probably disagree
 with.

 Your first language should be BASIC.  D can be second :)

 It is simply a matter of how many concepts need to be mastered before a
 beginner can obtain some sort of positive feedback from the programming
 experience.

 Consider the classic hello world in BASIC:

 print "Hello world"

 with the equivalent in Java (I used Java as it forces object orientation

 makes for a more dramatic example):

 public class Hello {
     public static void main(String[] args) {
         System.out.println("Hello world");
     }
 }

Here it is in D: void main() { writefln("Hello world"); }
 Because most BASICs only support structured programming, this is the only
 paradigm/technique that needs to be mastered when learning them.  Having
 done that, it then becomes more realistic to go on to other languages that
 support object orientation, functional programming etc.

 The additional facilities in languages like Java and D, while valuable for
 writing serious applications, are a barrier to entry for anyone just
 starting out.

Probably the main barrier to D as a first language is lack of a good book on D :-(
Feb 03 2005
next sibling parent zwang <nehzgnaw gmail.com> writes:
Walter wrote:
 Probably the main barrier to D as a first language is lack of a good book on
 D :-(

Or lack of a finalized language spec for D 1.0?
Feb 03 2005
prev sibling next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Walter wrote:

public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello world");
    }
}

Here it is in D: void main() { writefln("Hello world"); }

That does not compile, and returns bogus values to the shell even when the proper import is added. Also, writefln has problems with '%' just like printf has (not sure why "Hello World" in C does not use "puts" instead, since it's faster anyway?) My suggestion for the code in "D 1.0" is instead:
 import std.stdio;
 
 void main()
 {
     writeln("Hello, World!");
 }

That depends on two issues being addressed: 1) The addition of std.stdio.writeln 2) Fixing the return value of "void main". I've done the first, and working on the second... But in the current version of D, the only reliable way to start is to use old C code:
 int main()
 {
   printf("Hello, World!\n");
   return 0;
 }

And that sucks, since I prefer the first one. (even if it also *requires* a Unicode console, while the Java works fine with e.g. MacRoman) writeln("Hall\u00E5, V\u00E4rlden!"); // sv --anders
Feb 04 2005
prev sibling parent Carotinho <carotinobg yahoo.it> writes:
Hi!

 Probably the main barrier to D as a first language is lack of a good book
 on D :-(

I absolutely agree. I think a well-written tutorial, like the ones for C and Pascal that I remember made by Coronado Enterprises or something like this, freely downloadable on the net, is the best thing. If there are people starting programming with C, which is more difficult, why not starting with D? If I were a true programmer, I would write a complete tutorial myself, but I have to admit that before teaching, I need to know the subject:) But maybe a collective effort? byez! Carotinho
Feb 08 2005
prev sibling next sibling parent reply Andy Friesen <andy ikagames.com> writes:
TonyW wrote:
 I'm about to suggest something that a lot of people will probably disagree
 with.
 
 Your first language should be BASIC.  D can be second :)

I would suggest Python instead. It sports some of the same bare, minimal syntax that makes Basic so readable, but is infinitely more scalable. For example, absolutely everything in Python is an object, but it's structured in such a way that it isn't necessary to know about them. When the time finally comes to learn about objects, they are there waiting to be exploited. (of course, Python's execution speed isn't all that hot, but that's what languages like D are for) -- andy
Feb 03 2005
next sibling parent clayasaurus <clayasaurus gmail.com> writes:
    I tried to learn python as a first language, .. and it scared me to 
death... hehe. Dunno why, I just couldn't understand any of it, or maybe 
it was the lack of a good book.
    Anyway, I myself had a lot easier time beginning with C, but maybe i 
am just odd like that.

Andy Friesen wrote:
 I would suggest Python instead.  It sports some of the same bare, 
 minimal syntax that makes Basic so readable, but is infinitely more 
 scalable.
 
 For example, absolutely everything in Python is an object, but it's 
 structured in such a way that it isn't necessary to know about them. 
 When the time finally comes to learn about objects, they are there 
 waiting to be exploited.
 
 (of course, Python's execution speed isn't all that hot, but that's what 
 languages like D are for)
 
  -- andy

Feb 03 2005
prev sibling parent reply Brad Anderson <brad dsource.dot.org> writes:
Andy Friesen wrote:
 I would suggest Python instead.  

I would, too. The best thing is the step-by-step tutorial here: http://docs.python.org/tut/tut.html I think D needs a tutorial similar to this. I'm not slighting Justin's effort on dsource here: http://www.dsource.org/tutorials/ but rather suggesting that we reformat all of the code examples into DocBook, and adding more prose surrounding them. BA
Feb 03 2005
next sibling parent reply John Reimer <brk_6502 yahoo.com> writes:
Brad Anderson wrote:
 Andy Friesen wrote:
 
 I would suggest Python instead.  

I would, too. The best thing is the step-by-step tutorial here: http://docs.python.org/tut/tut.html I think D needs a tutorial similar to this. I'm not slighting Justin's effort on dsource here: http://www.dsource.org/tutorials/ but rather suggesting that we reformat all of the code examples into DocBook, and adding more prose surrounding them. BA

Hey Brad, You're right. We need some more written explanations as tutorials. It might be kind of fun to start something like that. The current tutorials are more geared to people with some programming experience, a goal they achieve well. Perhaps such a section could be added to dsource in the future. I'm thinking of starting some mango tutorials. Later, John R.
Feb 03 2005
parent reply Charles Hixson <charleshixsn earthlink.net> writes:
John Reimer wrote:
 Brad Anderson wrote:
 
 Andy Friesen wrote:

 I would suggest Python instead.  

I would, too. The best thing is the step-by-step tutorial here: http://docs.python.org/tut/tut.html I think D needs a tutorial similar to this. I'm not slighting Justin's effort on dsource here: http://www.dsource.org/tutorials/ but rather suggesting that we reformat all of the code examples into DocBook, and adding more prose surrounding them. BA

Hey Brad, You're right. We need some more written explanations as tutorials. It might be kind of fun to start something like that. The current tutorials are more geared to people with some programming experience, a goal they achieve well. Perhaps such a section could be added to dsource in the future. I'm thinking of starting some mango tutorials. Later, John R.

the code. I've never done much C programming on Linux (I used CodeWarrior on the Mac), and while I could handle JES2, I haven't found Linux to be as transparent. (Can't just pull out the white manual from IBM and look up whatever's bothering me as an example.) I've got detailed technical references, but nothing to tell me how to get started, or how to figure out just which libraries I need.
Feb 04 2005
parent John Reimer <brk_6502 yahoo.com> writes:
Charles Hixson wrote:
 
 If you do, please consider a section of linking libraries into the 
 code.  I've never done much C programming on Linux (I used CodeWarrior 
 on the Mac), and while I could handle JES2, I haven't found Linux to be 
 as transparent.  (Can't just pull out the white manual from IBM and look 
 up whatever's bothering me as an example.)  I've got detailed technical 
 references, but nothing to tell me how to get started, or how to figure 
 out just which libraries I need.

That's a good idea. In fact such a tutorial probably should be a priority. I'll see what I can do.
Feb 04 2005
prev sibling parent J C Calvarese <jcc7 cox.net> writes:
In article <ctuugt$1g0c$1 digitaldaemon.com>, Brad Anderson says...
Andy Friesen wrote:
 I would suggest Python instead.  

I would, too. The best thing is the step-by-step tutorial here: http://docs.python.org/tut/tut.html

I think the suggestion of Python as a first language is a great idea. There's a good amount of documentation/tutorials on it out there, the Python system is open source (and free), and Python is a cool language with a lot of capabilities (even wxPython and ActiveX/COM). Of course, if a novice gets a good handle on how Python works and gets a little bored (not that Python is boring), then they're probably ready for D. :)
I think D needs a tutorial similar to this.  I'm not slighting Justin's 
effort on dsource here:

http://www.dsource.org/tutorials/

but rather suggesting that we reformat all of the code examples into 
DocBook, and adding more prose surrounding them.

BA

I think the problem is lack of content rather than formating. ;) I did a sort of first lesson in Wiki4D: http://www.wikiservice.at/d/wiki.cgi?D__Tutorial/StartingWithD Not much, but it's something. I think there are a number of nice examples in the "Fundamentals" category of the dsource tutorials, but until I (or someone else) adds more a lot more commentary it's too much for the average beginner to take in. Justin (jcc7)
Feb 04 2005
prev sibling parent Charles Hixson <charleshixsn earthlink.net> writes:
TonyW wrote:
 I'm about to suggest something that a lot of people will probably disagree
 with.
 
 Your first language should be BASIC.  D can be second :)
 
...
 

that many have successfully overcome the handicap. I'm assuming here that you are speaking of some modern dialect of Basic, I don't need to know which one as they are all a poor place to start, and a poor place to end up. Basic does have some uses, expecially when used as a glue language to glue, e.g., data screens to databases. And even there I think it a poor choice (despite having done so for years). Also, I have caught certain dialects of Basic in simple arithmetic errors. That could be fixed by recompilation, without changing any code. (No, it wasn't either the particular computer, nor the particular installarion, but it might be the particular upgrade version...the errors were infrequent enough that I couldn't ever be certain. And I quickly made strong efforts to avoid doing arithetic in Basic.) Python has most of the virtues that Basic pretends to, and fewer of the limitations. (Unless you need to use an application that someone else has already built, or you need to be generating "nicely formatted" reports...at which point the virtue isn't in Basic, but in, e.g., the version of the CrystalReports library that it uses.)
Feb 04 2005
prev sibling next sibling parent reply Dave <Dave_member pathlink.com> writes:
In article <ctuai4$ufl$1 digitaldaemon.com>, >:< <>: says...
I am curious if you guys can provide some advice on what tools I should arm
myself with as I prepare to learn programming. I should make it abundantly clear
that I have no programming experience, just a desire that I would like to
fulfill. Donít know why I am choosing D either but Iím sure itíll all be clear
after gaining some experience.

Thanks
:<


As a couple of others have mentioned, the biggest impediment to learning D is that there isn't a book (at least for the English language) out for it yet - It is a relatively new language intended primarily for those who have had experience with other languages. That said, you may profit from a book like this on the C language: http://www.amazon.com/exec/obidos/tg/detail/-/0672305100/qid=1107490657/sr=1-1/ref=sr_1_1/104-7198268-3891916?v=glance&s=books (I have not read it, but there are recent reviews on Amazon that are good, for whatever that is worth. May be worth the time to check for it at your local library(s) first. The book probably recommends some tools to use as well.) Bare in mind that in many ways D is quite a bit different than C, but if you are on a 'fast track' to learn D, I think learning a basic to intermediate subset of C is a good place to start. Short of a D book, I do believe that a *good* "beginning programmer" book on C will most quickly get you to your goal of being able to write D programs. I don't think you can go wrong, in general, by learning C, and a lot of what you learn will be applicable to programming with D (and many other languages for that matter). Good luck, have fun! - Dave
Feb 03 2005
next sibling parent John Reimer <brk_6502 yahoo.com> writes:
Dave wrote:
 In article <ctuai4$ufl$1 digitaldaemon.com>, >:< <>: says...
 
I am curious if you guys can provide some advice on what tools I should arm
myself with as I prepare to learn programming. I should make it abundantly clear
that I have no programming experience, just a desire that I would like to
fulfill. Donít know why I am choosing D either but Iím sure itíll all be clear
after gaining some experience.

Thanks

:<


As a couple of others have mentioned, the biggest impediment to learning D is that there isn't a book (at least for the English language) out for it yet - It is a relatively new language intended primarily for those who have had experience with other languages. That said, you may profit from a book like this on the C language: http://www.amazon.com/exec/obidos/tg/detail/-/0672305100/qid=1107490657/sr=1-1/ref=sr_1_1/104-7198268-3891916?v=glance&s=books (I have not read it, but there are recent reviews on Amazon that are good, for whatever that is worth. May be worth the time to check for it at your local library(s) first. The book probably recommends some tools to use as well.) Bare in mind that in many ways D is quite a bit different than C, but if you are on a 'fast track' to learn D, I think learning a basic to intermediate subset of C is a good place to start. Short of a D book, I do believe that a *good* "beginning programmer" book on C will most quickly get you to your goal of being able to write D programs. I don't think you can go wrong, in general, by learning C, and a lot of what you learn will be applicable to programming with D (and many other languages for that matter). Good luck, have fun! - Dave

Good advice!
Feb 03 2005
prev sibling next sibling parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
"Dave" <Dave_member pathlink.com> wrote in message 
news:ctv1st$1jor$1 digitaldaemon.com...
 In article <ctuai4$ufl$1 digitaldaemon.com>, >:< <>: says...
I am curious if you guys can provide some advice on what tools I 
should arm
myself with as I prepare to learn programming. I should make it 
abundantly clear
that I have no programming experience, just a desire that I would like 
to
fulfill. Don't know why I am choosing D either but I'm sure it'll all 
be clear
after gaining some experience.

Thanks
:<


As a couple of others have mentioned, the biggest impediment to learning D is that there isn't a book (at least for the English language) out for it yet - It is a relatively new language intended primarily for those who have had experience with other languages.

You guys are so impatient! :-) FYI: Walter and I will be officially commencing the writing of "D Programming Distilled" on the 14th of Feb. Of course, the writing and production process involves more than a few months, but we do hope to have it in your sweaty palms before the end of the year. Cheers Matthew P.S. If anyone's looking for a book on C++ that's decidely *not* an introductory text, you might skip down four or five lines .... -- Matthew Wilson Author: "Imperfect C++", Addison-Wesley, 2004 (http://www.imperfectcplusplus.com) Contributing editor, C/C++ Users Journal (http://www.synesis.com.au/articles.html#columns) STLSoft moderator (http://www.stlsoft.org) "If I'm curt with you it's because time is a factor. I think fast, I talk fast, and I need you guys to act fast" -- Mr Wolf -------------------------------------------------------------------------------
Feb 04 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Matthew wrote:

 You guys are so impatient!  :-) 

Well, there are a lot of us willing to help out to get it out sooner. Spoiled by the speed of the internet and community projects, I guess.
 FYI: Walter and I will be officially commencing the writing of "D 
 Programming Distilled" on the 14th of Feb. Of course, the writing and 
 production process involves more than a few months, but we do hope to 
 have it in your sweaty palms before the end of the year.

Will this book be available online as well, or just on dead old trees ? Will you discuss it here, or lock yourselves up and come out next year ? Will it be distributable, or come as single-user non-distributable too ? I can fully understand the desire to Copyright and close both the D compiler and book, but I would still have to use Open Source on this Mac OS X platform and an Open Content alternative of any introduction could be very useful too. And also easier for others to contribute to... But even if Addison-Wesley contracts are not that flexible, it would still be most excellent if at least the basic specification could be released under a different license, similar to the compiler front-end ? Then we can build on the same documentation base, as GDC does for code. The current Open alternatives instead use GNU "Copyleft". For instance, GDC is released under the GPL* and the Wiki4D content is under the FDL*. I'm not sure how the process is for getting it upstream to Digital Mars? (well - besides asking Walter politely on these newsgroups, of course) Currently, both the D specification and the Phobos runtime library have severe license issues that will NEED to be resolved before 1.0. Preferrably by release under a dual license, like the DMD front-end. But at least with more than just "©Digital Mars. All Rights Reserved" As discussed already, I prefer Copyleft over Public Domain myself. Here's one reason: http://www.fsf.org/philosophy/why-copyleft.html And it's not a matter of cost, even if I rather pay in time than $. That said, I might buy the book anyway... Heck, I bought one on RPM. --anders * GNU General Public License http://www.gnu.org/copyleft/gpl.html GDC http://home.earthlink.net/~dvdfrdmn/d/ * GNU Free Documentation License http://www.gnu.org/copyleft/fdl.html Wiki4D http://www.prowiki.org/wiki4d/wiki.cgi
Feb 04 2005
next sibling parent reply Brad Anderson <brad dsource.dot.org> writes:
Anders F BjŲrklund wrote:
 Matthew wrote:
 
 You guys are so impatient!  :-) 

Well, there are a lot of us willing to help out to get it out sooner. Spoiled by the speed of the internet and community projects, I guess.
 FYI: Walter and I will be officially commencing the writing of "D 
 Programming Distilled" on the 14th of Feb. Of course, the writing and 
 production process involves more than a few months, but we do hope to 
 have it in your sweaty palms before the end of the year.

Will this book be available online as well, or just on dead old trees ? Will you discuss it here, or lock yourselves up and come out next year ? Will it be distributable, or come as single-user non-distributable too ?

An approach that has been somewhat successful can be found here. It's been a community effort, but led by Peter Seibel for a Lisp book: http://www.gigamonkeys.com/book/pipeline.html BA
Feb 04 2005
parent "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
"Brad Anderson" <brad dsource.dot.org> wrote in message 
news:cu0ri1$bqd$1 digitaldaemon.com...
 Anders F BjŲrklund wrote:
 Matthew wrote:

 You guys are so impatient!  :-)

Well, there are a lot of us willing to help out to get it out sooner. Spoiled by the speed of the internet and community projects, I guess.
 FYI: Walter and I will be officially commencing the writing of "D 
 Programming Distilled" on the 14th of Feb. Of course, the writing 
 and production process involves more than a few months, but we do 
 hope to have it in your sweaty palms before the end of the year.

Will this book be available online as well, or just on dead old trees ? Will you discuss it here, or lock yourselves up and come out next year ? Will it be distributable, or come as single-user non-distributable too ?

An approach that has been somewhat successful can be found here. It's been a community effort, but led by Peter Seibel for a Lisp book: http://www.gigamonkeys.com/book/pipeline.html

I'll check it out, but our model's pretty much fixed now. Cheers Matthew
Feb 04 2005
prev sibling parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
 Matthew wrote:

 You guys are so impatient!  :-)

Well, there are a lot of us willing to help out to get it out sooner. Spoiled by the speed of the internet and community projects, I guess.

Well, we'd be interested in any volunteers for the D book. We have quite a few reviewer volunteers already - some from D, some elsewhere - but it can't hurt to have more. One word of caution, however, it's sometimes a painful thing to commit to, so don't volunteer unless you're really sure you want to read, and re-read, and re-re-read, etc. etc. in a good cause. ;)
 FYI: Walter and I will be officially commencing the writing of "D 
 Programming Distilled" on the 14th of Feb. Of course, the writing and 
 production process involves more than a few months, but we do hope to 
 have it in your sweaty palms before the end of the year.

Will this book be available online as well, or just on dead old trees ?

We're still thrashing this out. Well, to be specific, Walter and the Addison-Wesley people are thrashing it out. The outcome's not set yet, but you can be sure that it'll be in the shops for a non-trivial amount of time before it's available in any kind of free form. Naturally the publisher and (at least one of) the authors need some, minimal (sniff!), financial incentive, otherwise it won't get published. For my part, I was only ever interested in being published for Addison-Wesley (AWL), and never even tried to get on terms with another publisherd. Now being in their fold (with my book Imperfect C++ - http://imperfectcplusplus.com - for anyone who's _not_ heard me going this last year or so), they have first refusal on my books in any case. From the first time Walter mentioned the idea of my/our doing a book on D, the ambition has been to write The D Programming Language. Since AWL publish The C++ Programming Language, we wanted to aim it at them. They are keen on this idea long term, but all of us (publisher included), wanted to get out a smaller, toe-in-the-water kind of book now, in a market that will hopefully sustain it. TDPL will require a big uptake in D to make such a large book worthwhile. (Of course, I register thedprogramminglanguage.com some time ago ... <cg>)
 Will you discuss it here, or lock yourselves up and come out next year 
 ?

We're planning to get started in a little over a week. I am also starting my next C++ book at that time, just to make things interesting. ;) We won't be releasing material here, although doubtless our (mostly) good natured back and forth will stimulate debates here.
 Will it be distributable, or come as single-user non-distributable too 
 ?

 I can fully understand the desire to Copyright and close both the D 
 compiler and book, but I would still have to use Open Source on this
 Mac OS X platform and an Open Content alternative of any introduction
 could be very useful too. And also easier for others to contribute 
 to...

See answer above.
 But even if Addison-Wesley contracts are not that flexible, it would
 still be most excellent if at least the basic specification could be 
 released under a different license, similar to the compiler front-end 
 ?
 Then we can build on the same documentation base, as GDC does for 
 code.

Not really sure on this one. Maybe Walter can comment. One thing I would say, however, and that's that I think it'd be almost impossible if the spec/online-docs don't improve as a result of our process over the next few months. If that's any comfort ...
Feb 04 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Matthew wrote:

 Well, we'd be interested in any volunteers for the D book. We have quite 
 a few reviewer volunteers already - some from D, some elsewhere - but it 
 can't hurt to have more. One word of caution, however, it's sometimes a 
 painful thing to commit to, so don't volunteer unless you're really sure 
 you want to read, and re-read, and re-re-read, etc. etc. in a good 
 cause. ;)

I'd rather be coding ;-) But of course, if there's a bug then I'll tell.
 Naturally the publisher and (at least one of) the authors need some, 
 minimal (sniff!), financial incentive, otherwise it won't get published.

Naturally. Most of the PDFs I use require payment (eg. O'Reilly Safari)
 One thing I would say, however, and that's that I think it'd be almost 
 impossible if the spec/online-docs don't improve as a result of our 
 process over the next few months. If that's any comfort ...

A small one. But it doesn't really help with the community involvement. --anders
Feb 05 2005
parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
"Anders F BjŲrklund" <afb algonet.se> wrote in message 
news:cu21q2$1cbh$2 digitaldaemon.com...
 Matthew wrote:

 Well, we'd be interested in any volunteers for the D book. We have 
 quite a few reviewer volunteers already - some from D, some 
 elsewhere - but it can't hurt to have more. One word of caution, 
 however, it's sometimes a painful thing to commit to, so don't 
 volunteer unless you're really sure you want to read, and re-read, 
 and re-re-read, etc. etc. in a good cause. ;)

I'd rather be coding ;-) But of course, if there's a bug then I'll tell.
 Naturally the publisher and (at least one of) the authors need some, 
 minimal (sniff!), financial incentive, otherwise it won't get 
 published.

Naturally. Most of the PDFs I use require payment (eg. O'Reilly Safari)
 One thing I would say, however, and that's that I think it'd be 
 almost impossible if the spec/online-docs don't improve as a result 
 of our process over the next few months. If that's any comfort ...

A small one. But it doesn't really help with the community involvement.

There's the dilemma. Having spent most of the last two years writing a book, and not earning money, my wife, kids, and mortgage are keen for remuneration wherever I can get it. Just because I've done a big contract the last six months doesn't afford me the luxury of writing a book with absolutely $0 return. In any case, I'm _only_ interested in publishing with a big, weighty, publisher, who subject their output to rigorous review. And such a publisher must needs charge a healthy return. In fact, even the crappy publishers charge cash money, often thoroughly undue amounts. (Can you guess which one I mean ... ??? <G>) I would argue that getting books published by a reputable publisher such as AWL would actually be a significant benefit for the language, since it confers it a status that it might not get elsewhere. I've heard from quite a few C++ big-wigs that they'll not be looking at, or writing about, D until it's had a couple of books out. Anyway, enough debate. It is what it is. Hopefully, we can get it out in a reasonable time, it'll have a reasonably price, and it'll be unreasonably successful. ;) Cheers Matthew
Feb 05 2005
next sibling parent reply zwang <nehzgnaw gmail.com> writes:
Wish you good luck!
BTW, who's the target reader of "D programming distilled"?


Matthew wrote:
 There's the dilemma. Having spent most of the last two years writing a 
 book, and not earning money, my wife, kids, and mortgage are keen for 
 remuneration wherever I can get it. Just because I've done a big 
 contract the last six months doesn't afford me the luxury of writing a 
 book with absolutely $0 return.
 
 In any case, I'm _only_ interested in publishing with a big, weighty, 
 publisher, who subject their output to rigorous review. And such a 
 publisher must needs charge a healthy return. In fact, even the crappy 
 publishers charge cash money, often thoroughly undue amounts. (Can you 
 guess which one I mean ... ??? <G>)
 
 I would argue that getting books published by a reputable publisher such 
 as AWL would actually be a significant benefit for the language, since 
 it confers it a status that it might not get elsewhere. I've heard from 
 quite a few C++ big-wigs that they'll not be looking at, or writing 
 about, D until it's had a couple of books out.
 
 Anyway, enough debate. It is what it is. Hopefully, we can get it out in 
 a reasonable time, it'll have a reasonably price, and it'll be 
 unreasonably successful. ;)
 
 Cheers
 
 Matthew
 
 
 
 

Feb 05 2005
parent "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
People who are not (yet) coding superstars, but who do have a basic 
knowledge of C or C++ or C# or Java. (In other words, we're not going to 
spend masses of pages discussing C-language syntax, but we will be going 
through all D's syntax.)

Walter and I both really like the Python Essential Reference, Beazley, 
New Riders, and I hope DPD will be at that level. (Easy, in other words, 
while still be really useful for gurus and neophytes alike.)

"zwang" <nehzgnaw gmail.com> wrote in message 
news:cu22qe$1du9$1 digitaldaemon.com...
 Wish you good luck!
 BTW, who's the target reader of "D programming distilled"?


 Matthew wrote:
 There's the dilemma. Having spent most of the last two years writing 
 a book, and not earning money, my wife, kids, and mortgage are keen 
 for remuneration wherever I can get it. Just because I've done a big 
 contract the last six months doesn't afford me the luxury of writing 
 a book with absolutely $0 return.

 In any case, I'm _only_ interested in publishing with a big, weighty, 
 publisher, who subject their output to rigorous review. And such a 
 publisher must needs charge a healthy return. In fact, even the 
 crappy publishers charge cash money, often thoroughly undue amounts. 
 (Can you guess which one I mean ... ??? <G>)

 I would argue that getting books published by a reputable publisher 
 such as AWL would actually be a significant benefit for the language, 
 since it confers it a status that it might not get elsewhere. I've 
 heard from quite a few C++ big-wigs that they'll not be looking at, 
 or writing about, D until it's had a couple of books out.

 Anyway, enough debate. It is what it is. Hopefully, we can get it out 
 in a reasonable time, it'll have a reasonably price, and it'll be 
 unreasonably successful. ;)

 Cheers

 Matthew


 


Feb 05 2005
prev sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Matthew wrote:

 There's the dilemma. Having spent most of the last two years writing a 
 book, and not earning money, my wife, kids, and mortgage are keen for 
 remuneration wherever I can get it. Just because I've done a big 
 contract the last six months doesn't afford me the luxury of writing a 
 book with absolutely $0 return.

You could say the same for any Open Source, of course ? As a programmer, I now do both kinds of work myself... Ideal being when I can write Free Software for money. (though I'd settle for Open Source / BSD, in a crunch) http://www.gnu.org/philosophy/selling.html
 I would argue that getting books published by a reputable publisher such 
 as AWL would actually be a significant benefit for the language, since 
 it confers it a status that it might not get elsewhere. I've heard from 
 quite a few C++ big-wigs that they'll not be looking at, or writing 
 about, D until it's had a couple of books out.

I don't care for the big-wigs myself, but about the documentation. And while most companies prefer to buy their software in a closed box from a proprietary software vendor and their books in a closed wrap from a buy-before-you-read bookstore, times they're a-changing... http://www.gnu.org/philosophy/free-doc.html
 Anyway, enough debate. It is what it is. Hopefully, we can get it out in 
 a reasonable time, it'll have a reasonably price, and it'll be 
 unreasonably successful. ;)

Yes, enough debate already. "Beware of the falling forks", though. It is not without controversy and I did not mean to start another flaming war. But software and documentation are not that different. Which means that Open Source applies just as much to Open Content, and Free Software applies just as much to Free Documentation too. Maybe your book is of a "higher level", but I believe an introduction should be made open and free. Or at the very least the D specification ? And we can always extend on the guides and the tutorials, on the Wiki... There is really no conflict between either DMD/GDC, or Distilled/Wiki4D. --anders
Feb 05 2005
prev sibling parent Mike Parker <aldacron71 yahoo.com> writes:
Dave wrote:

 That said, you may profit from a book like this on the C language:
 
 http://www.amazon.com/exec/obidos/tg/detail/-/0672305100/qid=1107490657/sr=1-1/ref=sr_1_1/104-7198268-3891916?v=glance&s=books
 
 (I have not read it, but there are recent reviews on Amazon that are good, for
 whatever that is worth. May be worth the time to check for it at your local
 library(s) first. The book probably recommends some tools to use as well.)

This is widely considered one of the best books for learning C: http://www.amazon.com/exec/obidos/ASIN/0672326965/qid=1107523377/sr=2-2/ref=pd_ka_b_2_2/104-0594137-5743932 The first edition was published in 1984. I first learned C from the 3rd edition, and now they are on the 5th. I still use my copy as a reference from time to time when things slip my mind, and the appendices (particulatly the standard library reference and ASCII chart) are real handy in a crunch. It's by far the most worn book on my shelf (even more than all of my copies of Myers, Stroustrup, and GoF - which is saying something!).
Feb 04 2005
prev sibling next sibling parent zwang <nehzgnaw gmail.com> writes:
Before choosing the tools, consider what you want to create and have 
passion for.  A simple game project is often a good starter.


:< <>: wrote:
 I am curious if you guys can provide some advice on what tools I should arm
 myself with as I prepare to learn programming. I should make it abundantly
clear
 that I have no programming experience, just a desire that I would like to
 fulfill. Donít know why I am choosing D either but Iím sure itíll all be clear
 after gaining some experience.
 
 Thanks
 
:<


Feb 04 2005
prev sibling next sibling parent =?windows-1252?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
A bunch of smilies wrote:

 I am curious if you guys can provide some advice on what tools I should arm
 myself with as I prepare to learn programming. I should make it abundantly
clear
 that I have no programming experience, just a desire that I would like to
 fulfill. Donít know why I am choosing D either but Iím sure itíll all be clear
 after gaining some experience.

I don't think you should choose D as a first language. Even if it had been ready, which it isn't just yet... Here's my advice. Your first language should be a forgiving one, without compilation requirements, such as Perl or Python or so ? PHP is becoming increasingly popular, using web as a start. (JavaScript or DMDScript would probably also work just fine) While I wouldn't recommend BASIC to anyone, the GUI/IDE on Windows is not all that bad. (or RealBasic's for anyone else) The second language should probably be a managed object-oriented language such as Java or even C#. Just to learn the OOP ideom, and also getting used to compiling into code before running it. The code is still shielded from the actual machine, which is both easier when debugging and incidently also more binary-portable. As a third language then you probably want to get closer to the machine hardware, and see actual instructions and machine code. Languages such as C, or even assembler, are good for this job. Learning about underlying data structures and other programming theory, will also help out a lot with effiency and solutions. Then D should be a nice choice for a fourth programming language. Maybe it has even been released, by the time you get there... :-) (and hopefully it should keep anyone from ever having to learn C++) But your first task is to use a real name. ;-) And to get writing! --anders PS. I use Perl, JavaScript, PHP, Java, C and occasionally D, myself. If I did more GUIs, I would probably do more C++ and Objective-C.
Feb 04 2005
prev sibling next sibling parent reply Charles Hixson <charleshixsn earthlink.net> writes:
:< <>: wrote:
 I am curious if you guys can provide some advice on what tools I should arm
 myself with as I prepare to learn programming. I should make it abundantly
clear
 that I have no programming experience, just a desire that I would like to
 fulfill. Donít know why I am choosing D either but Iím sure itíll all be clear
 after gaining some experience.
 
 Thanks
 
:<


so I'll just mention that on Linux I generally use Kate. When you are debugging code, print statements are your friends. Use them liberally. As you write larger chunks of code, test routines become more important. These take a routine, or set of routines, and run it through tests of how it reacts to various different kinds of data. The idea is to cover all possible interactions within the routine, so that you can be certain that "This piece, at least, is working correctly." This drastically narrows where you need to look for an error. Were I you, and given my understanding that you have no prior programming experience, I would start with Python. This will let you skip much effort in figuring out the types of things and how to deal with them (at the expense of slow execution). Python is well documented, runs almost everywhere, and comes with a large collection of useful libraries. D is still too bleeding edge to recomment to a neophyte. I'd recommend Eiffel, but the SmartEiffel group is in the midst of a drastic rewrite at the moment and ISE Eiffel is too expensive. And Eiffel's libraries are quite limited. Python will let you learn about structures of data, control mechanisms, and all the basic principles. At some point, when you feel ready, pick up a copy of Knuth's Art of Computer Programming. Every programmer should read that at least once. (But learn Python first, so it will make sense. You might even wait until after D starts making sense. Also, if you do that, then the next edition may be out, which is rumored to use C code for the examples rather than MIX.) Another book to read (not a recommended first book, of first language) is Kernigan & Richie's C (The C Programming Language?). I find C too dangerous a language for ordinary use, and consider in principle the best language I've encountered. But it's too bleeding edge at the moment, and doesn't have a good collection of working libraries, so I can't recommend it to a beginner.
Feb 04 2005
next sibling parent John Reimer <brk_6502 yahoo.com> writes:
Charles Hixson wrote:


<snip several paragraphs>


 Python will let you learn about structures of data, control mechanisms, 
 and all the basic principles.
 

I wish I had started out with a language like Python when I first learned how to program, instead of BASIC. Python is BASIC-like in some respects but much more powerful.
 At some point, when you feel ready, pick up a copy of Knuth's Art of 
 Computer Programming.  Every programmer should read that at least once.  
 (But learn Python first, so it will make sense.  You might even wait 
 until after D starts making sense.  Also, if you do that, then the next 
 edition may be out, which is rumored to use C code for the examples 
 rather than MIX.)

Are you kidding?! Knuth's Art of Computer Programming is currently a 3 volume set of VERY indepth material, over 2000+ pages (I have the set sitting on my desk). While I've heard others recommend these books in the same manner you have ("every programmer should read them"), they are far from something a novice will want to just wade into someday: apart from using them in a computer science course, you would have to be quite self-motivated to study those books to completion. Realistically, the content depends on a detailed knowledge of symbolic notation and mathematics combined with some prior computer science knowledge. It's definitely not a casual read, and certainly not a necessity for every programmer to feel obligated to complete someday (please... don't tell me I have to read them ;-)). For those that are motivated, I'd certainly say have at it! But mentioning the volumes at this point would probably do more to scare the average beginner half to death. It's like slamming /Principles of Organic Chemistry/ on the desk of an elementary school student. Have you actually read all three volumes?
 Another book to read (not a recommended first book, of first language) 
 is Kernigan & Richie's C (The C Programming Language?).  I find C too 
 dangerous a language for ordinary use, and consider in principle the 
 best language I've encountered.  But it's too bleeding edge at the 
 moment, and doesn't have a good collection of working libraries, so I 
 can't recommend it to a beginner.

Which language do you consider is the best you've encountered? It looks like your line got cut off. Anyway, C is certainly a useful language for some things. I agree that it may not be the best first language, but knowing C will certainly help in learning D, if not for the simple reason that one must learn to manipulate the standard command line tools. - John R.
Feb 04 2005
prev sibling parent reply =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= <afb algonet.se> writes:
Charles Hixson wrote:

 When you are debugging code, print statements are your friends. Use them 
 liberally.

Just make sure to enclose them in "debug" statements, for any D code. http://www.digitalmars.com/d/version.html A much greater ally to have around is a source-level debugger, though.
 D is still too bleeding edge to recomment to a neophyte.  I'd recommend 
 Eiffel, but the SmartEiffel group is in the midst of a drastic rewrite 
 at the moment and ISE Eiffel is too expensive. And Eiffel's libraries 
 are quite limited.
 
 Python will let you learn about structures of data, control mechanisms, 
 and all the basic principles.

If you like Eiffel and for some reason stand Python, you'll love Ruby...
 At some point, when you feel ready, pick up a copy of Knuth's Art of 
 Computer Programming.  Every programmer should read that at least once.

As in: "before they die". Probably a good way to scare someone for life?
 Another book to read (not a recommended first book, of first language) 
 is Kernigan & Richie's C (The C Programming Language?).  I find C too 
 dangerous a language for ordinary use, and consider in principle the 
 best language I've encountered.  But it's too bleeding edge at the 
 moment, and doesn't have a good collection of working libraries, so I 
 can't recommend it to a beginner.

That should probably be "D" in your findings, but K&R is a good book. --anders
Feb 04 2005
parent Charles Hixson <charleshixsn earthlink.net> writes:
Anders F Björklund wrote:
 Charles Hixson wrote:
 
 When you are debugging code, print statements are your friends. Use 
 them liberally.

Just make sure to enclose them in "debug" statements, for any D code. http://www.digitalmars.com/d/version.html

purpose. Debug is too global.
 
 A much greater ally to have around is a source-level debugger, though.

I have used core dump debugging. I have no experience with any "source-level debugger" except in, e.g., Smalltalk. In that context I'll admit it was great.
 
...
 If you like Eiffel and for some reason stand Python, you'll love Ruby...

You're right. I do love Ruby. But again there's that terrible problem of insufficient or non-working libraries.
 
 At some point, when you feel ready, pick up a copy of Knuth's Art of 
 Computer Programming.  Every programmer should read that at least once.

As in: "before they die". Probably a good way to scare someone for life?

I did recommend that they wait until D was making sense. By that point Knuth should be readable. (I don't recommend working all the exercises...though if you DID feel like it, well, you'd be a programmer in a thousand. Or 10,000)
 
 Another book to read (not a recommended first book, of first language) 


 is Kernigan & Richie's C (The C Programming Language?).  I find C too 
 dangerous a language for ordinary use, and consider in principle the 
 best language I've encountered.  But it's too bleeding edge at the 
 moment, and doesn't have a good collection of working libraries, so I 
 can't recommend it to a beginner.

That should probably be "D" in your findings, but K&R is a good book.

it. A good collection of libraries isn't any short piece of work, so unless the compiler can somehow snarf up the C libraries (and for this purpose SWIG doesn't suffice...they need to be available, not "available with enough extra work") getting sufficient libraries isn't a short piece of work.
 
 --anders

Feb 18 2005
prev sibling parent reply Benji Smith <dlanguage xxagg.com> writes:
I'm going to make a few (probably very unpopular) suggestions.

In my opinion, someone just beginning with programming shouldn't have
to worry about compiling and linking their software. Learning about
variables and arrays and control structures is enough new material to
fill up their brains pretty quickly. Learning to write makefiles is
mind-bendingly difficult at that stage of the game.

Instead, I'd recommend a programming environment that requires no
compilation at all. Furthermore, I think it's also beneficial to have
a rich execution environment that provides lots and lots of
interesting functionality that's available even to a beginner.

As such, I have two standard recommendations for first programming
languages that I always give to beginners:

#1 -- JavaScript

JavaScript is a great language to start with because you can start
doing interesting things with just a few lines of code. You also have
access to the full breadth of functionality in your favorite browser's
Document Object Model.

#2 -- Visual Basic for Applications

VBA is a subset of the Visual Basic programming language, and is (in
my opinion) easier to start working with than regular VB.  VBA is the
scripting language for Microsoft Excel and Word, which both include a
rudimentary IDE for editing VBA code. Both Excel and Word provide rich
object models for interacting with the host application, and you can
see the results of your coding without compilation. Most importantly,
though, is that the MS Office VBA development environment includes a
debugger, allowing a programmer to step through program flow,
inspecting variable values and setting breakpoints.

I think it's a great introduction to programming.

Of course, once a new programmer is familiar with essential
programming concepts, I would recommend a programming environment that
doesn't need to execute in an application container (like JavaScript
and VBA), but that still doesn't require complex build scripts.
Probably something along the lines of PHP or Perl.

Then, as a third language, I'd recommend something compiled, like Java
or C or C++ or D.

--Benji Smith
Feb 04 2005
next sibling parent Benji Smith <dlanguage xxagg.com> writes:
Benji Smith <dlanguage xxagg.com> wrote:
#2 -- Visual Basic for Applications

I should have also mentioned that the MS Office applications allow you to record a macro which then gets saved as VBA code. So you can start recording the macro, then do a few things in the user interface, and then stop recording. Then you can inspect the code to see how the application's object model works. Also, Microsoft has included TONS of documentation for the functions available within each application's object model. Just enter the VBA programming environment and press the F1 key. --Benji Smith
Feb 04 2005
prev sibling parent John Reimer <brk_6502 yahoo.com> writes:
Benji Smith wrote:
 I'm going to make a few (probably very unpopular) suggestions.
 
 In my opinion, someone just beginning with programming shouldn't have
 to worry about compiling and linking their software. Learning about
 variables and arrays and control structures is enough new material to
 fill up their brains pretty quickly. Learning to write makefiles is
 mind-bendingly difficult at that stage of the game.
 

People are variable on how they need to learn new things. Your advice may be perfectly suitable for some, but not for others. So I don't think anybody could fault your opinion in this regard: that just may be the best approach for some people to learn programming. <snip>
 Of course, once a new programmer is familiar with essential
 programming concepts, I would recommend a programming environment that
 doesn't need to execute in an application container (like JavaScript
 and VBA), but that still doesn't require complex build scripts.
 Probably something along the lines of PHP or Perl.

I'm still of the opinion that d should NOT require complex build scripts either. The build process should have evolved by now away from the complicated makefiles of the C era. Work must continue on a easy-to-use standard d build tool. In its time, the Modula-3 compiler system came with some novel and simple build tools that made use of an integrated "quake" sripting langauge. I think d needs to provide similar utilities to help capture the world's imagination. Where is Steve Jobs' "reality distortion field" when you need it? - John R.
Feb 04 2005