Issues with your account? Bug us in the Discord!

Programming 101

I've been re-discovering my interest in programming recently, and I've decided I'd like to get into it more deeply. My previous experience is limited to some QBASIC courses in high school (taught by a math teacher with no experience, purely from a book) and lots of dicking around with HTML and CSS years and years ago that I've largely forgotten.

In short: I'm looking for good resources for teaching myself a language. I don't care what language, whichever is better for an introduction to programming. I've asked on other forums, and every time the topic's devolved into an argument as to what the "best" programming language is so nerdy that I can't make heads or tails of it all.

Books, sites, apprenticeships under ancient Chinese code-monks, whatever. Help me, First Ones!

(Also, and I know it's bad form to derail one's own topic in the OP, but it's really strange to think just how long ago it was that I was an active FirstOnes member, playing with HTML and talking to Argone. I became less active around here sometime around when I graduated from high school, a little over two years ago, and I guess it's been a very formative two years, because I'm frankly embarrassed by my own former self.)

Comments

  • CurZCurZ Resident Hippy
    Perl! :D
  • Yeah, I keep getting that response. :x
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    What sort of programming are you interested in? HTML and CSS aren't programming, they're web design. However, a related area is web application programming, which is languages like PHP (coincidentally also a good language to start with for that). On the other hand, if you're looking at programming desktop applications then a good language to begin with is Python. Start with the excellent [url=http://docs.python.org/tut/tut.html]tutorial[/url].

    If you want to learn to be a really good computer programmer, then you also need to understand how computers work inside (beyond the level of "stuff goes into the CPU, magic happens, cooler stuff comes out"). You should also give serious consideration to learning at least some assembly for a simple chip so that you know what happens beyond the high level of source code, and also learn about compiler design. You need to learn as many languages as possible. You need to know things like why a computer can't accurately represent decimal numbers, why you can't just chuck everything on the stack, etc. These are all necessary if you want to get the most out of a computer when programming it. In this paragraph, by "computer" I mean "anything with a microprocessor," not just "Windows- or Mac- or Linux-based computer."

    Of course, this advice is coming from a computer systems engineer. We deal more often with embedded computers (which typically lack an OS, or at least one with any level of management), so we handle the low-level stuff all the time. This means that if you just want to program desktop apps, that 2nd paragraph is probably less relevant (although I personally still think it's important; I've seen far too many application programmers who don't have a clue what their source code really does because they don't understand how it's all implemented underneath).

    If you want to go all the way, do what I did: design your own programming language. :p
  • Writing posts at 2am is really just a terrible idea. To clarify, I'm looking to pick up a language that's not terribly difficult to attain some basic level of proficiency in. I wasn't thinking of web design (I only mentioned HTML tangentially, as it's just about the sum total of my experience with code of any sort), though I've no reason to be opposed to the idea.

    I'm not looking into it as a career option (I remain staunchly dedicated to my goal of starving artistry :p), but rather as a means of personal edification. I'd like to learn to write some basic applications or some such, and see where it goes from there. I'm terribly, terribly interested in everything you're talking about, but alas I am cursed by mortality, and my reading list is already far too long for me to reasonably expect to get more than halfway through it before I die.

    Perhaps I'll find this to be something enjoyable and worth devoting a bit more time towards, and knock an author or two off the list to make room--that knowledge is my goal is here.
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    In that case, go with Python. If you want to do something with a GUI, get the Qt bindings for it (Qt is a cross-platform GUI toolkit). If you want to do something multimedia, get PyGame.
  • Neat-o. Thankee kindly. :)
  • For me personally, PHP is a fine language for simple web apps, but it quickly gets tiring for big systems. A pet peeve of mine is ability to declare variables by simply using them. Makes typing errors in variable names a frequent cause of notable bug hunts. Of web-oriented languages, PHP probably has the biggest number of standard libraries.

    Python, I know very little about.

    C is nice for low-level hardware-aware programming. Native applications which necessarily needn't be portable, especially if memory management must occur in the way you want, are often written in C.

    However, C is a fairly tricky language for the same reasons. You get to manage your own memory, get to choose whether you pass arguments by value or reference, get to reference and dereference pointers... and get many opportunities to make subtle mistakes. I would probably not recommend it as a first language.

    C++ is an object-oriented extension of C, supporting many advanced techniques to manage complexity... but some of them are rather complex themselves. :D Just like C, it is mostly platform-native, and thus suitable for writing operating systems, drivers, manually optimized or time-critical applications. Just like with C, portability must be thought of carefully in advance, and seriously planned for.

    I personally started with Pascal, but I suspect that language has fallen behind others and is fairly obsolete these days.

    When I need to do cross-platform apps with a graphical interface, I generally use Java. I am doubtful of whether it can be recommended as a first language. It is distant from hardware, typically running in a virtual machine. It follows similar principles as languags running directly on processors, but not as clearly, and is thus of lesser educational value about computer architecture.

    Java is significantly stricter and more long-winded than C, but contains many useful tools to manage complexity. Most of its implementations have a massive class library, in which you can find classes and methods for 99834 common tasks. Tools to develop with it are free (various JDK flavours, Eclipse and NetBeans development environments). The issue with Java is its unsuitability of interfacing with hardware, and unfitness for time-critical tasks (good luck guiding that rocket if the garbage collector just decided to busy up with freeing 123 megabytes).

    Assembly is neat. I used to write it a little, back in the old days. But I've shifted increasingly much into application and database development, where it's practically never used.

    And finally there's the Microsoft .NET family of languages... notably Visual Basic .NET and C#. They are usable languages, and often used in the business world. But their development tools aren't free, and thus I can't consider them future-proof. They also aren't effortlessly portable, since that is not in their makers' best interest.
  • Random ChaosRandom Chaos Actually Carefully-selected Order in disguise
    My primary experience is with PHP, Python, and Pascal.

    Pascal was a learning language and not much more - had 3 years of it in High School and haven't touched it since.

    PHP is what I do every day. It's good for web design, being a robust language that is easy to use and has lots of useful libraries. I disagree with Sleepy Shadow as we're working on a web application at work with around 2000 PHP files in it, and while we do occasionally have typo-type bug hunts, using a proper object model structure means that any such bug hunts are usually constricted to a one or two relevant functions.

    Python I use to help develop an open source game called Outer Space ([URL="http://www.ospace.net"]www.ospace.net[/URL]) which is a multiplayer server/client game written in Python with PyGame extensions.

    Of all of these, they are three very different languages so your choice should be what you're planning to do. If you're looking to application design, I'd recommend C++ or Java. If you're looking for highly structured scripted applications, go with Python. If it's web applications that you want, go PHP.

    Both Java and Python can also be used for Web Applications also.

    The advantage of PHP over other web application languages is that it's free. It also has very good online references available. I would recommend you to stay away from ASP - it's a MicroSoft language and thus has all the standard MS quirks.
  • FreezeFreeze Disguised as a Trainee
    If you still think Pascal is a "learning language", take a look at the CodeGear (former Borland) Delphi .. IMO it as powerful as C++, but with ten times more readable code :D

    [code]
    with pnlCinemaCraftStatus do begin
    if IsExeRunning ('cctsp.exe') then begin
    Color := clTeal;
    Font.Color := clWhite;
    Caption := 'running';
    end else begin
    Color := clMaroon;
    Font.Color := clWhite;
    Caption := 'stopped';
    end;
    end;
    [/code]

    Just a small sample ..
Sign In or Register to comment.