170 comments

[ 3.0 ms ] story [ 234 ms ] thread
My favorite part is the tongue in cheek title for Tim Berner-Lee: "Web Developer". That's an understatement (as well as a perfectly accurate one).
"Web Developer" as in "Developed the Web," I guess..
Or 'THE Web Developer'
The Original Web Developer. Should have been Web Creator though.
I think you might have missed the point.
"Tim Berners-Lee - Mammal"

No seriously, TimBL should need no further title, given their audience ;)

"Tim Berners-Lee - Tim Berners-Lee"
Sir Tim Berners-Lee.
Maybe they should have added "The" in front of the title.
If I may digress a bit, I've always wondered why one is more inclined to say 'systems programmer' rather than 'systems developer'.
The web is constantly being developed and changing, a system does not evolve as quickly and is not in a constant state of development.

That would be my guess anyways.

I always thought that the choice of "developer" versus "programmer" swung on how multidisciplinary you had to be in order to be effective.
I completely agree. I call myself a "web developer" because that's the most accurate description of what I do. "web programmer", "software engineer", and "systems engineer" are all too narrow.

On top of programming, I also do system ops, ui design, customer service (and client service), project management. Developing a web site takes a lot more than programming, especially if the team is small.

Glad I kept "Web Developer" in my business card all these years. Payback time
Just curious but if Apple is on this why is its logo not there along the others?
Apple is a steward but puts a lot of thought and care into how its brand is presented on its own pages, let alone on those of a third party.

In a best case scenario they'd push back the launch of the site to make sure that everything is up to their standards (which logos they appear next to, amongst, etc; what their blurb says), but their second choice is to forbid anything about them on the site whilst they think about how they want it to look.

Alongside Google, Microsoft, HP, and Nokia's logos? I wonder ...
please let this be the end of w3schools
i second that. however webplatform.org will need some serious SEO to displace w3schools. also, webplatform needs some serious work on their docs to make them readable and easy to search.
Maybe if webplatform.org is mentioned in enough places, webplatform will have a better Google ranking and webplatform might displace w3schools.

The promotion of webplatform would really help webplatform gain popularity. Do not hesitate to send the link to webplatform ( http://www.webplatform.org ) to as many people as possible.

Share webplatform's site ( http://www.webplatform.org ) on Facebook, Twitter, Google+, etc...

webplatform webplatform webplatform webplatform webplatform webplatform webplatform

Does SEO work in HN comments? I know it doesn't on reddit, so I wouldn't be surprised.
User submitted links are rel="nofollow"'d, so no, HN comments and submissions don't help.
I think they wouldn't do that, but you don't need a SEO magic when you are backed by two of the biggest names in search.
Being backed by Apple, Microsoft, Google and Facebook will tend to have that effect. They'll be fine.
I think google can tweak their search results. As soon this page has more content it will 'naturally' replace W3schools.
The end of any website dedicated to programming for the Web?
I think nothing short of shutting down the website will make them move down the google search result page.

Even mdn can't touch w3schools after all those years.

(comment deleted)
That's because people keep linking to them. Google rank is not a direct quality metric.
I'm not an expert but I've heard it also has something to do with age. Older content has more google juice.
(comment deleted)
I'm impressed that they'd settle on IRC on Freenode for direct chat. Seems like the sort of thing that would not be improved by corporate lawyers for whatever reason.
Don't worry, I'm sure if it gets popular, the lawyers will soon stamp that out.
With the exception of W3C, all participants are listed in a fair alphabetical order. These egos are way too big to mess with!
...With the further exception of Nokia, who was willing to be behind Microsoft but absolutely not behind Mozilla.

However, the full "web steward" page is more egalitarian:

http://webplatform.org/stewards/

I completely missed that! Huh... I guess Microsoft-Nokia is indeed becoming an inseparable tandem.
Wonderful, just wonderful. I'm glad to have woken up today to find the first item on Hacker News to be several big-name companies collaborating to bring several technologies forwards and more standardized, instead of fighting against each-other for the proprietary implementations of trivial things.
Please do not post links with utm junk in the URL.
What the hell does it mean, anyway?
utm links are tracking links for Google Analytics. If the link was clicked from inside a mailing list's email (which it most likely was), and they have Analytics setup with their Email Marketing Provider, it'll put that utm junk on the end.
(comment deleted)

  ?utm_source=HackerNews&utm_medium=share%2Bbutton&utm_content=Apple%2C%20Facebook%2C%20Google%2C%20Microsoft%20and%20others%20join%20forces%20to%20launch%20new%20Web%20standards%20resource&utm_campaign=social%2Bmedia
They're trying to track referrals from Hacker News.
Checked the "No Tears HTML5 Game Development Tutorial" at http://docs.webplatform.org/wiki/tutorials/canvas_notearsgam... and:

- "Because this is a No Tears guide, we'll use jQuery"

- Use setInterval() rather than requestAnimationFrame().

- Questionable class-like implementation.

Granted the original HTML5rocks! post is over a year and a half old, but bad code and bad practices are NOT helping the cause.

It's a wiki. Why not fix it?
Unless the linked article is incorrect, only authorized employees are able to edit it. So like, it's an article, why not read it?

[my bad, it looks like maybe anybody can edit it after registering.]

I don't see how the red text "Web Platform Docs is an open wiki that anyone can help improve. See the getting started guide[0] to learn more." in the alert box at the top of the page could be more clear.

[0]http://docs.webplatform.org/wiki/WPD:Getting_Started First sentence: "Anyone can contribute to WPD."

I only read the article (which implies only employees will be editing the wiki), then went to the wiki itself later.
Yep, the site says clearly that it is in alpha.
I am not being argumentative when I ask this, I just want more details about this bullet:

> - Questionable class-like implementation.

Can you just lay it all out right here? What is wrong (or suboptimal) with the implementation, what alternatives would you prefer, etc. Everything that is behind that bullet, I want to hear it!

Instead of using prototypes and functions shared among all instances of the same type of object, it uses closures for each instance. The coding style is also questionable, with everything referencing a variable named 'I'.

It works, but in my opinion it is absolutely not a correct way to write code. In any case, OOP and class-style programming in Javascript is a large topic.

As you suggest, there are several schools of thought about how best to provide class-style programming. By using a closure instead of prototypes, you can have "true" private properties and functions. If you use prototype, you'll need to use a convention to mark something as private and hope the developers respect that (marking it with an underscore is common). In my experience, someone will ignore the convention and then something will break when you change or remove your "private" variable.
If the code was using those or other advantages of the pattern (like easier subclassing, methods already bound to the instance, etc) consistently, it would make sense. As it is, it just does ugly things like using 'I' and 'this' without any thought or pattern I can discern.
Style is one thing, but if you use closures, you have to be a lot more careful about memory leaks.
Thanks.

> Instead of using prototypes and functions shared among all instances of the same type of object, it uses closures for each instance.

So, is this generally considered a poor practice? I usually only use prototypes and shared functions when I am going to be instantiating the same type of object many times (when doing lots of vector math, for example).

What's wrong with using jQuery?
jQuery, while hugely popular, is not a standard.
You might want to lookup the term "de-facto standard":

http://en.wikipedia.org/wiki/De_facto_standard

your condescending tone aside, jQuery's API and vendor support is subject to change, especially in the coming months. last i heard, 50% usage also means 50% non-usage. you are also assuming that the target is a web browser, which is what jQuery is meant for. jQuery has no bearing on firefox extension programming, nodejs programming, or upcoming win8 RT and Firefox OS programming.
>your condescending tone aside, jQuery's API and vendor support is subject to change, especially in the coming months. last i heard, 50% usage also means 50% non-usage.

I'm afraid the points you make are not gonna help with my condescending tone.

50% usage? That's a HUGE success for a de-facto standard. There are even _official_ standards with much LESS use (SOAP comes to mind). So, the "50% non usage" part means absolutely nothing.

>you are also assuming that the target is a web browser, which is what jQuery is meant for. jQuery has no bearing on firefox extension programming, nodejs programming, or upcoming win8 RT and Firefox OS programming

Even if that was true, it would be irrelevant. Yes, a standard is only a standard is some SPECIFIC field. RS-232 is a standard, but has no bearing on, say, building construction. And those ANSI Screw size standards have no bearing at all in software: http://www.engineersedge.com/screw_threads_chart.htm

That doesn't make them any less standard.

That said, your examples are also false. jQuery can and IS used in nodejs AND in firefox extension programming. And presummably Firefox OS programming. Some examples:

http://net.tutsplus.com/tutorials/javascript-ajax/how-to-scr...

http://stackoverflow.com/questions/491490/how-to-use-jquery-...

Shouldn't the point of the "web platform" be that they make de-facto standards like JQuery obsolete? It seems to me that the examples and information on this site should be based on code that will work on all browsers without an intermediary between the code and the software these vendors (mostly) produce.
Nothing in general, but the way it is used for this tutorial adds nothing and obscures some of the topics.

Original jQuery code:

  var canvasElement = $("<canvas width='" + CANVAS_WIDTH + 
                        "' height='" + CANVAS_HEIGHT + "'></canvas>");
  var canvas = canvasElement.get(0).getContext("2d");
  canvasElement.appendTo('body');
'Native' code:

  var canvas = document.createElement("canvas");
  canvas.width = CANVAS_WIDTH;
  canvas.height = CANVAS_HEIGHT;
  var context = canvas.getContext("2d");
  document.body.appendChild(canvas);
Similar misgivings about the use of a jQuery plugin to read the keyboard later in the article.
That jQuery code is so horrible. What about if CANVAS_WIDTH is from an insecure source? Maybe someone sets it to include some of its own <script> tags or other tomfoolery.

HTML shouldn't feature in javascript code IMHO.

> HTML shouldn't feature in javascript code IMHO.

That's my beef above everything, createElement/DOM should be avoided. But for Google it's par for the course, their Google Closure introduction tutorial does just this even though they offer a templating system.

It's not good jQuery code either.

* The naming convention is terrible. 'canvasElement' sounds like it would be the canvas element, yes? No, it's the canvas jQuery object!

* Use of hard-to-read string concatenation.

* Use of .get(0) - use [0] instead.

And some non-jQuery objections:

* Unfortunate line continuation style that is hard to maintain (What if you change the length of the canvasElement variable name? You have to re-align it!) and falls apart in a proportional font.

* Inconsistent use of single vs. double quotes. I recommend single quotes for JS strings and double quotes for HTML attributes. Do it the other way around if you prefer, but at least pick one and stick with it!

* I'm reading the code out of context, but I'm guessing that CANVAS_WIDTH and CANVAS_HEIGHT are "constants". Why are they being used directly in the code like this? Shouldn't this code be wrapped up in a function that takes those as parameters?

Ignoring that last objection for the moment, I might write the jQuery version like this:

  var $canvas = $('<canvas>'), ctx = $canvas[0].getContext('2d');
  $canvas
      .width(CANVAS_WIDTH)
      .height(CANVAS_HEIGHT)
      .appendTo('body');
You're right, of course, that in this particular example jQuery has little or no advantage over direct DOM manipulation, but if they are going to offer a jQuery example, it ought to at least be a good one.

BTW the $ prefix on a variable containing a jQuery object is a very common practice in jQuery code. It's especially useful when you need both the jQuery object and the corresponding DOM element (assuming a single-element selector like '#foo'). Then you can use $ on the jQuery object and the same name without the $ for the DOM element:

  var $footer = $('#footer'), footer = $footer[0];
I get your point, but you should remember that we all have learned things the "wrong" way for the sake of brevity before we moved on to learning the best way. Despite the flaws, I still think the tutorial is a great introduction to breaking down the steps of creating a game.
Absolutely! I can look back at the set of tutorials that I myself wrote while I was learning JavaScript and HTML5, and there's a bunch of stuff that makes me blush now - including among other things using jQuery and this quote: "Learn jQuery and love it." For the sake of completeness (and cannon fodder for anyone who wants to criticize) it's here: http://www.iguanademos.com/Jare/docs/html5/Lessons/

My concern was perhaps due to expectations about the quality of the site's content, as people were talking about where it stood compared to w3schools and even MDN.

Yeah this looks awful. No syntax highlighting either, which is odd because its basically automatic these days (rainbow.js or any of a million plugins). It's also surprising that they resorted to a screenshot instead of just putting the playable game on the page.

I think the use of setInterval is fine because it keeps the code very short compared to the requestAnimationFrame shim, but there should definitely be mention of it.

Hopefully I can add my tutorials to this site (which I think are much cleaner) when I'm finally done with my (blocking) larger projects.

Surprisingly the content of robots.txt is:

  User-agent: *
  Disallow: /
http://webplatform.org/robots.txt
I can't begin to fathom a motivation for that. Can anyone think of a reason, or is this likely simply a mistake?
Maybe someone from Facebook made the robots.txt file, ayyy!
The site doesn't even seem close to being useful or complete yet. I think it's intentional.
They didn't want search traffic until the content and structure start to stabilize? Google, et al. will crawl for years after a URL 404s so it might make sense to hold off until the first round of stabilization
The site was in super-alpha. I think it was intentional.
This has already been changed to #User-agent: * #Disallow: /
So happy to see Microsoft on this list. There's hope for IE yet.
Agreed. Now if they would cease support for IE<9 on the desktop and for their mobile browsers pre-WP7, that'd be great. Offering a standards compliant browser for Windows XP (combined with a mandatory upgrade) would help as well. Given that IE9 depends on elements that were introduced in Vista that'll be quite an undertaking, so offering a browser choice menu for IE users on XP would be easiest.

Sadly, none of the above is likely to happen.

The skeuomorphic logo is such a terrible choice or did I accidentally miss all of the web's 4-bar linkages?
The logo is not skeuomorphic.
Indeed it is. It is representative of bar-linkage mechanical systems.

Do you have any evidence to substantiate your claim?

I don't want to be an asshole who just criticizes, but really? It's the best W3C, Apple, Google, Microsoft, Mozilla, Facebook, HP, Adobe, Nokia and Opera could come up with?

Just look at these screenshots:

http://d.pr/i/EbSt

http://d.pr/i/zmk9

http://d.pr/i/i9y

And it took me 5 minutes to load the site - it was down when I first tried it (and on subsequent tries).

So, I personally don't think this is the w3schools killer we were waiting for. At least not yet.

Actually a "2 + 3" captcha is much more effective than a typical one with an image. You'd be surprised.

When I ran a phpBB forum that spammers would join to get some of my PageRank 2 juice, putting up a special question on the registration form (by modifying the php code), was much more effective than phpBB3's captcha function with maximum difficulty applied.

Spamming software doesn't have support for capctha questions, only captcha images.

It depends on the threat. If you're worried about someone writing a custom script to attack your site, you want a hard captcha. If you're worried about random form-filling bot spammers, you want to be unique.

I wrote a plugin for wordpress years ago that simply asked you to copy a number into a box. If you had JavaScript, it would even do it for you and hide it so most users never even knew it was there. It filtered out nearly every single piece of spam. This would have been mid-2000s though, might be different now.

The problem is, it's always in the form of "x + y = ?", which makes it ridiculously easy to bypass with an script.

At least that's what I initially thought. But after some more digging it seems that x and y are hard-coded to be 2 and 3, respectively.

I opened the registration page in 4 different browsers with different IP addresses (my own, my VPS, and a couple borrowed from Tor) and in all cases the "security" question was "What is 2 + 3?"

Unbelievable.

Ten minutes to implement, stops nearly all automated attacks that aren't specific to this site, much less user hostile, and far fewer accessibility issues.

Believable.

Not to mention a placeholder for a more advanced captcha to eventually be deployed.

Extremely believable.

Choosing an image sharing site that requires Javascript to display an image. Really?
Sorry. But I chose the only image sharing site that isn't blocked in my country (and isn't a complete garbage, and preferably has a mac client)!
Not running with Javascript enabled? Really?
Absolutely. Noscript is the only sane way around the web these days.
That and tin-foil gloves for keyboard work.
They say they're in alpha. Has to start somewhere, right?
As someone pointed out above, the robots.txt may be like that because the site hasn't been deemed properly ready. (And similarly, the site isn't fully developed so the blog isn't set up yet.)
>I don't want to be an asshole who just criticizes, but really? It's the best W3C, Apple, Google, Microsoft, Mozilla, Facebook, HP, Adobe, Nokia and Opera could come up with?

No, it's the best a small team, sponsored by those companies, but having nothing to do with them --it's not like Google or Adobe or MS assigned their best engineers to the new site-- could come up with as an ALPHA release, and in a short period of time.

Isn't it OBVIOUS?

> Isn't it OBVIOUS?

No, it's not. I didn't (and still don't) see a mention of it being alpha or even beta on the site's homepage or the linked article. There's a notice on wiki pages that I missed.

And my impression (from the article) was that the initial content is provided by the aforementioned companies' employees, and the site is curated by W3C. So it's not like a bunch of nerds have created a site and these tech giants are endorsing it by putting their logos in the main page. They are the guys who are running it, and it's not a charity, too. It benefits all these companies (whom, in total, worth maybe about 3 trillion dollars) financially.

I'm not sour at them or anything - I'll probably use their site and share it with others. I'm just disappointed that it's just not up to the standards of what I was hoping these multi-trillion campaniles are able to do. If they were just a bunch of guys, I'd commend them. Now that it's a coalition of biggest tech giants, I can't be as forgiving.

> So, I personally don't think this is the w3schools killer we were waiting for. At least not yet.

Pretty much every HTML/CSS resource out there is a w3schools killer. w3schools sucks.

w3fools.com tried to kill w3schools and it couldn't do it.
Awesome. I hope this turns into something really great.

I know it's in alpha, but my first impression was a bit-off putting:

-Look at Hot Topics, figuring this is a good starting point

-Click on INDEXEDDB (I don't use it, have only a vague idea what it is)

-No introduction. No description of what it is or how to get started.

-Instead, a reference with 50 subpages

-8 flagged issues: Missing Relevant Sections, Needs Topics, Data Not Semantic, Unreviewed Import, Incomplete, Not Neutral, Cleanup, Compatibility Incomplete

(comment deleted)
Is this the Bretton Woods Conference for the web as we know it?
Less than 1000 users thus far. Great time to reserve your name.
This is great, although I wish it would have started few years earlier.
Is there a community on Stack Overflow that is already offering the same functionality as the WebPlatform forums?

Some thoughts...

The Q/A format in general seems like a great solution to the problem of sharing the best way to do things because it requires the person asking the question to ask a 'good' question and the person answering the question to provide a 'good' answer. Voting up the 'best' answer gives the closest approximation to the 'right' answer. The WP forum is devoid of any real content. It'll be years before it has anything approximating what SO offers.

I can see the wiki format being good as a replacement for something like w3schools, but that isn't really what this appears to be. Plus, we all know that wiki's get out of date pretty quickly with the ever changing technology... unless of course enough people are paid to work on this content... and who says they are the 'experts'. You can already see in the comments here that people disagree with the coding examples. Who is going to moderate all of this?

> Who is going to moderate all of this?

Google, Microsoft, Adobe and other stewards have fulltime technical writers working on new content and reviewing incoming contributed content.

I wonder why are they not using Mozilla Persona for their authentication system.
Because that would require real work and collaboration and actually move the web forward.
Haven't rofled so hard in a long time. Thanks for that.
one thing that would be of huge help, but also a huge undertaking is to allow for selection of targeted browsers, with the least common denominator dictating which code examples you see. for example if IE < 9 is selected, a jQuery fallback would be an acceptable compromise.
Why is it that The Next Web submissions constantly gets more points than the origin link?
I'd rather they come together to do something important, like implementing browserid/Persona. I don't think this will even come close to the usefulness of StackEchange.
This is supposed to look like a reference documentation as opposed to a collection of specific questions and answers.