Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

So ... I'm a sysadmin. There are a number of instances where scripting would come in handy(mostly user management ... creating groups, assigning permissions, deleting expired accounts, etc), and I'd like to make a fullblown program. But I don't even know where to start.

Edit

A lot of comments made sense along the lines of "learn what you want to learn." So ... I need to figure out what I want to learn.
A: Is there no such thing as a "beginner" or "building block" language? It wouldn't be any easier to learn C# and move into C++ than it would to just go straight into C++?
B: How do I choose what to learn? I'd like to write a game for my first real project, if that helps narrow it down. (aside from "Hello world" ;) ) There are so many languages out there I don't know where to begin. I don't even know the real difference between C#/C/C++.
C: Once I have picked a language, what's the best way to start learning it?

share|improve this question

closed as too broad by MichaelT, GlenH7, Dan Pichelman, gnat, Kilian Foth Nov 7 '13 at 7:16

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
What kind of program would you like to write? Which tasks do you want to automate as a sysadmin? What's your favourite environment? Tell us more and we can give you a better answer. –  Falcon Jul 28 '11 at 13:00
2  
If you want to learn C or C++, start with that. –  Jonas Jul 28 '11 at 13:01
    
define "fullblown program" in your context. –  Matthieu Jul 28 '11 at 13:23
    
Ah. Fair ... something which serves an actual function (a video game, some sort of service or utility) rather than what amounts to a programming exercise (a simple calculator). To be honest I'm not sure what I mean. I'm not sure where "exercise" stops and "application" begins. –  Daniel Ball Jul 28 '11 at 13:35
    
You've all been VERY helpful, thank you very much and I'm sorry I can only accept one answer. –  Daniel Ball Jul 28 '11 at 13:40

7 Answers 7

up vote 2 down vote accepted

A: Is there no such thing as a "beginner" or "building block" language?

I guess there are such things, for example Java with the BlueJ IDE. But I wouldn't recommend them. You want something you can use in real world scenarios.

It wouldn't be any easier to learn C# and move into C++ than it would to just go straight into C++?

Starting with C/C++ requires more knowledge about the machine and teaches you valuable lessons. It helps you when programming in almost every other language. But the learning curve will be much steeper. This could lead to a lot of frustation. It depends on your character and eagerness of whether you will overcome these troubles. I've started programming with these languages.

B: How do I choose what to learn? I'd like to write a game for my first real project, if that helps narrow it down.

Use C# with XNA. This is as easy as it gets if you don't want to use something like Adobe Flash and you'll develop skills unrelated to game development, too. Keep in mind that game development is pretty complicated. Don't expect to code something in commercial quality from scratch. Also, game development is a lot about artwork. Don't expect to get good results, the journey is its own reward.

There are so many languages out there I don't know where to begin. I don't even know the real difference between C#/C/C++.

C and C++ can be programmed close to the system. C# is on a higher level. You don't need to care that much about memory allocation anymore. And it prevents you from shooting yourself in the foot much, much more than both the others.

However, you are a sysadmin. If you want a useful general purpose tool, I'd recommend to start with Python. You can also program games with it. I'm pretty sure there're DirectX, OpenGL and SDL Bindings for Python out there.

C: Once I have picked a language, what's the best way to start learning it?

Just grab a beginner's book on it and then start to program. Program, program, program. Program, program, program. Program, program, program ... repeat

share|improve this answer

If your a SysAdmin then maybe starting with Python is a good idea. It's quite easy to pick up and very useful for Scripting/Automation plus alot of other General programming. I'd def. Start there. then move onto C/C++.

There are tons of books/blogs and such to help out. http://diveintopython.org/ is a free python learning resource (it's for 2.x, 3.x is the "newest" python but don't worry yourself with versions because they are pretty similar).

Once your finished with Python you can move to a lower level language like C, which has obviously TONS and TONS of books/tutorials online, then onto a Object Oriented Language like C++. Picking up another scripting language like Bash isn't a bad idea either, but baby steps first, just go with Python for right now worry about the rest later.

share|improve this answer
    
+1 Python is probably the best choice. It's easy to learn and makes sense to non-programmers. Here is a link python.org –  Bazzz Jul 28 '11 at 13:23
    
zvrba mentioned perl ... any reason to pick perl over python? Would either choice be a better lead-in to C/C++? Also, what exactly is the difference between C and C++? (I told you I was a noob ^_^) What is the difference between programming in C++ and C++ .NET? I have the vague understanding that the .NET framework is sort of a ... language translator. If these would be better suited to separate questions, I can do that. –  Daniel Ball Jul 28 '11 at 13:32
2  
The choice is more about "personality" than practical, the two compete for ages. Python is clean and orderly to a degree some deem ridiculous, eg whitespace indentation is syntactically important. It's for people who love order and rules. Perl is wild, expressive, non-obvious modes of usage of keywords, littered with weird operators and special variables - the joke is "smash your head on the keyboard and you have half of your Perl program written". It's a preferred choice for people who prefer expressive power and dislike the shackles of tight rules and prefer conciseness over readability. –  SF. Jul 28 '11 at 13:48
    
Thanks. I'm a fan of banging my face on my keyboard, but only for recreation. I'd like to read what I'm writing :D –  Daniel Ball Jul 28 '11 at 13:50

If you need scripting, then start learning a scripting language. C#/C/C++ are very unsuitable for getting work done quickly. Try starting with perl, it's cross-platform, and has a lot of modules available on CPAN (cpan.org).

share|improve this answer

Jonas is exactly right

If you want to learn C or C++, start with that

You also might want to re-think this idea of "big kid" vs Beginner languages. It's very flawed.

share|improve this answer
    
Huh ... I figured there would be a steeper learning curve for those. I'm not really sure what I want to learn. I'm going to re-phrase my question ... sec. –  Daniel Ball Jul 28 '11 at 13:12

It definitely depends on the tasks you are looking to accomplish in the end. Honestly, the language choice is probably less important than you think. Once you have a handle on programming most of the time it's just picking up syntax and learning the libraries.

I think what you probably want to do is pick something that will help you get work done. Chances are as a sys admin you could use some scripting...you mentioned that yourself. So, the you need something cross platform that will lend itself to rapid development and is easy to use.

That could be any number of languages. Most of your options are not going to be natively installed on a Windows machine. That won't necessarily be a hindrance as there are ways to deploy the package as a whole. I think Python could be a good choice for you however it's not the only choice.

What I would do in your situation is gather a list of the types of problems I want to solve and see how a few different tools can be used to approach similar problems and then pick the one that 'feels' right. Worst case you realize that you maybe didn't pick the best tool but you definitely will have learned something.

share|improve this answer

If you need admin scripting, start with Windows PowerShell. You mentioned C#, so this could be a gateway to .NET. Learn some programming that will help you as a sysadmin. You would be in a position to take the next step and build a standalone application.

share|improve this answer

My advice - if you have no clue about programming, start with a toy language like Logo. It shouldn't take you more than several days to get the essential concepts without getting muddled in weird syntax intricacies and caveats of system interaction. This is the rock-bottom introductory course to what is programming and what are the essential concepts like loops, conditionals, procedures (and a bit of recurrence). It's very easy and friendly, though you'll never write a full-blown application in Logo.

Next pick C - old, good ANSI C, which is an "adult language" definitely preferred for system stuff, which will give you all the more advanced concepts - memory access, allocations, libraries and so on. Great most of other languages builds on top of C and you will see homages in many, many other languages. It is quite likely you will never need to write an app in C, and most often other languages will be a much easier choice to advance. But it opens up the bare bones of the system, allowing you to gain a sense of what the underlying hardware is doing as the high-level language "on top" is doing its magic.

Then pick one or more of languages that are powerful and expressive and will be an immense help in your admin work. The two obvious choices are "neat and tidy" Python and "wild and artistic" Perl, but you may look into Ruby which is strongly object-oriented and creates beautiful code, or PHP, the bastard child of Perl, with primary focus on the web and somewhat cleaner syntax.

While you can already write modest but fully-featured apps in these, and they are definitely luxurious base for making simple or moderately complex tools for your work, if you really want to "produce applications", pick one of languages meant for that. C++, Java, C#. By the time you make this choice, you should know about them enough that you won't need my advices from here to make your pick.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.