Hope me learn teh internets
May 7, 2008 7:02 PM   Subscribe

Help me not be such a clueless geek on the Internets.

I've been programming for a long time- for over 25 years- and I've earned a good part of my income from doing geek-like things, but I feel like the world is passing me by, and I feel older and stupider more and more each day.

I've programmed some significant stuff in everything from 6502 assembler through Visual Studio, but when it comes to anything Internet-related, beyond setting up a Wordpress blog, I'm pretty much at sea. Php, javascript, and CSS make my head hurt. Somehow, I just can't get my head around them or grasp the concepts inherent in Web programming. I can recognize bits and pieces, but making it gel isn't happening for me.

I can't figure out why it seems so difficult to make the conceptual leap, and I really need to get something going, so, to get the ball rolling, hive mind-

What are the best resources for learning this stuff that you know - either on line or via dead-trees? I've browsed the books at the local Fry's, but the place is awash with "Programming the Web for Dummies". et al. There are a million websites, but many of them seem to be clones, and none of them seem to be that good at anything more than individual narrow areas, and seem to aim at someone who has some critical knowledge that I lack.
posted by pjern to Computers & Internet (14 answers total) 21 users marked this as a favorite
Some libraries have the Safari Online eBook Library available to cardholders - it contains zillions of O'Reilly titles, which I like a lot, and lots of other things, too. I have been known to work through a chapter or two on a rainy Saturday from the comfort of my own home.

If your library doesn't offer that, they may at least offer the ability to reserve books, so you can request the book you want and know it will be there when you show up to check it out.

Personally, I would start with O'Reilly's Learning PHP, but ideally it'd be good if you could browse through various titles (PHP in a Nutshell, PHP Cookbook, Essential PHP Tools) to see which one is closest to your learning style.

Also, try to pick one technology at a time. Get through a Teach Yourself PHP in 21 Days-type book first (or Javascript, or CSS - just not all three at once), so you can immerse yourself in one set of concepts at a time.

Finally, pick an open source project that uses the technology you're studying. See if you can find a small, manageable bug to fix. There's nothing like having a real-world application to sink your teeth into for helping all that new data gel inside your brain.
posted by kristi at 7:31 PM on May 7, 2008

Best answer: Sorry - just thought of something else:

Would it be helpful to remember that underlying web technologies are probably already doing a lot of stuff you might expect to have to do? For example, if you're used to having to write event handling loops, it might help to note that a ton of that work is already done for you by various combinations of underlying technology (the browser, Apache ...)

I know people learning python often comment that they come at Python from the perspective of the languages they've already learned - say, Java, or C++ - and keep overlooking the fact that Python already does a ton of the work they're used to doing.

Writing a "Hello world" program in Javascript and one in PHP can help you figure out what parts of the interaction you need to handle, and what you don't have to worry about.

Indeed - to get started, set up a web server (or get a shared hosting account if setting up a server isn't something you want to tackle at the moment) and create three directories:

* css
* php
* javascript

Find yourself a super-intro-beginners tutorial and just do the first task or two - write the "Hello world," or for CSS, create a web page and a CSS style sheet, then fiddle around with the style sheet and see what changes.

As you go, write down whatever questions you have - "How come I don't have to do this part? How does it know to use that font? Where does it get that value?" If you get stuck figuring out the answers, find a beginner's forum and ask for a nudge in the right direction.
posted by kristi at 7:39 PM on May 7, 2008

You're a programmer, by now you should know that it's far easier to learn a new language or project by actually doing it. Make yourself a goal right now, to build yourself a new website.

Write some PHP for image galleries, or dynamic pages, and use HTML and CSS throughout. Throw in some simple javascript menus, and you're well on your way to learning these concepts.

Lastly (and this is the most important part), be sure to choose a project that you're excited about. It'll be even more motivation if you build a website that other people will use. That could be a family website or a mileage tracker for your running club.

Have fun!
posted by chrisamiller at 7:40 PM on May 7, 2008

Best answer: kristi has it, the O'Reilly books that she's recommending are the gold standard for Web development tutorials and references.

Conceptually, Web programming is awfully simple: Web server software (like Apache) accepts requests over the Internet and calls your program with the request parameters; your program (written in PHP, Perl, Java, &c.) does whatever analysis of those parameters is necessary (including database lookups or requests to other data sources) and returns HTML code to the Web server for delivery to the user's browser. That HTML can include (or reference) CSS formatting instructions and Javascript that can manipulate the rendered page elements, or replace them with the results of new requests.

In the O'Reilly library, the best overview of this is "Webmaster in a Nutshell". If you wanted to learn about each of those protocols and technologies, you could read the corresponding books:

Web server software: "Apache: The Definitive Guide"
the Internet: "TCP/IP"
calling your program: "Programming PHP"
database lookups: "Web Database Applications with PHP & MySQL"
HTML code: "HTML & XHTML: The Definitive Guide"
CSS formatting: "Cascading Style Sheets: The Definitive Guide"
Javascript: "Ajax: The Definitive Guide"
posted by nicwolff at 7:57 PM on May 7, 2008

I think you should tell us more about the "makes my head hurt" part. What exactly is it about web programming that you don't get, or you've found hard to follow?

It's a very general question, and web programming involves a combination of up to four different technologies: HTML, and, optionally, any combination of CSS, JavaScript and a server-side language.

The syntax of JavaScript and the server-side language wouldn't be hugely different to the kind of languages you already know. And if you get how they can output "hello world\n" at the command line, presumably you get how they can output "<p>hello world</p>" to a browser?

The other two languages, HTML and CSS, are very different to the languages you know, and to each other.

Maybe it's the combination of different languages that's the problem? Perhaps concentrating on just one at a time would be the key?
posted by AmbroseChapel at 8:23 PM on May 7, 2008

Best answer: Part of the issue here might be that, as "programming languages" go, PHP, HTML, and CSS are either not very good at doing what a programming language is normally expected to do.

With PHP code, you get these awful structural things because the logic and presentation is all mixed up -- and it's very accessibility to many otherwise-non-programmers means that the rules you probably internalized about how to program are at best ignored, at worst impossible to follow. Of course, it's theoretically possible to write a PHP "program" that's well-organized, and lord knows I'm not a PHP expert, but from what I've seen (including poking around WordPress a teeny bit), it's just not the same animal.

HTML is more like a big configuration file, in a way -- it's not a programming language, either. I'd recommend learning from a _really old book_ at first - you'll get the basic logic, it'll be a short book, and whatever you learn will work in all browsers -- if you get an old enough book. Newer books will address cross-browser compatibility by saying "you can do this cool thing" - then tell you under what circumstances you cannot. Or worse, they'll leave out the qualifying information. My advice? Learn the fancy stuff once you've got the basics down; the basics including, yes, tables. As a programmer, you're experienced enough to know that gobs of ugly code (nested tables, huge font tags around everything, transparent gifs -- all the hideous legacies of modern ambition on the old frameworks) would lead to the trouble that they do.

Javascript? Argh. That's just a can of worms. The O'Reilly books _are_ the standard, but I strongly advise keeping your code as simple as you can. The thing is, once you start getting into dynamic HTML (which I believe generally means "just add Javascript" -- please correct me, hivemind, if I'm wrong here), it's so easy to imagine lovely wonderful amazing things you can add to your work -- BUT it's so very frustrating to a) get it to work cross-browser, especially cross-platform, and b) you have to make sure your stuff will work _somehow_ even if Javascript is turned off.

You've got a solid background in _real_ programming, so why not focus on server-side programming instead of Javascript? I think that's where you could do some real good, too -- there are huge needs.

Since I've dissed PHP, I'm going to recommend that you look into Python. It's not as popular as PHP, by a lot, but you can always (probably) hack others' PHP if you want. Python, though, is fairly ubiquitously available on most commercial servers, and is just sweet to program in (this coming from someone who's done a lot of Perl coding over the years, so I'm biased). Zope/Plone is written mostly in Python (but I'm not recommending that platform - just pointing out that you can do big stuff in it).

I do a lot of Perl coding, as I mentioned, and it's got its own advantages for "real" programming.

A lot of people are using Java for server-side larger projects, which is based/related to C++ -- you might want to look into that, too.

But if you're a really good programmer, PHP, while it certainly won't remain opaque to you, will probably end up frustrating you more than other languages might.

Good luck! If you have specific questions about what you want to accomplish, feel free to send me a message.
posted by amtho at 8:26 PM on May 7, 2008

Don't worry about frameworks, and all the magic that happens behind the scenes. Learn the http request/response cycle, and what that means. Read the http headers, understand what the heck a mime type is, and how a web server hands back a document.

Start with a basic html page being served up by, well, any web server ever.

Then write a trivial little CGI script in perl or ruby. It'll be maybe 5 lines of code to get a hello world html page out.

Then add some smarts to the cgi script, and make it cooler. Maybe form handling.

And so on. Don't worry about css and javascript. Just get plain ole html up and running.

Then add stuff in a piece at a time. I very much enjoy understanding the flow of data through a complex framework like rails, as it lets me diagnose and fix problems much faster.

Just start simple and go from there.
posted by cschneid at 8:34 PM on May 7, 2008

On a more personal level, I have been programming professionally for 33 years, including mainframe and PC, and also hobby programming for about 28 years on Motorola 6809 Assembler then later PC Assembler and other languages. I currently have 4 PCs so I can play on Ubuntu, Mac OSX, XP and Vista. I also do some Web type programming, though I'm not expert. My computer happiness is ruined by all the time I have to spend at work in a Dilbert type job.

If you want someone else to trade ideas, get tips from or get past obstacles with, send me a MeFi mail, I'd be happy to share what I have found helpful, or perhaps put things into terms that old timers like us would understand (???).

Also, have you looked on scribd and W3C?
posted by forthright at 9:06 PM on May 7, 2008

Response by poster: Wow, thanks all for the help so far! kristi, you may be right in that I may be overthinking this particular plate of beans. I think part of the problem is that I am used to having complete control over my environment, having only written and worked on standalone programs (and pretty custom ones at that), and just don't yet quite 'get' how all this stuff comes together nowadays. When everything splits out and starts coming from different places and technologies all at once, I think I get derailed. forthright: I've given W3C a cursory look, but felt a little overwhelmed by all the information there- it seems to be a lot at once. I'll check out scribd.
posted by pjern at 9:46 PM on May 7, 2008

The web, as a system, is the most horribly ad-hoc thing you can find. The O'Reilly books are nice to learn a single part of that system (e.g., PHP), but I'm not sure if they'll give you the whole picture...

In the beginning, there was HTML. But it was too static, so Javascript was added to do client-side dynamic things an d CGI scripts for dynamic server things. Then CSS got tacked on to make the graphic designers happy, and Flash was embedded to do things Javascript couldn't. Meanwhile, real programmers were extending web servers to let them generate all of the above with real programming languages like Java. Oh yeah, and then some smartasses made everything more complicated by figuring out how to make AJAX work.

So I'd recommend you start from the beginning.

1. Learn HTML without CSS or Javascript, make a few pages, have them served up by Apache. Next, learn CSS --- it's just a way to stylize HTML elements --- and you will be pleasantly surprised at how much more beautiful your web pages are.

2. Write some CGI scripts. They're easy, and you can use any language (although if you're learning a language from scratch, I would advise against Perl as it is known to cause irrevocable brain damage). Python and Ruby are nice, although Python is better [because functions are first-class objects!]

3. Learn some Javascript. It's a cool little language.

4. Now try out the frameworks.
posted by qxntpqbbbqxl at 10:28 PM on May 7, 2008

Despite having a fairly broad coding background, when I started doing web stuff I felt intimidated by how different it all was. Eventually I got forced into giving HTML a proper try (was flat broke and had 3 days before interviewing for some freelance work) and then it clicked right away and led to JavaScript and later CSS, but shied away from server-side coding for years until I realised that's actually pretty easy too (doh!).

So it's largely about not being afraid to try and initially fail. I think you should start with building solid (X)HTML skills and learn enough CSS to handle typography and simple layouts; some people look down on client-side stuff but it's the foundation of the web and getting a page working is surprisingly satisfying (a good first project is to create a CV/resume page for yourself). From there you can experiment with server-side scripting and frameworks.
posted by malevolent at 12:30 AM on May 8, 2008

Even though I have no way near the same level of skills that you have, I can empathise with the hurting head you're describing.

Every time I set out to do a web thingy, I dive into W3C and pretty soon have seventy tabs open describing everything from html to tracts on semantic web and whatnots. I've been cobbling homepages together for the past ten years, and even though I start with an ambition to make "everything compliant, under control, beutiful", I end up looking in disgust at the monstrosity I've birthed and despair at my inability to grasp how it all fits together.

This drive I have to find an Underlying Priciple of Everything™ upon which to build A True House of Greatness & Glory™ only gives me a lift as far as the Wikipedia list of markup language, leaving me stranded, alone, and frightened.

As been previously mentioned, the reason why it can be hard to discern the underlying structure of the web is because most stuff online is held together by spit and glue, curtesy of ignoramuses like myself.

Doesn't answer your question, but I felt your pain and reached out.
posted by monocultured at 4:41 AM on May 8, 2008

In regards to JavaScript, I recommend watching Douglas Crockford's video lectures. He is the senior JavaScript architect at Yahoo!. JavaScript never really clicked with me either until I watched all of his videos. It is actually a pretty cool language with closures.

There's direct video links in the FPP I linked above. You can also go to the Yahoo UI Theater for download links.
posted by reishus at 6:13 AM on May 8, 2008 [2 favorites]

It has been quite a while since I wrote code for a living, but I had a similar experience to what you described as I tried to learn OOP (back in the late 80s). I watched a lot of my colleagues learn OOP (C->Objective C or C++) at the same time. Some caught on very quickly and others struggled for quite a while. Around the same time, I took a continuing ed class to learn Prolog, LISP, etc...

I came to think that the constructs available in a programming language constrain the way you think about solving a problem. Some people's problem solving methods "naturally" link to one language or another. That said, I think that a person can learn to think & solve problems in a different way, but it may take a while. It's worth the effort though -- because if you use your old thinking with the new constructs you end up with bastardizations like assembly-like code written in Pascal (talk about making your head hurt!).
posted by elmay at 8:09 AM on May 8, 2008

« Older A Communist (Birthday) Party   |   Sonicare Vibrates Toothpaste Right Off of It ... Newer »
This thread is closed to new comments.