75 Comments
- klang, on 10/29/2007, -3/+76NO!
Learning a programming language has nothing to do with learning a GUI.
GUIs change all the time, while the command line, ascii and languages themselves remain more constant. - interiot, on 10/29/2007, -12/+73You started programming with VB, didn't you?
- RocketMike, on 10/12/2007, -4/+37Klang is spot-on.
GUI's are just another interface to a program; they're not part of the actual programming guts.
You don't need exercises to "practice" making GUIs - that's not programming. - shm1, on 10/12/2007, -1/+25Here's another copy of the same article:
http://smartprogrammer.blogspot.com/2006/04/15-exercises-for-learning-new.html - dr-steve, on 10/12/2007, -0/+15Been programming for 30+ years, have learned far too many dialects and languages.
To those commenting on GUI learning: that's the author's first comment ("learn the IDE")! By the time you finish the exercises, you will be well familiar with the IDE as well as the language syntax.
The article has a good set of exercises for learning the basic syntax. And nothing on learning what/why a particular language is an important dialect, what additional "recent trends" it incorporates into its core.
As far as I'm concerned, there are around three core languages: LISP, APL, and the rest. (I'm an avid and long-term LISP programmer, I've written around 4 LISP interpreters -- if you REALLY want to learn the nuances of a language, write a compiler/interpreter for a fundamentally different language. Write LISP in C/Java/VB/Fortran, or write Fortran in LISP.) (BTW, if you want to learn how to write extraordinary SQL queries, use everything you have learned in LISP -- applicative functions, mapping, filters, it is the same as highly nested SELECT, JOIN, etc. with appropriate GROUP/WHERE clauses). So begins the Language-As-A-Religion war. But it is fairly easy to move from PERL to C++; you're in a similar paradigm (sequencing, function, data abstraction). APL and LISP are a much longer leap.
Anyway, look at the list and you can eliminate at least half of the entries. You have
1. Basic I/O
2. Looping and alternation
3. Built-in functions
4. Output formatting and File I/O
5. System/information ("time/date")
6. String (three tasks for strings?!?!)
7. Homogeneous collections (arrays) (no structures?)
8. First-order operations (pointers, overloading, etc.)
Sounds kinda like the Intro to CS books I used to use when I taught!
-Steve - theevilmonkey, on 10/12/2007, -4/+16@takteek: Come one dude, his comment refers to the intrinsically gui-based nature of VB.
Besides, whilst VB is an appropriate tool in certain circumstances, everyone likes a bit of friendly VB bashing now and then, cheer up :)
The parent complaining about ignoring gui stuff when learning a new language seems odd to me though, you cant learn to use gui toolkits if you don't understand the syntax and basic language features. Terminal all the way for learning new languages, then gui. Or a web framework for that language. - AhmedB, on 10/12/2007, -5/+14Depends on the application, if it's a quick and dirty application with no real focus on performance and pushing it to the limit or some form of rapid prototyping, then VB or .Net can do it, but if you want to optimize your code to the last cycle then it's C/Assembly combination most probably (and yes in 2006 some applications or major parts of them are still 'hand coded' in assembly).
- unidentified, on 10/12/2007, -2/+10@theevilmonkey
Damn straight! What other language could give him that impression? We aren't just bashing visual basic by asking if that's what he programs with. It's actually very logical, as stated by evilmonkey that's the way visual basic works. The guy probably made a button in VB that displays a picture before dropping out of high school, and now has the impression that programming involves drawing buttons that link to images and pre-written applications that you simply fill in the blanks for.
You can make some sweet games in VB, it's become a very powerfull language, but unless you really get into it and actually create something worth while, it's just going to give you the wrong idea. Of course you could never create an operating system in VB, and it does teach some bad programming habbits, but you would be hard pressed to find a C programmer (windows based) who doesn't know some VB. - zephc, on 10/12/2007, -1/+9his points can be distilled to one point: practice, practice, practice.
- AhmedB, on 10/12/2007, -1/+8Developers, Developers, Deverlopers, Developers!
Developers, Developers, Deverlopers, Developers!
Sorry man, didn't mean it but "practice, practice, practice" sounded close to it :) - boredzo, on 10/12/2007, -3/+8R.I.P. server.
- tylerni7, on 10/12/2007, -0/+5I'm 15 and know Perl, PHP, C, ActionScript, Basic, Python, and VB. See younger people than you can brag too. Now really GUIs are perhaps the least important part of a program. That's like saying (although sadly it's been said on digg before) that a computer has to have graphics. When you are pushing for performance, graphics make things slower. A real language should have the option of using a GUI or not. And also, stuff takes a lot longer in VB than a lot of other languages. As great as you think VB is, it really isn't that powerful. And also, I'd say start learning to program with Python, because you learn a lot of important things, it's easy, and it will be useful later on in life (although VB can too I suppose)
- starsky51, on 10/12/2007, -0/+4@Grimboy did you not read Scarblac's comment?
Different languages are designed to solve different types of problems. Getting used to the syntax might help you when you're writing a 'hello world' program but understanding the problem and the design implications is more important than knowing where to stick your curly brackets. - dannywoodz, on 10/12/2007, -2/+6C is not strongly typed: it is weakly typed. Strong typing is where the object that you're referring to knows what type it is. In C, you cannot ask whatever's on the end of a void* what type it is: you just have to have some way of knowing. It is, however, statically typed: the compiler knows about variable types and will tell you about operations that are inappropriate for the declared types. The opposite of static typing is dynamic typing, typically seen in languages like Smalltalk, Lisp, Ruby, Python, etc. Here, the variables are not typed, but every object knows what operations it's allowed to perform at runtime.
- klang, on 10/12/2007, -2/+6I don't know about C++, but I don't think it's more strongly typed than C..
Java is strongly typed. The compiler doesn't let you cast to a random type. - AhmedB, on 10/12/2007, -1/+5What about defining/declaring data structures no matter how complex they are, I remember a sentence from one of the books (or maybe it was a professor) who said: No matter how complex your algorithm is, a suitable data structure can make it very trivial, on the other hand an unsuitable data structure can make it a living nightmare.
- tony23, on 10/12/2007, -1/+4Learn to code in Whitespace - everything else will be easy, then:
http://compsoc.dur.ac.uk/whitespace/ - klang, on 10/12/2007, -2/+5First of all .. $foo is a legal variable name in Java.
Second of all .. php is more or less an untyped language whereas Java is strongly typed.
Third .. Lisp is a totally different beast as indicated above, it is a totally different way of thinking than OO or Imperative thinking.. - Scarblac, on 10/12/2007, -1/+4Not really, the language does make a difference. Trivially so if the languages are completely different (like Haskell has really no similarity at all to Java), but even in so-called "mainstream OO" languages the presence of different language features means you use different patterns.
For instance, languages like Ruby and Python are big on "duck-typing": a sort of loose definition of typing, an argument to a function doesn't have to be a specific class, but rather loosely implement some interface. In Python you can do "print >> ob, string", and it will work as long as ob has a function named write(), that doesn't cast an exception if you pass it a string as an argument - no other requirements.
That's rather different from languages like Java, where an object needs to implement all of a specific interface with a specific name.
In Perl you can re-bless an object so that it's an instance of another class, at runtime...
Another big difference between languages is in their standard libraries, things that are trivial in language A because it's part of the language or part of the standard library and therefore are a very common idiom, are almost never used in language B because there that method needs some external library, while there's another way to do it that IS part of the language.
It all means that in different languages, the best design patterns to use in similar situations are often different. - fkuall, on 10/12/2007, -1/+4neat idea, i'd never thought of doing that.
good article, nice short read. i can see how it could really make learning a language easier. - Takteek, on 10/12/2007, -24/+27I agree with klang and RocketMike, but what is this "You started programming with VB, didn't you?"
Why do programmers and computer people feel the need to put down anything that is easier to use?
Oh no! Someone with less knowledge than me can do the same job as me in half the time! They're obviously using an inferior programming tool. - klang, on 10/12/2007, -1/+4tylerni7,
"I'm 15 and know Perl,.."
For a 15 year old, you certainly have caught what programming is about; ..1) selecting the right tool for the job. 2) making sure, that you have as many tools to select from as possible.
Keep it up, but do something else with your time as well; take a run, mountain climb, bungy jump .. whatever .. it clears the mind when you are stuck. - OrangeTide, on 10/12/2007, -5/+8goo-what? never heard of them. J2EE has little to do with GUI programming.
before you do anything you need to go onto a forum or chat room and demand that people teach you and debug your programs for you. That's an excellent way to learn a new language. - sensibledriver, on 10/12/2007, -2/+4^ Asshat.
- interiot, on 10/12/2007, -2/+4Tcl, forth, make, and cmd.exe all have semi-obscure syntax that isn't immediately apparent. And if you don't have experience with functional languages, you have more than to learn than parens when trying Lisp.
- rubycon, on 10/12/2007, -0/+1Just in case anyone is still reading this:
I have implemented the exercises in Ruby. It can be found here:
http://www.rubyrailways.com/implementing-15-exercises-for-learning-a-new-programming-language/ - pauldonnelly, on 10/12/2007, -1/+2@Grimboy
Lisp is different in more than syntax, you know. - greyfade, on 10/12/2007, -0/+1i'm rather proud to say i got my start on CB/M BASIC before moving up to 6502 assembler, QBASIC, C, VB3 (as opposed to today's monstrosity), C++, and now nearly a dozen interpreted languages, including Perl, Python, Ruby, REBOL, and others.
get a Commodore 64, you wusses, and learn to hack it. :D (assembler does the mind good!) - mhatrep, on 10/12/2007, -0/+1@dr-steve
>> But it is fairly easy to move from PERL to C++;
I don't agree. Perl needs a different mindset. It's easy to move from sed/awk/shell programming to Perl.
C++ by definition doesn't support regular expressions so you need an additinal regex package.
As far as OO features in Perl concerned, I always feel they don't blend well into the language by design. - duality, on 10/12/2007, -1/+2"In other words, is the language C ?"
True, C is the only language I know of that has all of those features, but none of them are completely unique to C .
* Operator overloading is a feature in Ada.
* Virtual functions are a feature in C#.
* References are a feature in Java.
* Pointers are a feature in Assembly language (for practically any processor).
After reading the copy of the article posted by shm1, I think that is a pretty good exercise. However, I would also add to it that you should learn how macros/pragmas/preprocessor directives work in your new language too. Aside from the major paradigms like object-oriented, functional, imperative, et al, these are the things that make the most difference between one language and another. Java is the only language I can immediately think of that has no such system implemented in it.
(Oh, and if you have a long list of languages that you're trying to learn, insert Prolog third from the top unless you already know it, or it's higher than that already, or time doesn't permit it, etc.) - klang, on 10/12/2007, -0/+1Here is a list of 264 different implementations of the popular ""Hello World" program:
http://www.roesler-ac.de/wolfram/hello.htm
Yes .. even the language ***** is "just syntax" ..
++++++++++[->+++++++>++++++++++>+++++++++++>
+++++++++++>++++>+++>+++++++++>+++++++++++>+
+++++++++>++++++.
..might have to exchange the "just" for dificult.. - rushiku, on 10/12/2007, -1/+2"i am needing a code for 2 control enterprise financial system please u send me hurry its urgent!!!!!!!!"
Yeah, I know that guy. - mikaelc, on 10/12/2007, -1/+2C# has all of the above features (for pointers it is necessary to use unsafe mode.)
- N432SEAN, on 10/12/2007, -1/+2@"Once you learn a strong typed language such as C, it is very easy to move about diffrent languages."
Ever try Prolog?
Didn't think so. - RocketMike, on 10/12/2007, -3/+3Odd, http://www.duggmirror.com/programming/15_Exercises_for_Learning_a_new_Programming_Language/ doesn't seem to work.
- antdude, on 10/12/2007, -3/+3Thank you. :)
- webtweakers, on 10/12/2007, -0/+0@greyfade: Yes, I experienced C64 Basic and Assembly definetely as a good start: it will teach you to write optimized code, 'cos the limitations of the machine are quite tight.
I don't see how the exercices in the article are gonna help much. Sure, you'll learn some basics, but - depending on the language - it won't get you much further than like 1% of what the language has to offer. The writer does give some good tips though: reference cards (or anything simular) are a must; start off with a simple 'Hello World'. Trying to grasp the structure a programming language opposes is the hardest part, imho. Java and C enforces you to work 100% object oriented. PHP doesn't enforce anything.
Try to get a hang of the language syntax and data types. Experiment with examples available on the net.
(oh, and I won't even start summing up all the languages I've learned in the last 20 years - sigh :) ) - ilitirit, on 10/12/2007, -2/+2@"a strong typed language such as C"
@"I don't know about C++, but I don't think it's more strongly typed than C.."
Wtf. C++ has better type-safety than C, but neither are really strongly typed. - dwhitbeck, on 10/12/2007, -1/+1I liked Delphi before .net. Pascal in this form is more than a "teaching language." It has a logical syntax, strong typing, inline assembly and very rapid compilation. For mathematical problems and recursive solutions, Clean is a very interesting language. VB was always a load of crap, foisted on programmers by Bill Gates who thinks he invented Basic.
- klang, on 10/12/2007, -1/+1Different tools for different jobs.
list, functional, imperative or object oriented languages can all be used to get the job done .. if you are sufficiently skilled...
If you are forced to use a specific tool, looking at the 15 excercises will get you started.
What TFA basically says is: look for things you know in the language you don't.
The corollay of course is: Given a choice; choose the language you are best at! - dailo10, on 10/12/2007, -0/+0I recently read Bruce Eckel's well-written piece entitled "Strong Typing vs. Strong Testing". Good stuff... I digg it.
http://www.mindview.net/WebLog/log-0025 - Eeqmcsq, on 10/12/2007, -2/+2Maybe C++ is his strongest language, and he uses that as his basis for learning other languages.
He does mention namespace/package/module, so it sounds like he's been through Java, and whatever language uses "module". - bestechgear, on 10/12/2007, -0/+0Is there a summary online comparing the uses for various languages with advantages and disadvantages?
Here is the information I would think would be useful about each language:
practical applications
Hello World Sample
Compilers
Speed Comparison's for various programs
Advantages
Disadvantages
Learning Curve
Resources
Some languages I would be interested in Perl, PHP, C, Java, .NET, VB, Qbasic, LISP, Assembly, Python, Ruby. - Lutja, on 10/12/2007, -1/+1I still love delphi for asp.net - Its better in every possible way than the *.asp.net implementations in visual studio.
- cheerio, on 10/12/2007, -6/+6Once you learn a strong typed language such as C, it is very easy to move about diffrent languages. I find it easy to just read some code that does something very similar to another program you have written in your language of choice. From this you can easily pick up programming structure, declartion, etc. Also a very big plus is getting a IDE that supports code completion, this way you dont have to actually memorize every function in each programming language. You will notice that function naming conventions in most languages are the same. Just my 2 cents.
- zzleeper, on 10/12/2007, -3/+3anyone got a mirror working?
- interiot, on 10/12/2007, -1/+1@sbrown123: I did QBasic -> C -> VB -> (college) -> Java -> ..., so it's okay if I said "you started with VB", right? :)
VB just gives people a bad first impression... like that there's no main event loop, or in terms of chicken-or-the-egg, that GUIs come first, and then somehow your code magically runs... and that GUIs are almost never dynamic... windows just magically get initialized all at once. (though I suppose Perl associative arrays make people think hashes are limitless in size and hash functions are something only cryptographers use, and SQL makes people think that B-trees are always fast and easy to access)
@Takteek: I violated WP:NPA, shame on me.
@RocketMike: System APIs *can* be important to a language... I'll avoid programming languages that don't a decent set of string tools if I can. And one of the most positive things I've heard about Java, even by detractors, is that it has a well-developed and consistent set of standard APIs. That said, many people still consider APIs (including GUI) to be frosting on the cake. - lobrien, on 10/12/2007, -0/+0I propose a set of exercises that are closer to what you'd expect of a person claiming to "know" a language well enough to get hired: http://www.knowing.net/PermaLink,guid,f3b9ba36-848e-43f8-9caa-232ec216192d.aspx
- mikaelc, on 10/12/2007, -1/+1The concept of "Strongly typed" languages is not an objective measure - see e.g. http://en.wikipedia.org/wiki/Strong_typing. Personally, I see "strongly typed" as something connected to how many errors the compiler will catch during compilation instead of at run-time. (I would call C++ strongly typed)
DannyWoods: I disagree that "strongly typed" is equal to whether you can determine the type of an object at run-time. This would be 'reflection' (which actually is supported in C++ through RTTI).
As already pointed out, C++ is certainly statically typed, and has better type-safety than C - it has a 'safe casting' operator ('dynamic_cast') which checks for types at runtime. - appy77, on 10/12/2007, -1/+1cute, funny. those who dont get the message may bury this comment. ha!
-
Show 51 - 75 of 75 discussions



What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the