MetaChat REGISTER   ||   LOGIN   ||   IMAGES ARE OFF   ||   RECENT COMMENTS




artphoto by splunge
artphoto by TheophileEscargot
artphoto by Kronos_to_Earth
artphoto by ethylene

Home

About

Search

Archives

Mecha Wiki

Metachat Eye

Emcee

IRC Channels

IRC FAQ


 RSS


Comment Feed:

RSS

25 February 2007

I have harvested the following links from AskMe and I am going to learn how to program. [More:]

42541
14546
14565
32692
45683
16441
18023
18082
52830
tags

I'm leaning towards starting with Python, then maybe Perl and/or Java. I have/had a copy of Visual Studio lying around with a C++ compiler, which I'd also plan to learn at some point. Flash, too, down the road; at least well enough to make silly animations. I'm thinking 1-2hr. a night just codewonking until I feel comfortable in each language.

Anyone is welcome to add any helpful links (AskMe especially cause I can favorite those) and I welcome advice/suggestions/warnings/ridicule/slander/naked pictures. No innuendo, please. Serious inquiries/hotties only.
Oh, and if I want to make stuff work for Greasemonkey, what do I need to know?
posted by Eideteker 25 February | 21:18
To make greasemonkey scripts, you'll need to know Javascript, a little bit about the DOM, and perhaps some XPath.

I recommend staying far away from C++ in the beginning. It is a large and complex language to learn, especially if you do not already know C. C++ tries to make it harder to shoot yourself in the foot than C, but it is still exceedingly easy to do if you're not careful.
posted by Rhomboid 25 February | 21:21
"1-2hr. a night just codewonking"

You may want to re-evaluate this. Since this is your first language (self-taught at that), 8 to 12 hours a day for 3 or 4 weeks is more realistic. I have a CS degree and I am about to learn Ruby; I am laying in coffee, protein bars, frozen fruit for smoothies, a freezerful of frozen dinners and a cupboard of canned soups cuz I expect to be a hermit for the entire month of March. Even then I don't expect to be any more than a middling hacker, and certainly nowhere near an expert.

Python is a good start. Perl and Java are pretty much mandatory nowadays.

C is a dumptruck. Very good for heavy loads. Unless you plan on directly writing code for a project as complex as, say, a compiler or an operating system, don't bother with C (as well as C++ by extension, pun intended). As one of my profs at Georgia Tech (and a C aficionado at that) quipped, C is little more than bloated assembly language.

posted by mischief 25 February | 21:50
8 to 12 hours a day for 3 or 4 weeks is more realistic.

While I have two jobs, this is not practical. If I had a laptop, I could possibly code on the train to and from work to get another 2 hrs, but I don't mind moving more slowly if it allows me time to sleep (which I have not gotten enough of in weeks now). This is purely for my own use. I may use it to get a job some time in the future, but I'm not worrying about that now. I just want to have fun with it.

Back when I was learning to program, it was C++ or BASIC. Pascal was for learning how to think the way you'd need to think once you got to C (oh, and there was Assembly and Machine Code but we didn't talk about those in polite company). Now that there's python and ruby and perl and java and flash and so on, I realize that's not as necessary. I never really had a problem with C++, though; I tend to enjoy coding in it (or I did, 10 years ago when I was learning it in school). Also, I think a wider exposure is nice because it lets me learn a little about the strengths and weaknesses of a given language, and it keeps me from learning bad habits in any one language. I'm more interested in theory than anything else, and in learning to think in terms of a program (I often figure problems out in pseudocode as it is; it'd be nice to be able to code for real and try some of those things out); so practical knowledge is not the utmost in importance. Also, I pick up languages ridiculously quickly (I once programmed a robot in BASIC Stamp II w/in 5 days, with no prior exposure to BASIC coding).

But yeah, I was going to save C++ for later on. Thanks for the comments!
posted by Eideteker 25 February | 22:11
That's harsh - C is hardly bloated. It's actually one of the more streamlined high level languages.

C# and Java are very close to each other in terms of language features. The syntax is pretty dang close and there's a lot of similar functionality in the runtimes.

Sharp Develop is a decent enough free environment for C#.

Eclipse is and IDE that will give you Java and several other languages too.

I remember reading a quote from a comic book artist at a con was asked for advice for getting into the business. He said to get a big stack of paper and start drawing.

Coding is the same way. Write lots and lots and lots of code.

Javascript? For your greasemonkey scripts, sure, I guess. It's a pretty sloppy language. I don't really care for it and the typical patterns in it.

If you want the full experience of language geekery, I'd start with a garbage collected OOP language (C#, Java, Python, Ruby), then a non-GC language, then be sure to try a prefix language (Lisp, Scheme), a Postfix language (PostScript, FORTH), maybe hit up an oddball language like Miranda or Prolog. Be aware that following this path will take you about 3-5 years depending on how much time you spend on it.

I'm a big advocate of learning an assembly language, but then again I'm old-fashioned that way. x86 is a nasty assembly language. PowerPC is not bad. My favorite is really 680x0 class - it's a fairly consistent and neat as far as assembly languages go.
posted by plinth 25 February | 22:36
plinth, look at C from the context given. The prof didn't say C in and of itself was bloated; he was making a comparison.

@eideteker: If you already know how to program in other languages, then no, you don't need to invest as much time to be a hobby hacker.
posted by mischief 26 February | 00:56
That's harsh - C is hardly bloated. It's actually one of the more streamlined high level languages.

C is a cross-platform assembly language. I (obviously; my username refers to it) love it, but I do really think that people need to view it with fear and concern, because it isn't a high-level language at all, and unless you're skilled with it, you're quite likely to fuck up badly if you use it for a large project.

x86 is a nasty assembly language.

It's actually not that bad if you use NASM.
posted by cmonkey 26 February | 00:58
Thanks for posting this Eideteker. I've been thinking about doing the same thing for some time now, and was just about to start in with Java. Is it generally agreed that starting with Python is a better plan?
posted by Rock Steady 26 February | 01:12
Rock Steady:

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


Python
print "Hello, world!"


You decide.
posted by mischief 26 February | 01:30
If you're doing this for fun, then I'd recommend PHP. The language purists are going to hate me for saying that. The great thing about PHP is you can easily create useful stuff. And you can put it on the web and show it people. It's hard to do that with Ruby. Python, etc.

Like plinth - I also am a fan of learning a bit of assembly language. It never did me any harm.

Whatever you do, Good luck. Because of the complexity of modern programs, this is not a great time to be learning to program.
posted by seanyboy 26 February | 03:07
On javascript.

It looks as though ECMAScript (Another name for Javascript as far as I can tell) is going to be the language du jour shortly. I fully expect to see an ECMAScript server framework in the next year and I think people are going to go mad on it. For this reason, it's worth spending some time with the DOM and javascript on the client end to get yourself ready.
posted by seanyboy 26 February | 03:12
I wouldn't say I know how to program in other languages, just that I learned some basic commands in a few languages over a decade ago. It's like how I know some Spanish, but I'm far from fluent in it.

All of this is very helpful, I assure you.

Glad I can help, RS. I wouldn't have posted this if I didn't think someone else wouldn't benefit.
posted by Eideteker 26 February | 06:22
Consider your case made, mischief.
posted by Rock Steady 26 February | 07:22
Eideteker: The reason for the time difference in the learning curve semi-relates to the language but is more about learning how to program in and of itself. Toward that latter end, the choice of language is virtually immaterial.

Most universities now do not even begin their computer science curriculum by teaching a language, but instead introduce students to pseudocode; it looks like source code but the designer is not constrained by a finite vocabulary to describe what he/she wants to build. The meat of programming is in the design process, or more formally, in the engineering. Anyway, enough of the lecture. Whatever you decide, you will find a lot of help on the web.

I agree with seanyboy about PHP. Nothing shows off your abilities better than giving someone a URL they can input on their own computer. For that matter, the skillset involved in simply serving up a raw html file from your own domain is well worth the time invested.

Rock Steady: Thanks to your inquiry, I think I am going to lump Java in with C as being for the hardcore codewriter. Just as C gets right into the meat of manipulating individual bytes, Java allows the programmer to manipulate the very core of the object paradigm. Most people don't need that fine a control.
posted by mischief 26 February | 10:35
Before you do anything else, read The C Programming Language by Kernigan and Ritchie. And then put C/C++ on your to do list, after you've re-read the book a while. In the meantime, read about Edgar (Ted) Codd, and SQL (Structured Query Language), and become a master of SQL before you waste any time learning "real" programming languages. In the real world, 90% of "programming" is getting a good RDBMS system to retrieve, maninpulate or store data efficiently, and if you're good with SQL, you can be an awful coder and still be an effective, and innovative "whiz." RDBMS are already 100x as good as anything you'll learn to write in any programming language in this lifetime yourself, and so not being fluent in SQL before you start trying to program is getting the cart before the horse, badly. Learning SQL is relatively easy, but not learning how it really works, RDBMS by RDBMS, and gaining some familiarity with related RDBMS features like stored procedures, triggers, and views is hamstringing yourself needlessly, in any environment in which an RDBMS is available, and a Ada/Algol/ASP/Awk/BASIC/C/C++/Cobol/Forth/Fortran/Java/JavaScript/LISP/Pascal/Perl-
/PHP/PL-I/PostScript/Python/RPG/Smalltalk/TcL/TeX/*insert your favorite deprecated language here* means of accessing the RDBMS exists. I think even Ritchie has said that, if he knew how prevalent SQL would become, he'd have thought hard about C language array functions, data types, and the very nature of a programming language, in light of that. The very nature of an RDBMS is to substitute a few simple calls to the RDBMS for hundreds of lines of code, and thus make programs not only more robust, vastly easier to debug and maintain, but also far more portable.

Once you have SQL in your head as second nature, I think Java makes as much sense as anything, as a first programming language, particularly if you want to write human interactive applications, which is generally what new programmers get suckered into doing. "Hello, World!" in Java is sensible, if dull, and Java can give you a ton of GUI interface functionality in just the old AWT and Swing classes, although some would say it's an ugly kind of cross-platform face.

But the real power of Java is that it extends, through JDBC, J2EE, JavaBeans, and various related technologies into larger systems, where RDBMS functionality is only normally only a call or a method away, and where even presentation layer work may be abstracted for the hardware available, by specialized non-Java systems. There are even Java native RDBMS systems appearing now, if you're entirely catholic in your Java persuasion. And frankly, for a beginner, interested in seeing his code "work," Java is hella more rewarding than C, if for no other reason than automatic garbage collection.

As for the injunction given by others to plunge right in and write a lot of code, I don't generally recommend that route, personally. The simple reason is that you don't generally learn any other language by writing it, as much as by reading it. Personally, I think you should read and an thoroughly understand at least 1000 programs in any language in which you are seriously interested, before you try coding anything on your own. You'll save hours of frustration, you learn what good coding habits and good style amount to, and you'll have some sense of what a decent approach to common problems generally is, when faced with similar problems yourself. And it's not as if there aren't thousands and thousands of decent example programs hanging about.

Finally, before you start learing any language, learn a bit about software engineering. Be able to install, and use a CVS, for example, so that, as you code, you can maintain some change history, and produce builds of your programs that can actually be useful in teaching you how to improve. Learn to use basic and advanced techniques for debugging, and know your IDE of choice (Eclipse being not a bad one for Java). Learn about the threading model of execution, and how that is implemented in the languages and operating systems you choose to learn.

And then, with all that in your head, pick up a programming book, or 10. Because the world doesn't need yet another cracker.
posted by paulsc 13 March | 22:39
Learn an object-oriented language, a procedural language and a functional language.

Learn them by doing a fairly large project in each.

Once you've done so, learning additional languages should be extremely simple.
posted by I Love Tacos 14 March | 11:35
Radio kyleg makes a triumphant return || Okay - I wanna be the first person to say this....

HOME  ||   REGISTER  ||   LOGIN