News for hackers. Stuff that matters.
Re:A Site That Teaches You to Code Well Enough to Get a Job by wyager on Tuesday September 23, 2014 @11:42AM (#8355884)
It's also easy to teach programming with BASIC. That doesn't mean it's particularly good for the students.

Setting up a web server with e.g. Python's SimpleHTTPServer is absolutely trivial, and teaches them a lot more about what a web server actually does (routing requests and building responses), and also prepares the students to use whatever hip python stuff people are doing servers in these days.

Re:A Site That Teaches You to Code Well Enough to Get a Job by jiggy2011 on Tuesday September 23, 2014 @11:49AM (#8355921)
The advantage for typical PHP here is that the webserver runs the programs somewhat transparently rather than the other way around with your program creating the webserver and then managing requests. PHP/Apache provides a very simple routing model that correlates 1:1 with the filesystem.
Re:A Site That Teaches You to Code Well Enough to Get a Job by wyager on Tuesday September 23, 2014 @12:02PM (#8356001)
>PHP/Apache provides a very simple routing model that correlates 1:1 with the filesystem.

Might that give students a false impression of what a webserver does and is capable of doing? The students can implement the same thing themselves in a few lines of python, rather than offload most of the functionality to a monolithic and unapproachable black box like apache or nginx.

Re:A Site That Teaches You to Code Well Enough to Get a Job by jiggy2011 on Tuesday September 23, 2014 @12:14PM (#8356071)
It's useful to black box some of the things when you are first learning. The specifics of serving a request are probably not the first thing you want to teach, especially when it requires some notional understanding of threading/blocking which Apache can take care of automatically. Also mod_rewrite and .htaccess provide powerful methods of adjusting behaviour of routing and the like.
Re:A Site That Teaches You to Code Well Enough to Get a Job by vegggdor on Tuesday September 23, 2014 @12:32PM (#8356208)
Writing web apps or servers are two different things. well, mostly ... almost, at least if you teach for productive use. especially for anyone who just started coding, a few lines of python can be a lot, so KISS.
Re:A Site That Teaches You to Code Well Enough to Get a Job by vegggdor on Tuesday September 23, 2014 @12:10PM (#8356046)
Routing is done by a router, not a server. a server serves. Does that really need to be said?

Edit: to clarify, I read about "routing" in "web-apps" now and then. I have problems figuring out, although it seems to be clear to anyone. And then you come and mess up terms even more, while routing is absolutely not essential to a web-server. Also, if your idea of routing is anywhere near apache's rewrite-rules, I don't wanna know it. If on the other hand routing is essential to an ftp server, I'd be curious.

Re:A Site That Teaches You to Code Well Enough to Get a Job by wyager on Tuesday September 23, 2014 @02:06PM (#8356961)
"Routing" in this context means resolving URLs to their correct handler.
Re:A Site That Teaches You to Code Well Enough to Get a Job by vegggdor on Tuesday September 23, 2014 @05:00PM (#8358204)
Well, that's the main feature of a web server, besides the obvious sending of responses? The usual notion is of requests and responses, routing seems to be an avant-garde term, in this domain.