Hacker Newsnew | past | comments | ask | show | jobs | submit | BillGoates's commentslogin

Separating DOM and data I can understand, but I am not convinced Backbone is the right way to do it.

My code would look more like:

    function postdata(url, data, callback) {
        $.ajax({
            url: '/status',
            type: 'POST',
            dataType: 'json',
            data: data,
            success: function (received) { callback(received); }
        });
    }


    var statusform;

    (function(pub) {
        var status = ""

        pub.init = init;
        function init() {
            $('#new-status form').submit(function(e) {
                submitdata(); 
                e.preventDefault(); 
            });
        }

        function submitdata() {
            var data = {
                text: getfieldvalue("textarea")
            };

            if (!data.text) { return; }
            postdata("/status", data, function(received) {
                status = received.status;
                drawscreen();
            });
        }

        function getfieldvalue(fieldname) {
            return $('#new-status').find(fieldname).val();
        }

        function drawscreen() {
            if (status) {
                $('#statuses').append('<li>' + status + '</li>');
                $('#new-status').find('textarea').val('');
                status = "";
            }
        }
    }) (statusform);


    $(document).onload(statusform.init);

Note 1: This code sample is untested, but should give a good enough idea what I am trying to do. Note 2: For extra type safety, use typescript interfaces to model data.


Apologies for off-topic, but how does one post code, or do quoted text on HN? I've seen it done here and a few other places, but haven't been able to find documentation on how.


"Text after a blank line that is indented by two or more spaces is reproduced verbatim. (This is intended for code.)"

http://news.ycombinator.com/formatdoc


The problem with TBBT is that the writing of the last season(s) is so bad and lazy, that you are wondering why you liked it in the first place. Same thing happened with Two and a Half men. The decline in the writing of both shows coincidences with the introduction of their 3rd show, Mike and Molly.

It's a comedy show, you are supposed to laugh at the characters. None of them should be taken seriously, they consist mostly out of randomly selected quirks that change with each episode. The 'normal' people are just as silly as the nerds. If we were meant to relate to someone, it isn't Penny, but Leonard.


This happens with most sitcoms when they get big. They swap out the original writers, who move on to more creative things, and bring in the stable career sitcom writers who know how to run things in bland continuity for ten years.


In FireFox the problems are either with the timer or how fast a screen is drawn.

On an old laptop, changing the opacity, or set a different color of the same amount of divs takes about 50ms. The next timeout or interrupt, is on average 200ms later. The first screen draw is the slowest with 350ms.

I used absolute position for the divs, so that the browser doesn't have to recalculate the page after each update.


Less than 1% has JavaScript turned off. The answer to your question is the same as to if a website should support Netscape 3.

I would say the answer depends on what the target audience is, what kind of site it is, and how much time it will save.


Right, when I was with Marriott we did extensive research of the subject. The numbers just don't add up. Now that I am on my own, I recommend to my clients that they take full advantage of the tools at hand. Butchering the development model to support less that 1% (it was a little higher when I was there around 1.5%) just cannot be justified. Further it is cheaper to build a clean modern code base and then route the non-JS traffic to a site built independent of the modern code base that supports non-JS client. The reality was that the business case could not be made to even spend the development effort to build out a non-JS site. It would have literally been cheaper to send ever non-JS user a new computer with a modern browser, than it would have been to spend the development effort to build the site. Graceful degradation to non-JS creates more complexity and increases the overall effort, when quantified that money is almost always better spent on a better returning effort like an IOS app or further features on the JS enabled site. Now days it is hard to make the numbers work to support a non-JS site. Personally, even if I had no other features to implement, I would spend the money saved from removing the complexity of graceful degradation, on color blind testing, site reader software testing for the blind or internationalization. All of which have better business cases than non-JS support.

While I am on the subject my group (the web) made the business case that having JSP and Javascript was redundant and added to the complexity and therefore the cost of development and maintenance. We where able to successfully transition away from back-end web frameworks two a pure JS/HTML/CSS front end. In doing so we where able to simplify our development model, which increased our defect resolution time as well as our new feature development time.


For me personally, I couldn't work without music. It blocks out environment noise. In a silent area it's like every small sound is amplified tenfold. It could be I'm different, but I had very productive weeks, while on the other monitor Farscape was playing for the nth time.

So I would say, let them choose for themselves what works best. Loosing concentration once in a while because of the music might be a natural stopping point, and listening to music for a short time gets the brain rested enough for a next period of concentration.


I don't think the author intended to insult Java/C# developers. He just gave an extreme example to show that a good IDE will pay it self back.


Only 8 more days till April 1st


It wouldn't be the first time Wikileaks went after corporations. Half a year ago they published a document about how shareholders plundered the islandic bank Kaupthing before it collapsed.

Publishing intellectual property would be illegal, and I fail to see why anyone would fear Wikileaks for doing such.


I would tell Microsoft to go back to their 90s mindset. Less focussed on big corporations, and more on getting (Windows) Microsoft software everywhere. Back then Microsoft was maybe an evil empire, but at least they did some exciting things from a developers viewpoint.

@Balmer: Get rid of .NET. There are people who use it, and some of them actually like it, but it will never become the huge success you thought it would become. This also means Silverlight has to go. The JIT compiler, with an open sourced assembly language, could get a 2nd life in the browser.

For a next OS, have a good long look at Windows 2000. Start from there, and instead of adding millions lines of code, start rewriting to make it smaller and faster. That way you end up with a valid OS to use on mobile devices.

Put more effort into your webbrowser. Make it so that it can be used for any type of application. Don't wait for W3C, if it's up to them we will have to wait till 2019 for a complete HTML5 specification. The other browser developers will either follow, and if not, developers will decide if they make a windows only application. Make the browser the default UI layer of Windows. This time to prevent nasty lawsuits, make it easy for others to add their own navigational toolbar.

So in short, instead of trying to protect business with windows locked in technology, be more open, and out develop the other companies. Become the company again, where it pays off to develop on your platform.


> @Balmer: Get rid of .NET.

In Q4 2009 the Server and Tools division had a revenue of 3.5 billion, bigger than their Client division, their online services or their entertainment devices.

.NET is one of their best products. It's one of the few reasons developers might develop for Windows Mobile 7. It's the single reason I actually thought about deployment on Windows servers.

With a single platform you can target the web, desktop clients (even clients running on Mac OS X / Linux), rich intranet web apps (Flex-like) or mobile apps (Silverlight has been released for Symbian, WinMo7, MeeGo and probably Android following).

Getting rid of .NET could be the stupidest thing they ever did, and probably the last nail in their coffin.


The server and tools revenue doesn't say anything about .NET. I didn't say get rid of SQL server or their server OS.

Compare the popularity of C# + VB.net to other languages to see .NET has less than 1/20th of the market. And that for a company that not so long ago dominated the software market.

.NET is useless for

* desktop applications, since the forward and backward compatibility is not guaranteed.

* Downloadable applications, because a 250mb library pack download is just too much.

* Web Startups and/or social applications, because of the (sql) server costs.

So the only use .NET has is for small corporate applications.

The only thing Silverlight is good for is playing DRM protected media.


On Window XP the download for .NET 3.5 Client is just ~28Mb for machines with no framework, ~ 40 MB for .NET 4 (again, with no other version) and the web installer is only ~800 KB.

Over 80% (or even 90%) of Windows clients have some version of .NET installed, and since it's being pushed through Windows Update, some stats are reporting .NET 3.5 at more than 60%.

The Windows 7 marketshare is bigger than 10%, which means there are more Windows 7 clients out there then OS X, and I haven't seen OS X developers complaining about a lack of users willing to try out their apps.

> Web Startups and/or social applications, because of the (sql) server costs

Yes, but it really depends on your needs. PlentyOfFish / StackOverflow are doing just fine.


Details missing the point. Yes it's possible to use .NET, but Microsoft development tools aren't automatically the best choice anymore, and often even the worst choice.


Don't wait for W3C, if it's up to them we will have to wait till 2019 for a complete HTML5 specification. The other browser developers will either follow, and if not, developers will decide if they make a windows only application.

Wow! Are you actually suggesting they try and hold back the development of the web for another 5-10 years, if they can pull it off?

"Just make everything about websites IE-specific again and we're all good!"


No the opposite of holding back. Without MS we wouldn't have AJAX or Rich Text editors at the moment.

I am fully supportive of open standards, but it's rare that companies together can develop one. The year 2019 I mentioned was wrong, the final specification of HTML 5 is planned for 2022. Even after half the spec has thrown out already.

So MS has to go back at what they did best. Embrace and extent. Make the existing specifications work, but add more (useful) functions. Such as 3D, printing documents or a real rich text editor. The other browser developers are already doing such, so if MS wants to stay significant, they will have to do something.


Everyone knows XMLHTTPRequest originated from IE, but does that really matter? It's not like no other company could have come up with anything like that, is it?

No matter when it's deemed "finished", HTML5 is coming along nicely. It feels like you can already start using it a little, and after some time, all browsers that matter (which might not even include IE anymore) will support HTML5 & CSS3 well enough that you can actually use them.

That's really cool, and Microsoft has done absolutely nothing to make that happen - quite the contrary.

They were pretty much refusing to co-operate for as long as possible, naturally, and when they realized that the IT world wasn't going to wait for them anymore, that they had become irrelevant, only then did they actually do something to support standards.

Make the existing specifications work, but add more (useful) functions.

That's not an implementation of a standard anymore. In fact, even the browser-specific way Safari and Firefox have approached CSS3 is really weird - why not just freaking use the names that are going to be used eventually anyway? It makes no sense.

You can't support MS adding their own proprietary shit on top of open standards just because they happened to produce XHR while doing exactly that.

The other browser developers are all coming around to implementing HTML5 and CSS3, and if MS wants to stay in the game, right now they actually have to do the same, as they've apparently realized. If they had the choice, they'd be doing everything in their power to fuck everything up and make the world depend on IE once again - you can count on that.

So please, stop the misguided MS-love.


As always I am wondering if this test tells me, who I am, who I think I am, or, who I want to be.

Today I am somewhere between ENTP and INTP

ENTP (E: 1 N: 75 T: 50 P: 33)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: