So I set up a VPS for the first time this week, here's how it went:
1. Shell? SSH? Wtf is this? Console? Huh? Why am I using something that looks like DOS, it's 2013! Where is the GUI and menus?!
So I learned about Shell/SSH, connected to my server, root and all that stuff.
2. Navigating folders and directories - dear god, this was a nightmare. I never used 'cd \' since '98 and that's only cause I wanted to run DOS games.
3. Kept seeing all these commands with '-' that makes installing extensions seem oh so easy! I wanted APC for PHP, stared at this page (http://pecl.php.net/package/APC) for an hour, trying to figure out what to do. Googled like mad. Searching for anything.
Learned about "pecl install APC", nope no luck. Then I was told to compile it from source. Yeah, I know exactly what that means! Spent the next 4 hours trying to understand why phpize wouldn't work!
Oh, I wasn't doing it from the right directory. -_-
I mean, I'm slowly beginning to see how it all fits together but none of the education sites teaches you this stuff!
It's like learning cooking recipes when you don't know how to turn the stove on, or what a stove even looks like. Or what's the difference between gas and electricity stove, how to turn on the tap to get water, etc. You learn a great recipe, know all the ingredients and the cooking time down to the second, but when it comes to use the tools and actually cook? Nope - cause I don't know how to turn on the stove or know what a stove looks like! (I know this is an extreme analogy)
I wish tutorials would start with projects and setting it up from scratch. If you're going to show me how to do something localhost, you have to show me how to do it on a server (and set up) as well or else I'll never be able to make that connection. (Well not never, but makes it harder)
So…I definitely vote for teaching the environment before programming.
PS: I did eventually install APC…after an entire day :P Now I'm trying to find and learn about setting up master/staging/production (and what it all means).
Edit: Just to give some context of why I needed VPS - I wanted root access so I can make a wiki have clean URL (rewrite) and figured why not, learn about VPS. Then that's where I realized I need to learn 10 other things to do this one single thing. The APC was a suggested caching option to improve the site, and trying to do that also needed me to learn more stuff. So it's all kind of ties together when you're trying to accomplish a (seemingly) tiny thing.
You've identified a very real pain point, one that affects all programmers. One of the most difficult and annoying tasks is configuring the computer to run your darn software. I've sometimes spent days just setting up a computer (either a VPS, or my own computer). Unfortunately, this pain point never really goes away, although it does get easier as you learn more.
I've had many conversations with other programmers about solving this problem. We always fantasize about building an installer that just sets up everything you need for, e.g. Ruby on Rails. And people have tried! Every so often, you see an announcement about an open source project that promises to do just that. Even though this has been going on for years, I don't know anyone who actually uses these projects.
I think part of the problem is that the technology moves too fast for these one-click installers. They can't seem to stay current. Every time you get an update to the operating system, the database, the webserver, the web framework, the language runtime, etc etc, there's a potential for the one-click installer to break.
Another issue is interference from other stuff installed on the computer. I can't tell you how many times a piece of Unix software has failed to install because of something else I'd put on my computer and long since forgotten.
So one-click installers haven't been a panacea thus far. But I will say that the situation has improved dramatically in the last five years or so. Package managers--programs that automate installation of individual components--have gotten way, way better. It used to be that every other package I installed would fail the first time, and I'd have to do some kind of troubleshooting. That hardly ever happens anymore.
Now, this doesn't exactly make everything easy for new programmers. You still have to learn a lot of system administration to get anything done. Which brings me to my last point, which is a bit of advice for people just starting out:
You'll want to read some tutorials on various aspects of the Unix operating system. These will be very relevant to the problems mentioned in the parent comment: SSH, shell, installing packages, compiling from source, etc.. Generally, programming tutorials won't get into this stuff. You need Unix tutorials. This stuff will probably seem pretty boring in comparison to actual programming. It sure is for me. But it's a bit of unavoidable drudgery if you want your code to actually run.
An option is to use a pre-packaged virtual machine image with the main web application that you want if it's available, for example from http://bitnami.com/ or the Amazon AWS public store or installing one locally (VMware or VirtualBox Virtual Appliances etc)
I half disagree. If you want to learn to be a sysadmin then learn to be a sysadmin. If you want to learn to code you learn to code. People who want to learn to code want to know what to type that'll get the computer to spit out whatever it is they want it to spit out. Mixing in environment stuff like you describe is just going to complicate things and turn people off entirely.
Furthermore, most operating systems already have enough of the basics installed that you're able to get up and running with simple programming pretty quickly anyway. Learning to develop locally and deploying to a live server are very different. Yeah, both run just about identical software but the process is different. Locally, someone who's learning will install MAMP or xampp or something or copy and paste a line of code to get homebrew or rvm on their machine. There's a 50/50 mix of comfortable clicking around the GUI and typing in the terminal. If you're just learning and go right to the vps I think you're jumping the gun. The system may be the same but it takes some experience before you realize that what you were comfortable with when clicking around is almost the same thing you're doing in the vps over ssh except you have to know which command to run rather than clicking "install".
Beginner books always have a section dedicated to setting up your environment and sometimes take you all the way through deployment. Articles online don't necessarily need that as they mostly assume you'll find that information elsewhere and only concern themselves with the task at hand - coding.
Beyond all that I think that your frustrations are something you'll be grateful for in the future when you do get it. I knew how to code before I knew how to run a server. If I had learned the server stuff first and didn't quit then I wouldn't have understood why I was doing these things and I wouldn't have the knowledge of how everything from the language I was using to the server to the OS all worked together which is invaluable. If I were blindly following instructions on how to set up a lamp stack I wouldn't know that hey I don't need these apache modules or oh I can disable this ini setting, etc.
On one level I get your gas stove/kitchen tools analogy. But as someone who understands these things now, on another level I don't think it fits. These topics are so incredibly broad and complex that it makes sense not to lump them together. Besides, there are plenty of places where you can just plop your code and have it run from shared hosting to PAAS's like Heroku and such.
In the end its like the article says - these challenges are what'll teach you. I don't know any good programmers that simply memorized how to do things without having to earn the knowledge of how something works through tons of failure.
Furthermore, most operating systems already have enough of the basics installed
Maybe most operating systems do, but most laptops and PCs don't. Like 92% of laptops and PCs. Which makes your comment seem divorced from reality.
Worse still a lot of programming guides assume you have a linux variant which is so far from reality it's painful to watch. Though it's got a lot better recently as the ruby/python package managers are a lot easier to install on windows now.
A year or so back I was having a discussion with another HN user who was running free Python programming workshops. He actually ended up specifying no windows because it took so long to get everything working on them.
I suspect the more novice a programmer, less likely they are to have a Mac. You will only have a mac if you're rich, a programmer or your parents are rich. It's not an entry level OS. Let's not even pretend about linux.
While I agree with the whole "Learning how to cook" analogy, I still belive that, when starting, you don't really need to learn all the server setup mumble jumble. It is true, you DO need to know how to navigate through directories and such if you'll be developing directly in the server, and you need to learn how to setup your tools (if they don't come up prepackaged in your VPS solution), but aside from that I don't see the use of learning all of that.
On a side-note, this just gave me an idea for a series of posts in my blog ;D
1. Shell? SSH? Wtf is this? Console? Huh? Why am I using something that looks like DOS, it's 2013! Where is the GUI and menus?!
So I learned about Shell/SSH, connected to my server, root and all that stuff.
2. Navigating folders and directories - dear god, this was a nightmare. I never used 'cd \' since '98 and that's only cause I wanted to run DOS games.
3. Kept seeing all these commands with '-' that makes installing extensions seem oh so easy! I wanted APC for PHP, stared at this page (http://pecl.php.net/package/APC) for an hour, trying to figure out what to do. Googled like mad. Searching for anything.
Learned about "pecl install APC", nope no luck. Then I was told to compile it from source. Yeah, I know exactly what that means! Spent the next 4 hours trying to understand why phpize wouldn't work!
Oh, I wasn't doing it from the right directory. -_-
I mean, I'm slowly beginning to see how it all fits together but none of the education sites teaches you this stuff!
It's like learning cooking recipes when you don't know how to turn the stove on, or what a stove even looks like. Or what's the difference between gas and electricity stove, how to turn on the tap to get water, etc. You learn a great recipe, know all the ingredients and the cooking time down to the second, but when it comes to use the tools and actually cook? Nope - cause I don't know how to turn on the stove or know what a stove looks like! (I know this is an extreme analogy)
I wish tutorials would start with projects and setting it up from scratch. If you're going to show me how to do something localhost, you have to show me how to do it on a server (and set up) as well or else I'll never be able to make that connection. (Well not never, but makes it harder)
Oh, editing files in the terminal is a blast too :P http://amath.colorado.edu/computing/unix/vi/ This saved my life that day.
So…I definitely vote for teaching the environment before programming.
PS: I did eventually install APC…after an entire day :P Now I'm trying to find and learn about setting up master/staging/production (and what it all means).
Edit: Just to give some context of why I needed VPS - I wanted root access so I can make a wiki have clean URL (rewrite) and figured why not, learn about VPS. Then that's where I realized I need to learn 10 other things to do this one single thing. The APC was a suggested caching option to improve the site, and trying to do that also needed me to learn more stuff. So it's all kind of ties together when you're trying to accomplish a (seemingly) tiny thing.