Hacker News new | ask | show | jobs
by nopassrecover 5840 days ago
Yeah HTML/CSS/Javascript and PHP are some of the worst possible examples of "coding". I was forced to use PHP on a recent project and I felt like tearing my eyes out it was that bad and immature compared to other methods. It was like telling a formula one driver they have to drive through peak hour in a rundown 1970s ford and then asking if they like driving.
5 comments

  Yeah HTML/CSS/Javascript and PHP are some of the worst
  possible examples of "coding"
So sad to see similar statements. I am the only one who loves working with HTML and CSS? I wouldn't say I love PHP, sure it is not the best language out there, but it is not that bad. Unless you never bothered to check out what's in PHP 5 (or 5.3) and keep going with PHP 4 code.

Don't dismiss HTML. Sure, it is not programming, but so often good programmers produce crap HTML maybe dismissing it as trivial and not worth learning properly. However producing page in HTML and CSS involves a lot of similar activity: you evaluate the whole system (layout) you have to build, identify different parts, decide how to code them in proper, semantic way, avoiding unnecessary elements, then style it all in CSS, maybe enhance with some Javascript. At the same time you don't forget about progressive enhancement and graceful degradation, cross browser support (this is less fun part).

I think the task of splitting that finished visual picture of design into proper HTML structure and CSS decoration is the actual difficulty some are facing, but mistakenly thinking thats the problem with CSS.

And now, with HTML5 on the doorstep and all the fun CSS3 allows front-end coding is even more exciting. My recent interest — client-side optimization adds to this excitement. I learned about programming by reading code in some magazines (had no access to computers till my first year at university), now I've been coding for 20 years, doing web work for 14, went all the way from first HTML being rendered in Netscape 2 through table layouts (oh those nested tables to get 1px border in IE and 1x1 GIFs…) to CSS3 layouts with fun effects rendered in WebKit nightly. I am equally well versed in both client side and server side development, but I'd say that even after all these years I still think client-side work is a lot of fun.

I initially was attracted to web because I enjoyed learning and trying a wide range of technologies: from working with graphics in Photoshop to setting up and configuring Apache. Still feeling the same.

> I am the only one who loves working with HTML and CSS?

No. HTML/CSS coding (or "markupping") is somewhat under-valued skill. Maybe that's because everybody and their neighbour's dog can do it (well, at least produce some results), but only those who really master it can see what's the huge difference between good and average/bad markup.

The only thing which really bothers me about web frontend coding, is huge quality variance of different runtime implementations (read: IE). Working for my own startup partially solves this problem, because I can decide whether I want to "support" these flawed implementations. To summarize, I want to solve real problems with proper tools, not artificial barriers caused by poor work of someone.

> I wouldn't say I love PHP, sure it is not the best language out there, but it is not that bad. Unless you never bothered to check out what's in PHP 5 (or 5.3) and keep going with PHP 4 code.

The issue is you rarely just get to work with your own code. There's lots of crappy crappy php out there, and while php5 is better, it's still not going to exile all that bad code away.

I hate HTML/CSS because of how much better it could be. Don't get me wrong it's nicer than other layout formats but it's still terribly designed for what it could be, not to mention implementation issues galore. Having said that, I love that there are people like yourself who love diving into this stuff.
I hate javascript because of broser compatibility issues. Web programming is fun for me if I can stay away from them, which is why I've recently started doing all my web programming in GWT.
I don't do a lot of web development and I hated php too a year or so ago.

But it's actually not so bad if you just want some things done and for me I actually started to enjoy sporadic encounters with it. I switched from my own hacked soup to kohana and I found jquery and them alone made it much better.

And I think you're missing context a little, I think javascript is a wonderful language and you can do a lot of "real coding" with it. I guess you mean this stereotypical, boring, web development which I agree is extremely loathsome.

I think javascript is fine when you don't actually have to support a dozen different browsers. But for most use cases, you have way to much cross platform support to worry about, and that's no fun.

Php is fine when there is less than 100 lines of it or so in your project. It just gets unfun fast as the LOC goes up.

With jquery I haven't had any cross platform issues, I'm curios what you're doing that makes it all so broken?

And I think it's really fun to work in kohana especially when you're just jumping around in the core which is surprisingly well written with it's thousands of lines.

So I must ask, is it really the language that's the problem when the project gets unfun at the 100 line mark or is it your attitude or aptitude that's getting in the way? Hell, my .conkyrc file (a config for a small monitoring app) I've just written is more than 100 lines!

I just quit a job where I was mostly doing BASIC, but I got to do a bit of PHP here and there.

PHP is more like driving a modern automatic. No, it's not as fun as a six-speed, but it is fairly relaxing.

BASIC, now that's like a rundown 1970s Ford.

PHP is more like driving a "restored" late 80's car today still. It ended up doing vastly more than it was designed to.

Don't get me wrong, it's still very useful, but it ends up not being as clean as python or ruby when made for most cases.

But in the end case, it does end up being a product of who is using the language.

It was designed to be a quick and dirty home page language, and still has lots of warts from that.

What language would you recommend to be the most fun to work with?

Whats the best way for a beginner to learn that (I know by practice, but which books, websites, tutorials, and in what order) ?

Python is a great language to learn and work with: http://docs.python.org/tutorial/
The reasons Python is so appealing to me are numerous, but the primary ones are (1) Django (2) script based (like PHP, no waiting for compilation) (3) easy to scan (no need for {} and everything is nicely nested)

It's good, clean fun if you ask me. Just the other day I even wrote a script to listen in on my sound card and emit an unpleasant 20k tone when my dog barked. That kind of programming is what you call fun!

Ruby on Rails. Hard to say if it's the "most fun", but it allows you to dive in and start coding quite quickly. Far nicer to use than PHP, which I did in college and hated it.

Books:

http://stackoverflow.com/questions/194812/list-of-freely-ava... - this is from another recent HN thread, scroll down to the section for Ruby. Why's Poignant Guide to Ruby is very wacky but worth the read.

Screencasts:

http://railscasts.com/

Also a good article on Lifehacker that will help you:

http://www.lifehacker.com.au/2009/11/programmer-101-teach-yo...

Python web development and ruby on rails are very rewarding in how quick they get things done. Might check that out.
Anything in particular that makes you really dislike PHP?
I think a post is needed because I'd just be rambling crazy mutterings right now. The only thing I like in PHP is associative arrays, just about everything else is wrong. If you want a quick throwaway script PHP is fine but if you want any level of decently sized and maintainable system PHP is not your friend.