Author Topic: I want to learn, I swear!  (Read 10641 times)

0 Members and 1 Guest are viewing this topic.

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
I want to learn, I swear!
« on: December 23, 2009, 03:59:21 pm »
So I know I've posted multiple times in this subforum (and I'm sure other times in other locations as well), but since I have to learn programming anyway, I've decided to take an active interest in it.

What language(s) would you recommend starting out with, given I have programmed a little before but nothing too in-depth? I'm in the process of learning MATLAB, which is a C derivation (I believe). Is C a good language to learn, in general? And, compilers/debuggers for any language is a must. Also, good beginner's guides that explain structure, data manipulation, etc. would be good accompaniments.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #1 on: December 23, 2009, 04:05:50 pm »
That's really a difficult question to ask, and there's no single answer. Which language to learn depends greatly on what your intended goals are, and what you're good at.

C is a great language. If you are comfortable in C, you can get comfortable in anything. I use it quite a bit, myself.

That being said, Java or C# are useful if you intend to write bigger applications or want to learn object oriented programming. They're the most common languages used in enterprises, in my experience, and are useful that way. I don't use these much, though.

If you're more interested in the Web/HTML stuff, then Ruby on Rails, PHP, or even C# are good things to learn. Ruby has become incredibly popular lately, and it seems to be a nice language. I don't personally know Ruby, but I use PHP on occasion.

And finally, if you want to write quick stuff or you need to automate tasks, you should learn a language that I would call a "scripting" language, like Perl, Python, PHP, Ruby, Lua, etc. These are usually quick and simple, but also powerful. The vast majority of work I do is in languages like this, in my field.

Hope that helps!

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: I want to learn, I swear!
« Reply #2 on: December 23, 2009, 04:34:19 pm »
Well, I can specify about my goals I think..
I don't know so much if I'll need to make large applications at any point; industry standard in my field is very much so MATLAB-oriented. But my current project requires me to call certain functions from DLLs, send out commands to different peripherals connected via a GPIB port, and then receive certain data input. But obviously I have other interests in modifying programs, maybe making a custom plug-in or two for something. And a future use I could have is writing scripts for *nix systems; which language would be best for that?
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #3 on: December 23, 2009, 04:42:31 pm »
That's all pretty generic stuff, so skills from learning any language will cross over to most of it.

Your best bet, in my opinion, would be to start with one of the "scripting"-style languages I mentioned -- Perl, PHP, Python, and Ruby are all great languages, and powerful in their own way. I'm partial to Perl, myself, but Python and Ruby are more modern.

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: I want to learn, I swear!
« Reply #4 on: December 23, 2009, 04:59:02 pm »
Any books you know of [and would recommend] for either of the 3? As well as compilers? Currently on WinXP.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #5 on: December 23, 2009, 06:40:51 pm »
They are all free, you shouldn't have any problem finding an interpreter for them.

And no, I don't use books.. I generally read the online docs + look at others' code till I know what's going on. :)

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: I want to learn, I swear!
« Reply #6 on: December 23, 2009, 09:17:37 pm »
Perl ... quick and simple
Error: division by zero
As for MATLAB, I hated learning it, and have promptly forgotten all of it.
Anyway, Perl is very powerful.  For Windows, you'll need ActivePerl, which is annoyingly bulky, or MingW (where you might have to compile Perl first), though I still recommend it.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: I want to learn, I swear!
« Reply #7 on: December 23, 2009, 09:29:10 pm »
If you want to get into serious programming, with the exception of C#, just don't do it in Windows. It's not worth it. An Ubuntu VM will set you back maybe 5GB of disk space and will run comfortably in 512MB of RAM, probably even 256.

EDIT -
If you want to get into web programming, Ubuntu Server is your friend. I don't think ubuntu-server and ubuntu-desktop packages are mutually exclusive, and the server package installs PHP, MySQL, Apache, etc, automatically. Just make sure you use the ubuntu-desktop kernel, since the server kernel is not true 64-bit and uses Physical Address Extension, which some VM's don't support.
« Last Edit: December 23, 2009, 09:30:49 pm by Joe »
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline warz

  • Hero Member
  • *****
  • Posts: 1134
    • View Profile
    • chyea.org
Re: I want to learn, I swear!
« Reply #8 on: December 24, 2009, 02:50:42 am »
If you're already working with something like C then sure, go with C. You will learn plenty of valuable practices, hopefully, while learning C. You could start with something like Python, but I wouldn't recommend it. Python is a great programming language but it's not something I would suggest to somebody for something like this. If I were you, I'd go with C++, Java or C#. From those you will learn the most valuable programming knowledge you can.
http://www.chyea.org/ - web based markup debugger

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: I want to learn, I swear!
« Reply #9 on: December 24, 2009, 03:49:03 am »
@warz: +1 for continuing a lost cause. :)
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #10 on: December 24, 2009, 08:23:53 am »
I don't recommend C++ -- it's an ugly hack. :)

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: I want to learn, I swear!
« Reply #11 on: December 24, 2009, 12:43:39 pm »
C is good.  It's very minimalistic, but unless you know what you're doing, it's easy to become a master spaghetti code chef.

Personally, I'd recommend Java, C, C# in that order.  While perl, python, etc. can be useful, I think they're limited in some annoying ways.

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: I want to learn, I swear!
« Reply #12 on: December 24, 2009, 01:29:43 pm »
For *nix scripts, can you theoretically use any language or are there specific ones?

@Sidoh: Java? I've never understood what's so great about that language, care to fill me in?
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #13 on: December 24, 2009, 03:47:51 pm »
"*nix scripts" can mean multiple things. At the core, shellscripting is generally done in one of the shell languages (bash, sh, zsh, csh, tcsh, etc), using their built-in functions and Linux's utilities. I use that a lot, and it's generally easy to pick up. It's really about knowing the tools and what they can do (grep, sed, awk, join, etc etc)

More generally, scripting languages can be considered any language in which you can write something quickly without a lot of planning/structure. Those can include any language, if you think about it hard enough, and I do use C as a scripting language on a regular basis (normally when I need to process binary data of some sort, and I don't know how to do it in any other language). In generally, though, Perl, PHP, Python, and Ruby are what most people consider languages that are good for scripting.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: I want to learn, I swear!
« Reply #14 on: December 24, 2009, 04:03:03 pm »
@Sidoh: Java? I've never understood what's so great about that language, care to fill me in?

What about other languages do you understand that gives them an advantage over Java?  Unless you're writing software that's really performance critical, C has almost no advantage over Java.  Java is object oriented and has loads of libraries at your disposal so you're not writing or searching for software to do very trivial things, unlike C, and is syntactically consistent and is overall much cleaner than C++.  C# is fine too, but unless you start with the basics, I think it's very easy to get overwhelmed with all of the capabilities of the .NET framework.

It's also a rather non-trivial advantage that you get cross-platform compatibility for free.  It's awesome to be able to go on any computer I own and pick up development from where I left off, despite that it was started on linux while I'm on OSX now.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #15 on: December 24, 2009, 04:18:18 pm »
Java is object oriented and has loads of libraries at your disposal so you're not writing or searching for software to do very trivial things, unlike C, and is syntactically consistent and is overall much cleaner than C++.
Object orientation is often more harmful than good to a new programmer, because it's a trickier paradigm.

Also, doing things from scratch is a good way to learn. You should have an understaning of how sort() works, THEN you're at the point where you never have to use it again. :)

Another advantage of Java over C#, by the way, is that Java is free. You can develop Java in a nice IDE (Eclipse) for 100% free, whereas Visual Studio will set you back a lot. I actually get free versions of Visual Studio from Microsoft conferences and courses, but I don't think there's a free one available for general people (I could be wrong, though).

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: I want to learn, I swear!
« Reply #16 on: December 24, 2009, 04:39:28 pm »
Object orientation is often more harmful than good to a new programmer, because it's a trickier paradigm.

That's true, but for beginning programmers, they don't have to use any of the OO features.  Sure, there's a bunch of extra boilerplate stuff they have to deal with, but I'd hope it's something that's manageable.

Also, doing things from scratch is a good way to learn. You should have an understaning of how sort() works, THEN you're at the point where you never have to use it again. :)

That's true, but sometimes it's easier to learn something if you're able to treat something as a black box.  For example, not having something like ArrayList or vector is pretty fucking annoying in any cases.

Another advantage of Java over C#, by the way, is that Java is free. You can develop Java in a nice IDE (Eclipse) for 100% free, whereas Visual Studio will set you back a lot. I actually get free versions of Visual Studio from Microsoft conferences and courses, but I don't think there's a free one available for general people (I could be wrong, though).

You are. :P

The Express editions of Visual Studio are free.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #17 on: December 24, 2009, 05:21:58 pm »
That's true, but for beginning programmers, they don't have to use any of the OO features.  Sure, there's a bunch of extra boilerplate stuff they have to deal with, but I'd hope it's something that's manageable.
It's definitely manageable, but I hated being told by my teachers "just ignore this stuff". Fortunately, I already knew what it meant since one of my first languages was C++, but I dislike having that kind of crap around.

That's true, but sometimes it's easier to learn something if you're able to treat something as a black box.  For example, not having something like ArrayList or vector is pretty fucking annoying in any cases.
Definitely true, but using certain classes without knowing how it works can be bad. Here's an anecdote (a couple more of these and we'll have data!):

I was using Excel the other day. I had a huge (60,000 or so.. that's huge for Excel) list of ip addresses in column A and a count in column B. Column A had duplicates, and I wanted to know the total numbers. So in column C, I did "sumif(A:A, A1, B:B)", then pasted that formula in all 60,000 cells. After about a minute of Excel being frozen, it occurred to me that I was doing 60,0002 operations, and that Excel can't handle 3.6 billion operations in any reasonable time. So, I killed the process, went back, and did it in a far more optimal way.

My point, besides that that's a neat story, is that if I hadn't known how the functions work on the inside, I wouldn't have known how to fix the problem.

So yeah.. I realize we aren't really disagreeing, but I just wanted to tell that story. :)

You are. :P

The Express editions of Visual Studio are free.
Nice, didn't know that!

Any idea what the downside is? I didn't click the link or anything, but I'm guessing they're fully functional for learning purposes, but you can't use them for professional development?

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: I want to learn, I swear!
« Reply #18 on: December 24, 2009, 05:41:52 pm »
From Wikipedia,
http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express
Quote
The idea of express editions, according to Microsoft, is to provide streamlined, easy-to-use and easy-to-learn IDEs for users other than professional software developers, such as hobbyists and students.
Quote
    * No IDE support for databases other than SQL Server Express and Microsoft Access
    * No support for Web Applications with ASP.NET (this can instead be done with Visual Web Developer Express, though the non-Express version of Visual Studio allows both web and windows applications from the same IDE)
    * No support for developing for mobile devices (no templates or emulator)
    * No Crystal Reports
    * Fewer project templates (e.g. Windows services template, Excel Workbook template)
    * Limited options for debugging and breakpoints
    * No support for creating Windows Services (Can be gained through download of a project template)
    * No support for OpenMP

And according to this, the express editions lack support for addons (such as SVN support), doesn't come with full MSDN integration, and can't target 64-bit, Itanium, or Windows Mobile.

But basically, it's right up deadly's isle.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Ribose

  • Newbie
  • *
  • Posts: 27
  • Huh¿
    • View Profile
    • home
Re: I want to learn, I swear!
« Reply #19 on: December 24, 2009, 06:11:48 pm »
You are. :P

The Express editions of Visual Studio are free.
Nice, didn't know that!

Any idea what the downside is? I didn't click the link or anything, but I'm guessing they're fully functional for learning purposes, but you can't use them for professional development?
I use the Express editions all the time for C# development. It looks like that's exactly what they are: for non-professional development. As far as I know I can compile programs that do everything possible with the language itself. The IDE is missing features that might be useful to have like third-party extensibility (IDE add-ons), some breakpoint features, some automatic refactoring features, some debugging features, and others. But personally I'm not spending money just for those.

joetheodd beat me to this post. :D
~Ribose

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: I want to learn, I swear!
« Reply #20 on: December 24, 2009, 06:24:36 pm »
What about other languages do you understand that gives them an advantage over Java?  Unless you're writing software that's really performance critical, C has almost no advantage over Java.  Java is object oriented and has loads of libraries at your disposal so you're not writing or searching for software to do very trivial things, unlike C, and is syntactically consistent and is overall much cleaner than C++.  C# is fine too, but unless you start with the basics, I think it's very easy to get overwhelmed with all of the capabilities of the .NET framework.

It's also a rather non-trivial advantage that you get cross-platform compatibility for free.  It's awesome to be able to go on any computer I own and pick up development from where I left off, despite that it was started on linux while I'm on OSX now.
Nothing, but in having been a user of Java I know that I hate it. Any large-ish program (from the old school Azureus to OOo to countless others) has been sluggish and a burden to deal with. Granted, my computer is ancient by today's standards, but that is something I'd like to avoid.

I will admit cross-platform compatibility is nice to have. I jump around from WinXP, WinVista, Win7, Mac OSX, and Ubuntu usually every business day.

From the sounds of things, since C & Java are similar to MATLAB they might be a good stepping point. Anyone know of any good resources (other than googling "how do i code xyz") to learning syntax/functions/etc for these languages?
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #21 on: December 24, 2009, 07:54:10 pm »
FWIW, OOo, by and large, isn't Java.

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: I want to learn, I swear!
« Reply #22 on: December 24, 2009, 08:42:50 pm »
FWIW, OOo, by and large, isn't Java.
Didn't it used to? I recall whenever I ran some of the later 1.x versions the Java Runtime Environment would also load.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #23 on: December 24, 2009, 10:02:10 pm »
FWIW, OOo, by and large, isn't Java.
Didn't it used to? I recall whenever I ran some of the later 1.x versions the Java Runtime Environment would also load.
The JRE is required for some optional features, but never for the full suite. I looked it up before I posted, just to be sure.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: I want to learn, I swear!
« Reply #24 on: December 24, 2009, 11:34:16 pm »
FWIW, awk can suck it.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #25 on: December 24, 2009, 11:40:18 pm »
How come?

'awk' is one of the major Linux utilities (probably the only one) that I haven't tried to learn. Someday, I'll have to learn it, but I'm curious why you don't like it?

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: I want to learn, I swear!
« Reply #26 on: December 25, 2009, 12:52:36 am »
How come?

'awk' is one of the major Linux utilities (probably the only one) that I haven't tried to learn. Someday, I'll have to learn it, but I'm curious why you don't like it?

Awk is wonderful for quick and dirty text manipulation, but that's really all it's meant for.  I've used it a decent amount, and I definitely feel like it's an awesome tool to have at your disposal.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: I want to learn, I swear!
« Reply #27 on: December 25, 2009, 08:13:50 am »
How come?

'awk' is one of the major Linux utilities (probably the only one) that I haven't tried to learn. Someday, I'll have to learn it, but I'm curious why you don't like it?

Awk is wonderful for quick and dirty text manipulation, but that's really all it's meant for.  I've used it a decent amount, and I definitely feel like it's an awesome tool to have at your disposal.

Yeah, that's kinda what I thought. I frequently find myself using grep/sed/cut/xargs in a hackish way to get the same functionality I could have with awk.

Someday...