答:
It depends on which real world you're talking about.

Jorge Luis Borges wrote a story "Tlön, Uqbar, Orbis Tertius", where one of the inhabitant peoples seem to perceive their real world quite differently:
[...] the people of the imaginary Tlön [...] hold an extreme form of Berkeleian idealism, denying the reality of the world. Their world is understood "not as a concurrence of objects in space, but as a heterogeneous series of independent acts." One of the imagined languages of Tlön lacks nouns. Its central units are "impersonal verbs qualified by monosyllabic suffixes or prefixes which have the force of adverbs." Borges lists a Tlönic equivalent of "The moon rose above the water": hlör u fang axaxaxas mlö, meaning literally "Upward behind the onstreaming it mooned". [...] In another language of Tlön, "the basic unit is not the verb, but the monosyllabic adjective," which, in combinations of two or more, are noun-forming: "moon" becomes "round airy-light on dark" or "pale-orange-of-the-sky.

(copied from the wikipedia artice about the book)

To me, the point is not so much that the world can be perceived differently than we do, which is kinda cliché, but that perception of the structure of reality itself depends on the language we speak, be it a natural or a programming language. The Tlönese might be very happy with Lisp, and might see Java (AKA The Kingdom Of Nouns) as very unnatural, whereas most terran programmers tend to favor object oriented over functional languages. I like both styles, since I think it is mainly a matter of perspective. Some problems are best attacked with functional, some others with object oriented programming techniques. A good programmer always looks at a difficult problem from different angles, before he attempts a solution. Or, as Alan Kay put it: Point of view is worth 80 IQ points.

So, my answer to your question is: Which real world are you talking about? And How?


问:
Why do Java's Iterator and ListIterator point between elements?
The Javadoc for ListIterator says:

A ListIterator has no current element; its cursor position always lies
  between the element that would be returned by a call to previous() and
  the element that would be returned by a call to next().

Why was Java's ListIterator implemented to point between elements rather than at a current element?  It seems that this makes client code less readable when it has to repeatedly call getNext(), getPrevious(), so I assume there must be a good reason for the choice.

As a side note, I just wrote a little library called peekable-arraylist that extends ArrayList, Iterator, and ListIterator that provides a peekAtNext() and peekAtPrevious() methods implemented like:

```<code>  @Override public synchronized T peekAtNext() {
     T t = next();
     previous();
     return t;
  }
</code>```

答:
As far as I can tell, the reason can be found in the part of javadoc you didn't quote (emphasis below mine):

An iterator for lists that allows the programmer to traverse the list in either direction, modify the list during iteration...

You see, the intended purpose is to allow usage while list is being modified. Possible modifications apparently include removal of the elements.

Now think of what would happen if we remove an element that would be current() for iterator - assuming that iterator would have a notion of current element? In this context, the way to implement it without a notion of current element makes pretty good sense to me - because that way, iterator does not have to worry about elements removal.

It is important to note that javadoc does not require interface implementations to be thread safe.

Because of that, one should not expect correct handling of modifications done from different threads - for that, implementation would have to provide additional means to synchronize access, guarantee visibility etc as specified by Java Memory Model per JSR 133.

What ListIterator is capable of, is handling modifications done from the same thread when iterating. Not all the iterators are like that, ConcurrentModificationException javadocs specifically warn about this:

...Note that this exception does not always indicate that an object has been concurrently modified by a different thread. If a single thread issues a sequence of method invocations that violates the contract of an object, the object may throw this exception. For example, if a thread modifies a collection directly while it is iterating over the collection with a fail-fast iterator, the iterator will throw this exception...

ContentLicense: CC BY-SA 3.0


问:
What security is used by default in WSHttpBinding (service side) or the WCF Test client (client side)?
I recently moved a service from BasicHttpBinding to WSHttpBinding (i.e. SOAP 1.1 -> SOAP 1.2). In WCF, using WSHttpBinding() makes it start using some default security settings. I presume the same default security settings are also used by the WCF Test Client since the client and server can continue talking after switching to the 'secured' WSHttpBinding. In fiddler, I've confirmed this security setup since I can witness more complex security handshakes from the previously dead-simple request-response i.e.

Before: (BasicHttpBinding)

[HttpRequest ] (SOAP Request In Clear)

[HttpResponse] (SOAP Response In Clear)

After: (WSHttpBinding)

[HttpRequest ] RequestSecurityToken

[HttpResponse] RequestSecurityTokenResponse

[HttpRequest ] RequestSecurityToken

[HttpResponse] RequestSecurityTokenResponse

[HttpRequest ] RequestSecurityTokenResponse

[HttpResponse] RequestSecurityTokenResponseCollection

[HttpRequest ] EncryptedData

[HttpResponse] EncryptedData

[HttpRequest ] EncryptedData (actual application level request)

[HttpResponse] EncryptedData (actual application level response)

So I can safely assume security is being applied. Now to the questions:

Question 1: What are the security settings?
I never told WCF of any membership provider. In fact I don't have any table (SQL or XML) of any usernames <-> passwords. So what kind of authentication is happening? Although WCF Test Client can authenticate as above, SoapUI doesn't pick up these Microsoft .NET defaults and has issues. SoapUI attempts clear text communications and then the server responds with an incorrect security token error.

Question 2: What is the most commonly practiced security model for SOAP 1.2?
Is it via certificates or username passwords or digest or _____? How are those credentials stored (SQL/XML?) and configured on the WCF server side?

答:
Well, the famous WSHTTPBinding. It causes a lot of pain for non-.NET platforms.

First of all, even if SOAP 1.2 is a standard, WSHTTPBinding is a Microsoft implementation over SOAP 1.2 and by experience, it's not as easy as "Our product support SOAP 1.2 so it'll work with WCF & WSHTTPBinding services, no problem!".

Answer 1

There are two main security settings:

Message Security: the message is partially encrypted, Default

Transport Security: uses SSL to secure the channel

About authentication, WSHTTPBinding uses Windows credentials (NTLM or Kerberos) by default.

Answer 2

It depends, but a short answer is:

You need to re-route the messages or inspect them: use Message
Security

You need point-to-point channels and can secure them with
certificates: use Transport Security

Your clients and servers
share the same authentication platform, use Windows
authentication

You need an open authentication for externals
clients, or cross-platform, use Username authentication

About Username authentication, there are different configurations. You can store the credentials in an SQL database, yes (we do this in our company for some services).

Some simple cases: Improving Web Services Security: Scenarios and Implementation Guidance for WCF


问:
Does Object Oriented Programming Really Model The Real World?
I've seen it commonly repeated the object-oriented programming is based on modeling the real world but is it?

It seems to me that is not true of anything outside of the business layer. My GUI classes/data access classes aren't modeling anything in the real world. Even in my business layer, I've got classes like observers, managers, factories, etc. which aren't real world objects. I try to design my classes to take advantage of things like encapsulation but is the real world encapsulated?

While some objects I create are modeling real-world objects, would not pre-OOP code do the same? I doubt that OO was the first people to include concepts like Customer in their code bases. But OO is really about how to model things, and that method of modeling doesn't seem inspired by the real world to me.

So: does object-oriented programming really model the real world?

答:
OOP creates a nice model from the programming point of view, it does not reflect real world.

However, there are much better approximations of the real world, which are known by the term domain specific languages (DSL). For example Boo provides you with ability to write human readable code in nearly plain English (sample from the article).

```<code>apply_discount_of 5.percent:
         when order.Total > 1000 and customer.IsPreferred
         when order.Total > 10000

suggest_registered_to_preferred:
         when order.Total  > 100 and not customer.IsPreferred
</code>```

Another example would be automated user acceptance testing frameworks based on Gherkin language.

```<code>Feature: Some terse yet descriptive text of what is desired
    In order to realize a named business value
    As an explicit system actor
    I want to gain some beneficial outcome which furthers the goal

Scenario: Some determinable business situation
    Given some precondition
        And some other precondition
    When some action by the actor
        And some other action
        And yet another action
    Then some testable outcome is achieved
        And something else we can check happens too
</code>```

ContentLicense: CC BY-SA 4.0

Body:
OOP creates a nice model from the programming point of view, it does not reflect real world.

However, there are much better approximations of the real world, which are known by the term domain specific languages (DSL). For example Boo provides you with ability to write human readable code in nearly plain English (sample from the article).

apply_discount_of 5.percent:
         when order.Total > 1000 and customer.IsPreferred
         when order.Total > 10000

suggest_registered_to_preferred:
         when order.Total  > 100 and not customer.IsPreferred

Another example would be automated user acceptance testing frameworks based on Gherkin language.

Feature: Some terse yet descriptive text of what is desired
    In order to realize a named business value
    As an explicit system actor
    I want to gain some beneficial outcome which furthers the goal

Scenario: Some determinable business situation
    Given some precondition
        And some other precondition
    When some action by the actor
        And some other action
        And yet another action
    Then some testable outcome is achieved
        And something else we can check happens too


问:
What to do with bugs that do not repro?
I have a tester that while testing will have an error occur (ok so far), but then he frequently reports it right away.  We (the developers) then later find that the tester has not tried to reproduce the issue and (when asked) cannot find a way to make it happen again.

Now these are still bugs, I don't want to ignore them.  But without repro steps I am kind of stuck.  Sometimes there is a stack trace (though frequently it is not useful because this is compact framework and there are no line numbers).  But when there is one I can take the stack trace and crack open the code and start guessing, but that does not lead to testable "fixes".

What do you do in scenarios like this?

答:
Ultimately if neither the developer nor the tester can reproduce the bug it should be closed but marked as such.

However, how long it takes you to get to that point is debatable.

Some people would argue that if it's not immediately reproducible then it should be closed forthwith.

I usually strive to try to get more information from the originator of the problem. There may be something they forgot in the original report. Having a conversation about the required steps can often reveal the missing information.

One final thought - closed as "no-repro" doesn't mean fixed. If there is a real problem it will reveal itself sooner or later and having all the information you can will help when you can finally reproduce the problem.

ContentLicense: CC BY-SA 2.5

Title: What to do with bugs that do not repro?


问:
Are there open-source JavaScript libraries addressing multiple browser tabs and client state for newer browsers?
There are a few new HTML5 features that have made it into recent browsers that allow sharing state among tabs, browser windows, same domain windows, etc. So it's probably gotten a little easier to write a web application that keeps a lot of state on the client and also manages state intelligently between tabs and/or windows.

There are currently libraries like Backbone.js that can help manage state in a single tab or a single window. Is there anything out there yet that helps with multiple tabs (or windows) managing global state, tab specific state, and cross-tab eventing without relying on the server to sync them all up?

答:
Short answer:

You cannot truly pass state information from one tab to another...

Long answer:

You cannot truly pass state information from one tab to another, as this would be a very severe breach of sandboxing and security.

You can, however indirectly pass state between two tabs by way of:

client-server communications (WebSockets, AJAX calls, ...),

browser extensions (they can be allowed to bypass, and some browsers offer APIs to implement a message-passing system to communicate between background pages, tabs and content scripts),

Another option would to simply communicate via cookies to pass information between 2 tabs, but this would most likely cause issues, be highly browser-dependent and require page reloads (and to be honest I've never tried that one and just thought of it, but others have done it).

So, as browser extensions are obviously a fairly limiting path, you should go the way of client-server communications and develop a system to allow clients to publish events to a server, that then re-dispatches them (or any other kind of broadcast) to other clients via a communication protocol of your choice.

Update 1: As someone mentioned in a comment before removing it (cannot give credit as it doesn't show in the inbox, sorry)

HTML5 introduces the window.postMessage API.

For a working example, see John Resig's blog-post on Cross-Window Messaging.
And very interestingly, if you look at the comments on this post you'll notice someone called Malte mentioning a library they wrote to use window.postMessage on modern browsers, or a cookie-based version on older browsers.

Read these for more details and examples:

MDC's window.postMessage page,

David Walsh's blog-post on window.postMessage (demo is broken though),

the HTML5 Web Messaging draft document,

this Ajaxian write-up on window.postMessage with additional links.

Update 2:

Keep in mind that, as 2012-03-04, the HTML5 specification is still a draft, so some features could be removed. So use with care...


问:
Why is Perl so heavily used in Bioinformatics?
What is it about Perl that makes it so useful in Bioinformatics ? Why isn't C++ or Matlab or Python the big language?</p>

答:
I am going to add an answer here as I think a lot of them have missed a key point...

Perl is popular in bio-informatics because it is originally a text-processing language.

Text is King

Perl makes it easy to:

implement NLP and bio-informatics algorithms,

extract textual data,

generate textual data.

The Language Isn't (Half) Bad

It also has the benefits of having:

a decent expressiveness,

a relatively low learning curve (until your discover all its tricks and hacks),

but also a decent performance.

While it won't allow to create processing programs running as fast as a C equivalent, the development time is a lot inferior and it comes with batteries included when it comes to text processing (powerful regular expressions, anyone?), thus making it easy to pick up and use in a lab context to solve these tasks.

Portability and Extensibility Made Easy

Also, it obviously also:

is portable across many platforms,

comes with a very large library of extensions.

But the reason why there are so many bioinformatics (and scientific in general) extensions and modules for Perl in the first place is because of the reasons given above. In a great many cases, the language's design and abilities make it an almost perfect fit (despite many possible grudges one can hold against it) for the job.

All this makes Perl a good contender for scientific research, especially in fields where the data to process is mostly in text format.

Of course, other languages have emerged and claim a market share for different reason (enhanced expressiveness, better readability, explicitly avoid obscure hacks and guru-ish one-liners...), but they still compete with Perl on certain aspects (Ruby is as fast to learn as it is slow to process data, for instance). So, in the domain of bioinformatics (or NLP) where you deal with text formats, quick research cycles and more and more big data that keeps getting bigger (thank you, genomics and NGS), Perl is still very relevant.

Actually, just noticed maple_shaft, Charles and geoffjentry's comments, which mentioned the importance of regular expressions as well, so not everybody overlooked this. :)


问:
Should a standard include header be specified in each file or as a compiler parameter?
I've got a file such as this:

```<code>#ifndef STDINCLUDE
#define STDINCLUDE

#include <memory>
#include <stdexcept>

#endif
</code>```

I want this file to be included in every header file, because I use stuff from those headers so much. Is it preferable to include this via compiler options (-I stdinclude.hpp), or should I physically include them in each header? (#include <stdinclude>). Note that I am attempting to be cross-platform-minded. I use cmake to serve atleast Unix and Windows.

答:
Ideally for a cross platform code i would try to keep things simple (there are many out there to get more ideas)

```<code>#ifdef Linux
    #include <stdio.h>
#elif WIN32
    #include <something.h>
#else
  #error "Which OS?"
#endif
</code>```

Given this i will now give -DLINUX or -DWIN32 on command line.

What is the critical difference?

As the code evolve, many more files gets added or removed under the includes, but keeping this approach, the guy who compile doesn't have to remember editing such includes.

Ideally, all includes must be written statically only. But switching can be done more as functionality (different module, os, dependencies) rather than individual mess.

Body:
Ideally for a cross platform code i would try to keep things simple (there are many out there to get more ideas)

#ifdef Linux
    #include <stdio.h>
#elif WIN32
    #include <something.h>
#else
  #error "Which OS?"
#endif

Given this i will now give -DLINUX or -DWIN32 on command line.

What is the critical difference?

As the code evolve, many more files gets added or removed under the includes, but keeping this approach, the guy who compile doesn't have to remember editing such includes.

Ideally, all includes must be written statically only. But switching can be done more as functionality (different module, os, dependencies) rather than individual mess.


问:
Would the concept of source code layers be of any use?
I'm talking about something like layers in photoshop, except they apply directly to the source code.  For example, in pseudo-code... inventing what some project might look like - say a computational fluid dynamics program:

[base layer]

```<code>cfdTime runTime(0);

fieldVariable U;
fieldVariable p;
U.initialize();
p.initialize();

while (runTime.run())
{
    U.solve();
    p.solve()
    runTime++;
}
</code>```

[turbulence layer]

```<code>turbulenceModel turbulence;
scalar nu(readScalar(turbulence.dictionary("nu"));

while (runTime.run())
{
    turbulence.update();
}
</code>```

[base layer + turbulence layer]

```<code>cfdTime runTime(0);

fieldVariable U;
fieldVariable p;
U.initialize();
p.initialize();

turbulenceModel turbulence;
scalar nu(readScalar(turbulence.dictionary("nu"));

while (runTime.run())
{
    U.solve();
    p.solve()
    turbulence.update();
    runTime++;
}
</code>```

You get the idea.  Obviously a lot of things would need to be worked out.

I'm all over object-oriented programming (OOP).  This idea strikes me as an awkward alternative to OOP... and I don't think it's worth much... but I thought I'd toss it to the community... there just might be something useful in it that I'm not quite seeing.

It may be useful from a GUI-only perspective - creating layers in the GUI for complex functional programming... while the underlying code is always the same.  Or it may be useful for code optimisation, perhaps an alternative to #ifdef that developers won't run screaming from.  Or, it may be an entire alternative to OOP.

Your thoughts?

答: That actually reminds me of how old MS Qbasic would display subs, but If you looked at the actual .bas file, it was linear. Maybe all you need is a text editor that's smart enough to collapse code blocks in a navigation tree. I think I've seen something like that for HTML tags.</p>

OwnerDisplayName: Marupio


问:
What makes a language more suited to Artificial Intelligence?
I've always read that LISP is well suited for Artificial Intelligence, but I never found out why. </p>

答:
All languages have different usage. and while you might have heard of Lisp (or prolog, haskell as well) being popular.

The point is they are declarative languages and there is general idea that Knowledge representation can be better and more effective using declarations of axioms or rules as opposed to expressing them as algorithm and linking them in all possible context of evaluation.

It is not a universal practice that you cannot use imperative languages there.


问:
JavaScript Multi Threading
Well these days JavaScript is main player in all web development technologies , on client side for making user interface better, client side logic, on some web servers as server side logic also

Add to that the fact of people (at least some of them ) started moving in web game development from flash to javascript and HTML5

Isn't it time for it to support multi threading ! are there browsers that allow JavaScript to be multi threaded or is it there in any standards , HTML5 or future versions ?!

答:
Multi threading will not be done in EcmaScript but can be exposed in host environments.

The classic examples are WebWorkers which allows you to spin up a background worker to do work in and abusing 's as a way to spawn new processes.

It should be noted that multi threading in JavaScript is not needed (there are exceptions, mainly graphics related programs). You don't need multiple threads, you already have an event loop for your GUI and your graphics rendering (canvas) is hardware accelerated (meaning the GPU renders your graphics in parallel for you).

Although projects like webcl are pretty exciting.

Title: JavaScript Multi Threading

Body:
Multi threading will not be done in EcmaScript but can be exposed in host environments.

The classic examples are WebWorkers which allows you to spin up a background worker to do work in and abusing <iframe>'s as a way to spawn new processes.

It should be noted that multi threading in JavaScript is not needed (there are exceptions, mainly graphics related programs). You don't need multiple threads, you already have an event loop for your GUI and your graphics rendering (canvas) is hardware accelerated (meaning the GPU renders your graphics in parallel for you).

Although projects like webcl are pretty exciting.


问:
Web development advice for a distributed development team
I am a web developer. Worked in many projects. Now I have changed my work place. It is big organisation. I and my group are thinking about new project. There is no difficulty to write project but our organisation is big and it's has little offices in many places (within the country). There is no any problem about internet in center. But there is problem with internet in remote areas sometimes.

My question is: is there any solution to solve problem as it? If anybody has create project such this please tell little about what technologies you have used.

Thanks

答:
I have been working in a company with a strong work from home and distributed development culture. Distributed development is indeed a challenge but one that is rapidly becoming feasible due to advances in tools and technologies out there. IMO more than the tools it is the appropriate mindset that needs to be cultivated in order that you can successfully do distributed development.

According to wikipedia the term "Distributed Development" is not a very clear one, so first let me just give you my view of what I consider to be distributed development from a software developer's perspective.

What I call “distributed development” is a software development approach that leverages technological advances in internet connectivity and better communication tools to try and minimise the disconnect introduced by working remotely in software teams. Distributed development places emphasis on communication and interaction between all the members in the virtual team. The idea is to reduce the feeling that we are working in different physical spaces and that everyone is off working on some discrete task on their own. This kind of thinking is in-line with the agile philosophy which emphasizes individuals and interactions over processes and tools.

I recently wrote a blog post about this that you can check out - http://technikhil.wordpress.com/2012/02/20/distributed-development/

In the post I detail some tools and techniques that are relevant to your question. I'll list out here -

Reliable and fast internet is an absolute must and its not that easy
to get – at least where I come from. Ask if the person you are
working has a backup power supply and a good internet connection. In
terms of power supply, the need for one depends a lot on the place
the person is working from – if it’s a big city then usually a UPS
that provides an hour of backup should be fine, unless there is
chronic power problem. In smaller towns and such, they might need to
have something more substantial like an inverter or a portable
generator.  Modern laptops with their longer battery life and
portability are a major help since they allow one to ignore smaller
outages and coupled with the appropriate wireless or cellular data
connection can even allow you to simply shift your base of
operations to other places with power and internet.

You need to have an open channel of communication during the time of
overlap while you are working – this can be as simple as an open IRC
(Internet Relay Chat) channel. We use Skype at work and I think the
ability to call or video chat on demand make it far superior to IRC.
Another option to explore is to use something like a Google+ Hangout
while you are working – obviously this will mean the both you need
to have reliable high bandwidth internet. Paid options for software
tools are there as well like Microsoft Lync which may be a more
integrated solution if you have a Microsoft based IT infrastructure
with Microsoft Exchange. There are variety of
communicators and tools out there to tryout – have a look at this
link where Scott Hanselman provides a deep dive into the communications tools
available for remote workers.

Schedule regular meetings and get togethers in the real world. If
this means that someone needs to travel somewhere from time to time,
consider that the cost of doing distributed development. I would
consider this an investment in the team’s productivity and
efficiency. When everyone has met in person and worked together on
issues, you build up mutual trust and respect. In my year of working
at Bang the Table,  I think we have had get togethers at least once
every quarter. Sometimes we just got together and spent a few days
simply working together with no other agenda, sometimes it was a
conference or a training.

Distributed development tends to work well with relatively flat and
    simple organizational structure. The idea is that everyone should
    feel equally invested and responsible for the software project. The
    challenge of course is that this particular setup does not scale
    very well and can be problematic for large organizations. If you are in large hierarchical  organisation try to see you can isolate
the distributed development group a little bit and create a flatter
more informal structure within it.

A good online project management tool is a must to ensure you are
heading in the right direction. We are constantly trying out new
tools for this part of our development. I have found JIRA to be good
for support and task based work while, I am liking Trello for more
open ended new development.

At work we use a Rackspace server as a development server and for
testing. This is a machine on which we stage our commits from our
local machines and have our testing done on. Having a machine to
deploy your code on also forces you to test it in the right
environment and also brings deployment considerations into your
design and development schedule.


答:
I believe it was originally based on the idea of the program being able to learn by modifying its own code to represent the new intelligence. Lisp makes that relatively attractive by representing programs as S-expressions -- i.e., a "program" is just ordinary data that's interpreted as code to be executed, but can also be interpreted as data to be manipulated about equally easily.

That said, that notion of the program modifying itself to represent new knowledge as it learns doesn't seem to be put into real use particularly frequently.

The other obvious point is that "artificial intelligence" isn't particularly well defined. If you look at books from the '50s or '60s about artificial intelligence, most of them talk about problems (e.g., recognizing handwriting or speech) that are now rarely considered as AI at all. The meaning of "AI" seems to be in a state of (nearly) constant flux. When somebody figures out practical way of doing something, it becomes normal programming rather than AI.

As such, AI programming tends to be rather exploratory and the code in a state of flux itself. As such, the answer to the question in the title is that AI tends to favor languages that support a more exploratory style -- dynamic languages with minimal type checking, interpreted or compiled only implicitly, etc.

Title: What makes a language more suited to Artificial Intelligence?

Body: I've always read that LISP is well suited for Artificial Intelligence, but I never found out why. </p>


答:
NO

Multi threading  is one of the hardest things in software to get right. There are way too many corner cases that are really hard to work out when your code is not deterministic. (I am talking about multi threading with locks etc). In addition all of the various JavaScript libraries are built on the assumption that it is not multi threaded.

That being said there are web workers which do give you an actor based framework for doing multi processing type of operations. You can create workers and pass data back and forth via events.

EDIT:
The other reason is that when JavaScript was created it was done so with the assumption it would get used for small tasks, so no concurrency was built in. To Retrofit it now would break a lot of code. By adding web workers it has been possible to have a system were there is concurrency without any shared memory, but by using actors, a model of concurrency that has shown itself to be very robust in a number of other languages like Erlang, Scala, Clojure etc.

(IF you can't tell I really dislike lock based concurrency)

Title: JavaScript Multi Threading

Body:
Well these days JavaScript is main player in all web development technologies , on client side for making user interface better, client side logic, on some web servers as server side logic also

Add to that the fact of people (at least some of them ) started moving in web game development from flash to javascript and HTML5

Isn't it time for it to support multi threading ! are there browsers that allow JavaScript to be multi threaded or is it there in any standards , HTML5 or future versions ?!


问:
Advice/guidelines for managing a distributed development team
What are some strategies, methodologies and best-practices for managing a distributed team?

What can be done to encourage and enforce communication between the various team members?

Is it possible to adapt/implement existing agile development methodologies over a distributed team?

Related but not identical:

https://softwareengineering.stackexchange.com/questions/7942/what-tools-are-available-for-remote-communication-when-working-from-home-or-with

Which (programming) specialities are needed in a good web development team?

答:
The guys at Stack Overflow are a great example of a distributed company and Jeff Atwood offers some great advice - http://www.codinghorror.com/blog/2010/05/on-working-remotely.html

On the question regarding implementing existing agile development methodologies over a distributed team - I consider distributed development as a development approach that attempts to leverage technological advances in internet connectivity and better communication tools to try and minimise the disconnect introduced by working remotely in software teams.

Distributed development places emphasis on communication and interaction between all the members in the virtual team. The idea is to reduce the feeling that we are working in different physical spaces and that everyone is off working on some discrete task on their own. This kind of thinking is in-line with the agile philosophy which emphasizes individuals and interactions over processes and tools.

I have written a blog post regarding this - http://technikhil.wordpress.com/2012/02/20/distributed-development/


答: Intel released River Trail some time ago, which enables parallel programming in Javascript. However, it's a Firefox-only plugin and I haven't heard of a roadmap that brings this technology into W3C, much less ECMA.</p>

Title: JavaScript Multi Threading


问:
Tips/tricks to manage a new team with new code
How do you handle yourself in a new team where you are the senior most developer and most others in the team are junior to you by several years. The task ahead of the team is something nobody else including you has accomplished in their career before.

Management insists on higher productivity of the whole team, and as senior developer you are responsible.

Any tips for coming out trumps in a situation like this? Clearly, the entire team needs time to learn and let's not forget the team's new. However, deadlines are up ahead as well...

答:
Don't let a tight deadline or the novelty of the project interfere with good engineering practice. Set-up a software repository, agree to a coding style, come-up with a test suite, etc. The newness of the task shouldn't be that big of a deal as long as you have quality people under you that are willing to work hard and learn the task ahead of them.

Or to put it another way: you were put in charge because the management believes that your background and experience has given you the tools needed to build quality software. Don't suddenly forget your skills just because this task seems daunting now.


答:
I've read this and it might give you the context from this comes from: http://www.rci.rutgers.edu/~cfs/472_html/Intro/MinskyArticle/MM1.html

Also i must add that even if LISP doesn't feel "useful", it's a nice thing to at least try once or twice.


问:
Why is subclassing too much bad (and hence why should we use prototypes to do away with it)?
I was reading up on design patterns, and I read that the prototype design pattern does away with excessive subclassing.

Why is subclassing bad? What advantage would using a prototype bring about over subclassing?

答:
Inheritance can break encapsulation in some cases, and if that does happen it is bad. Read for more.

In good old days without inheritance, a library would publish an API and application using it makes use of what is publically visible, and library now has it's own way to handle the internal gears which keep changing without breaking the App.

As the needs evolve, library can evolve and can have more customers; or it can provide extended functionality by inheriting from its own class with other flavors. So far so good.

However, fundamental thing is, if an application take's up the class and begins to subclass it, now a subclass is actually a client rather than an internal partner. However, unlike a clear unambiguous way that public API is defined, the subclass is now much deeper inside the library (access to all private variables and so on). It is not bad yet, but a nasty character can bridge an API which is too much inside the APP as well as in the library-

In essence while this may not always be the case but,

It is easy to misuse inheritance to break encapsulation

Allowing subclassing can be wrong if that point.


答: In addition tothe answer by @chrisaycock... Do not underestimate the time you will need to allocate for mentoring/training etc. As the lead, you will need to learn to let go of the detail and trust your team. Your job is to become the enabler, road block remover, and run interferance when management poke there heads in. In a "normal" team, at about 7 or 8, the lead no longer programs, In your situation, this drops to 3 or 4 (Maybe even less), You are not a programming resource for the project.

Title: Tips/tricks to manage a new team with new code

Body:
How do you handle yourself in a new team where you are the senior most developer and most others in the team are junior to you by several years. The task ahead of the team is something nobody else including you has accomplished in their career before.

Management insists on higher productivity of the whole team, and as senior developer you are responsible.

Any tips for coming out trumps in a situation like this? Clearly, the entire team needs time to learn and let's not forget the team's new. However, deadlines are up ahead as well...


问:
Is Information Technology really Engineering?
While travelling I met a mathematician who was sitting near me. In a discussion he said: "...there is nothing like engineering in IT or rather programming". A true engineering is what Architecture is, what Electrical and Mechanical is.

It made me think and I was puzzled. A percent of my brain agreed also because in Indian Army, there is no subject like Computer Engineering in the Engineering Corps. They don't consider programming as engineering. This is what I heard few years back, I don't know what Indian Army thinks now.

What are your views?

答:
If we follow this description, we are 75% engineers, or 75% of us are engineers :)

Unlike other engineering disciplines:

software developers don't need formal education and/or licences

is a relatively young discipline and don't have proven best practices (like construction, for example)

I think this is going to change in the future. Someday we'll be 100% engineers.

Engineer

source: http://en.wikipedia.org/wiki/Engineer

An engineer is a professional practitioner of engineering, concerned with applying scientific knowledge, mathematics and ingenuity to develop solutions for technical problems.

The word engineer is derived from the Latin root ingenium, meaning "cleverness".

Occupation

Names  Engineer

Type  Profession

Activity sectors  Applied sciences

Description

Competencies  Mathematics, scientific
knowledge, management skills

Education required  Engineering
education

Fields of employment  Research and development, industry, business

Related jobs  Scientist, architect, project manager


问:
Python is slowly replacing C in universities. Does this move degrade the quality of CS students?
I believe learning C is one of the most important aspects for any programmer. It's a beautiful combination of a high and low level language. Some universities are moving to stop teaching C in the introductory stages and are using Python instead.

Will this move to Python, from C, degrade the quality of CS students?  If you miss out on some of the aspects of a low level language, are you missing something important from you CS degree?

答:
Many programmers these days would dispute your assertion about the importance of learning C.  Many of the tricky points of C, such as

keeping track of pointers

making sure memory is allocated and
deallocated correctly

are no longer relevant to modern programming languages.  Kudos to the universities who are recognising this and switching to Python.


答:
I totally agree that learning C is very important for programmers. It's the most well designed language (in my opinion).

But, I also think that for beginners, it may be OK to not start off their programming journey with C. Learning Python is GREAT experience, and learning C may not be that great at first. And for newbies, a good first impression of programming may be more important than learning the squiggly syntax of C pointers and pointer arithmetic. Hence the move.

Title: Python is slowly replacing C in universities. Does this move degrade the quality of CS students?

Body:
I believe learning C is one of the most important aspects for any programmer. It's a beautiful combination of a high and low level language. Some universities are moving to stop teaching C in the introductory stages and are using Python instead.

Will this move to Python, from C, degrade the quality of CS students?  If you miss out on some of the aspects of a low level language, are you missing something important from you CS degree?


答:
Pointers and memory and stuff are hard things to explain to new students, what i see in my area is that "harder" languages are being displaced by this "newage" stuff like Python and Java. Those are easier to explain than for instance C++, Perl, even Basic.
What i think that degrades understanding is just throwing OOP and ready made Modules at students. In the end they don't really learn anything Computer-Sciency, just to parse some data into another thing with a scriptable tool.
Starting by the easy stuff just breeds lazy minds, not lazy programmers, wich we need.
But well, TLDR; version:
Python is for lazy teachers, C is for good brave teachers.
edit: I'm not flaming Python, it's great, but it's the kind of thing you have to learn on your own or with a community, but C needs a place in CS courses.


答: CS students should learn C (and some variant of assembler for that matter) to understand how computers roll. If you consider yourself not just a code slave, but a developer, you should understand how the machine and the operating system does things.</p>


问:
Does giving a developer a slower development machine result in faster/more efficient code?
Suppose I give my developers a screaming fast machine.  WPF-based VS2010 loads very quickly.  The developer then creates a WPF or WPF/e application that runs fine on his box, but much slower in the real world.

This question has two parts...

1) If I give a developer a slower machine, does that mean that the resulting code may be faster or more efficient?

2) What can I do to give my developers a fast IDE experience, while giving 'typical' runtime experiences?

Update:

For the record, I'm preparing my even-handed response to management. This isn't my idea, and you folks are helping me correct the misguided requests of my client.  Thanks for giving me more ammunition, and references to where and when to approach this.  I've +1'ed valid use cases such as:

- specific server side programming optimizations

- test labs

- the possibly buying a better server instead of top of the line graphics cards

答:
1) If I give a developer a slower
  machine, does that mean that the
  resulting code may be faster or more
  efficient?

We have been building software for the last 6 decades, and we still get questions like these? Seems more like yet another attempt at cutting corners. No offense, but c'mon, do you think the question is even logical? Think about it in these terms (if you can): you want to build a 4x4 vehicle that can operate under harsh conditions, rain, mud, whatever. Are you going to put your engineers and assembly line under the elements just to make sure the resulting vehicle can operate on them?

I mean, Jesus Christ! There is development and there is testing. Testing is done in a different, harsher environment, or the developer knows how to assemble a test-bed in his own dev environment in a manner suitable for stress testing. If he can't, replace him with a better developer.

2) What can I do to give my developers
  a fast IDE experience, while giving
  'typical' runtime experiences?

You should be asking that to your developers. And if they can't give you an objective and valid answer, you need to replace them with actual developers.

But to entertain the question, give your developers (assuming you have good developers), good tools and good hardware, the best you can afford. Then set up a lowest common baseline environment in which your software must operate. That's where testing should occur. It is much better engineering practice to have a test environment that is distinct from the development environment (preferably one that allows you do to stress testing.)

If your developers are any good, they should have communicated this to you (assuming you have asked them.)


答:
You must learn C but you might be better off with that not being your first language

I am core C programmers for a decade now so i might be biased. I think - Learning C is a MUST. It forces you to closest to hardware programming (even if you are no long doing assembly). For example, it really make you think in terms of how computer uses memory, heap and stack. And of course, it will be hell on earth if you happen to try understanding Assembly before you try to learn C.

Stealing comment from @TikhonJelvis

I think not having any low-level courses would be a shame. –

However, having said that- understanding how machines work is still not everything. How to program is rather elementary thing you should learn before getting deep into how machines will interpret that - so in general, whenever C was being used as a first language. So using higher level language, something which gets you started more quickly and avoid some initial hickups might make you learn some other aspects

Also, after learning to do problem solving with programming, one can reasonably delve in to design and modeling aspect again C isn't really the most important language there. I think there is a great upswing in use of Perl, Python in many machine learning, web/data mining, information retrieval, bioinformatics class of applications (the top current research areas for CS folks over say topics like networking) where you are conceptually very higher up. They are replacing languages like Fortran rather than C.


问:
Unit testing - Database coupled app
What would be the best approach at unit testing a model that integrates into an application that is tightly coupled to database?

The specific scenario here is a shopping cart - I'd like to be able to test the adding removing and retrieving of items from the cart as well as pricing logic etc. This in my mind all requires database access though I have read several times that database access should be avoided.

答:
"Best" is subjective, but you could just use a test db connection.

Use fixtures to load some test data (example products to buy) and then write the test case for the class/function you want to test.

Title: Unit testing - Database coupled app


答:
Dependency injection is one way of handling this. You can set-up a test database to mimic the shopping cart, or you can even write some code that "confirms" the customer's transaction. Then at runtime, your software will pick which component to connect to.

Just don't connect to the production database for anything during testing!

Title: Unit testing - Database coupled app

Body:
What would be the best approach at unit testing a model that integrates into an application that is tightly coupled to database?

The specific scenario here is a shopping cart - I'd like to be able to test the adding removing and retrieving of items from the cart as well as pricing logic etc. This in my mind all requires database access though I have read several times that database access should be avoided.


答:
Two things:

Computer Science is not about programming, but about higher-level concepts, algorithms, mathematical foundations of programming, that kind of thing. Any programming language taught as part of a CS curriculum serves as a vehicle to express and implement those concepts, but learning the language itself in-depth is not really a primary goal. As such, Python (being easy to learn, multi-paradigm, and low on boilerplate code) is an excellent choice for most high-level things. However, low-level programming concepts such as memory allocation, bitwise operations etc., also belong in CS, and Python provides little or no access to these, so an additional language is probably required, and C seems to be the best candidate (although assembly would also qualify, even though it's less comfortable to use).

No programmer should enter the work force with knowledge of only one programming language. I believe that being somewhat fluent in at least two (ideally, two very different languages), and having sniffed about half a dozen more (ideally, covering a wide range of styles and paradigms), would be about right. A programmer with exposure to only one language is going to be limited to the thought patterns of that language and its community, and will lack insights gained from other languages and paradigms. Some concepts, such as for example Functional Programmign concepts like purity, currying, closures, or OOP concepts like interfaces, composition, and encapsulation, will only really 'click' once you've used them in a language designed around them. You just won't get to that point if you only ever learned one language, even if it's versatile and multi-paradigm.


答:
This is an incorrect assumption, followed by an incorrect conclusion.

Teaching programming is about learning how to solve problems with computers. That can happen in a variety of different languages. C is certainly not the best, nor the worst language to start with.

You know what will degrade the quality of CS students? Not preparing them for the workplace by making them use the tools they will actually find there.


答:
I had a similar problem - I had no possibility to guarantee my test DB keeps the values. So in future I get e.g other prices.

I extracted the data I needed into a small sqlite-DB and used this DB for my tests. The Test-DB is now part of the setup of my unit-test.

Title: Unit testing - Database coupled app


问:
Algorithm for scheduling a set of real life tasks that are input by the user
I am trying to write some code to schedule a set of real life tasks that are input by the user. These tasks are stored in an SQLite database. And at the moment, the only parameters I am taking into consideration are the,

```<code>The project to which a task belongs to --> p
The name of the task itself --> t
And the due date for this task --> d
</code>```

The project and due date parameters are optional. But assuming that the user will always input at least the task name and due date for every task.. I was wondering if it is possible to schedule the set of tasks using a scheduler like the Completely Fair Scheduler (CFS) for example. I realize that the CFS was written for scheduling tasks with much finer granularity (nanoseconds) than the set of tasks being proposed for this purpose... But I realized that it might be possible and maybe more efficient if I can modify it to work with tasks that are on the same time scale as our perception of time.

A typical entry in the database would be in the format (p, t, d). 'p' is optional. Here are a few examples:

```<code>(_, 'Call home', 29/2/2012)
(Work, 'Meet boss', 14/3/2012)
(Work, 'Ask for raise', 18/3/2012)
(_, 'Book tickets', 10/3/2012)
(Work, 'Quit', 14/4/2012)
(Personal, 'Get botox injections', 10/3/2012)
(Personal, 'Get breast implants', 10/10/2012)
(_, 'Dad bday', 7/10/2012)
</code>```

Here is a situation to consider. I would like to wake up in the morning. Run this "yet to be coded" algorithm on the set of tasks.. like the ones given above.. and I would like to receive a schedule for the rest of day, that maximizes throughput. At a later stage, I would like to pass arguments to this algorithms that would allow me to control the scheduler to return a set of tasks depending on my current situation. Like if I am at work, I want to be able to pass arguments to the algorithm, to ask it to only return tasks that can be completed at work..

I hope I am able to convey the gist of it. I understand that the due date alone is not sufficient to schedule tasks using the CFS for example... but if there are other parameters that I should consider, please do let me know. And any suggestions for the kind of scheduling algorithm to employ would be helpful.

答: How about just making it simple: earliest deadline first (EDF) scheduling. It's been well-researched and has a simple theory behind it that also lets you compute utilization and feasibility.</p>


答:
```<code>Learning C is one of the most important aspects of any programmer.
</code>```

That is, at best, highly subjective, and I, for one, completely disagree. I think it is a good thing that universities are teaching languages which are more relevant to 2012. I think that learning C is a waste of time.

Body:
Learning C is one of the most important aspects of any programmer.

That is, at best, highly subjective, and I, for one, completely disagree. I think it is a good thing that universities are teaching languages which are more relevant to 2012. I think that learning C is a waste of time.


答:
Programming courses teach you about programming and Python is excellent for that. C is not as great to teach about general programming. Programming is not about understanding computers, it's about creating applications. The tools we use to create applications are constantly evolving and so should CS courses.

For teaching how the computers work, there are different courses. They can show examples of low level computing with ASM or C.

C is also great tool for embedded and low latency programming so if you have courses about those subjects, you can use C.

My answer is: students aren't being degraded. CS is being made more accessible and keeping up with the times.


问:
What are the advantages of using bitwise operations?
Following reading the latest CodeProject newsletter, I came across this article on bitwise operations.  It makes for interesting reading, and I can certainly see the benefit of checking if an integer is even or odd, but testing if the n-th bit is set?  What can possibly be the advantages of this?</p>

答: Basically, you use them due to size and speed considerations. Bitwise operations are incredibly simple and thus usually faster than arithmetic operations. For example to get the green portion of an rgb value, the arithmetic approach is (rgb / 256) % 256. With bitwise operations you would do something as (rgb >> 8) & 0xFF. The latter is significantly faster and once you're used to it, its also easier. Generally bitwise operations come into play a lot when you need to encode/decode data in a compact and fast way.


答: In unit test, you have to define the boundary of what you are testing. Unit testing is different from integration testing. If pricing logic is independent from Cart content, then you test that separately. If this is not the case, and all modules are tightly coupled, build a test environment that mimics the production as much as you could and work with that. I don't believe that short cuts and simulation helps on the long  run.</p>

Title: Unit testing - Database coupled app


答:
If you only want to learn to write algorithms, I guess Python is OK. If you want to learn how the underlying computer works and, among other things, how
Python programs are executed, you need a more low-level language like C.

The question also seems to contain a hint to the idea that Python is a
more recent, up-to-date language and universities tend to update their
curricula to support current technology.

With respect to this, I think this is OK in principle, but universities should
not be too obsessed with using the latest technology for teaching because

Universities should teach students the concepts of computer science so that they can think independently about programming languages and other tools. Universities should not prepare potential slaves who are just able to implement what they are told to using the most fashionable language of the moment.

A language that might be very popular today, might be obsolete ten years from now: university should concentrate on basic stuff, not on teaching a particular technology in depth.

So, Python might be more useful and more concise for certain practical applications, but it does not cover certain basic concepts (like memory
management, efficient implementation of data structures, etc) that are covered
by C. Therefore, I think that C (or a more teaching-oriented language like Pascal) should be part of the curriculum of universities.


答:
The model should not depend on a (concrete) DB. If it only knows an abstract DB (read "interface") which is handed to the model then you can replace the DB with a mock object.

In object-oriented programming, mock objects are simulated objects that mimic the behavior of real objects in controlled ways. A programmer typically creates a mock object to test the behavior of some other object, in much the same way that a car designer uses a crash test dummy to simulate the dynamic behavior of a human in vehicle impacts...

Title: Unit testing - Database coupled app


答:
First things first, start using a source code control system from the very first line of code. Get in the habit of checking code in early and often.

Second, decide on a testing strategy. Of course that should mean unit tests, but you should also consider how to automate acceptance tests.

Third, establish a continuous integration server so that your code is built regularly and tested regularly.

Once you have that, as a team establish some simple coding standards. You want your code to be easily readable by everyone. It doesn't really matter what the standards are. Indent with tabs, indent with spaces, curly-brace on the same line, whatever. It doesn't matter what they are, only that everyone consistently applies them.

Since the team is mostly junior developers, plan on reviewing code often to make sure they aren't adding too much technical debt to your system.

Finally, consider using SCRUM. If you do, hire a coach or go to some training. Since you are all doing something you've never done before, establishing realistic deadlines is simply impossible. With SCRUM, your management will have visibility into what you do on a daily basis so they can see what progress is (or isn't) being made. And, since your deadlines were apparently given to you, SCRUM at least guarantees that if you can't meet the deadline, at least you're delivering completed stories on an incremental basis, which arguably is better than coming to the end with a giant system that doesn't work at all.


答:
opening javascript up for multithreading will create more issues than it solves:

the current architecture is single-threaded event-based (running in the gui thread more often than not) in other words with every block of code you can be assured that nothing in the environment will change from the start to the end except what is changed in the code.

as soon as you allow preemption or parallel execution this feature will be gone, this means that you need to apply locks to data that you want to mutate plus having the whole hard to debug race conditions to avoid

it is possible to have pseudo-parallel execution using timeouts, this means splitting up large or long running functions into atomic chunks and use setTimeout(function(){nextstep(args);},1); so other stuff can run if needed

Title: JavaScript Multi Threading


问:
API method placement guidelines?
Are there any guidelines for placing methods in API when the placement isn't obvious?

Example: I have classes A and B and a method X. The work being carried out can be phrased in two ways:

A does X with B

B does X to A

Given the two ways of phrasing this, it's unclear whether X belongs in A or B. Are there guidelines for placing the method in this scenario?

For a more concrete example, consider think of a user (A), an event (B) and a sign-up action (X). A user can sign up to an event (A does X with B ), or an event can add a user to the sign-up list (B does X to A).

答:
Are there any guidelines for placing methods in API when the placement isn't obvious?

For case like that, I would suggest a "guideline" to redesign API so that placement becomes obvious.

Think of users of your API: if it isn't obvious for you, the designer, it will likely be heavily obscure to API users who haven't the luxury to read your mind.

"Public APIs, like diamonds, are forever. You have one chance to get it right so give it your best..." (Joshua Bloch, How to Design a Good API and Why it Matters)

For your example with user who can sign up to an event and an event that can add a user to the sign-up list, I would give a serious consideration to establishing a third class like SignupAction.

To me, the primary purpose of this "third" class would be to resolve ambiguity so that developers using your API wouldn't need to break their mind where to look for it (in users? in events?). This is the starting point, from which you can proceed wherever requirements drive you - by adding methods, states, additional classes etc.

Title: API method placement guidelines?


答:
To start with, an API shouldn't be grouped by class type.

If you are creating a controller/handler to organize events, you should have an OrganizeEvents controller/handler that would expose the methods like ListAllEvents(), AddPersonToEven()  etc.

Generally you should group API functions by theme and purpose, instead of classes. Then, you can use the classes you need to provide the correct output each time.

Defining relations on your backend shouldn't be too hard, and normally it would involve reflecting a database pattern with a linking table.

Title: API method placement guidelines?

Body:
Are there any guidelines for placing methods in API when the placement isn't obvious?

Example: I have classes A and B and a method X. The work being carried out can be phrased in two ways:

A does X with B

B does X to A

Given the two ways of phrasing this, it's unclear whether X belongs in A or B. Are there guidelines for placing the method in this scenario?

For a more concrete example, consider think of a user (A), an event (B) and a sign-up action (X). A user can sign up to an event (A does X with B ), or an event can add a user to the sign-up list (B does X to A).


答:
Short Quick Answer:

Its depends on what you are doing.

Extended Boring Answer:

A developer can make an app. using either, subclassing or (prototypal) templates. Sometimes one technique works better. Sometimes the other techinque works better.

Choosing with technique works best, also requires, to consider if a "Multiple Inheritance" scenario its present. Even if the programming language only supports single inheritance, templates or prototypes.

Complementary Note:

Some answers relate to the "multiple inheritance". Altought, not the main question, it's related to the subject. There are several, similar, posts about "multiple inheritance v.s. composition". I had a case where I mix both.

Title: Why is subclassing too much bad (and hence why should we use prototypes to do away with it)?

Body:
I was reading up on design patterns, and I read that the prototype design pattern does away with excessive subclassing.

Why is subclassing bad? What advantage would using a prototype bring about over subclassing?


问:
Best practices for managing and maintaining large Rails app?
What are best practices for managing and maintaining large Rails app? </p>

答:
Note these are my recommendation based on experience.

They certainly include personal preferences and opinions gained through experience.

Tests for any code put into production.

Make sure your source control is git over svn and others.

A good issue / request / bug tracking system.  I recommend Pivotal Tracker over others like Trello.

Encourage and support tdd and bdd.  Make it a priority to educate and share this information.

Communication Style.  At all levels, listen first.  Also explain, show examples and give details as to why things are done a certain way.  Be prepared to be challenged, be friendly when it happens and be prepared to change when it makes sense

Team Communication.  Often overlooked.  Make sure that people can speak their mind, can be honest and are respected.  Let them know when top just focus on getting code out and when to pay more attention to the big picture.  Yes ideally both all the time but in reality that pendulum swings based on other factors (time, money, etc.).

Product Manager Communication.  Maintain a tight and free-flowing communication with the project manager.  Make sure they understand the business and drive it forward with technology as appropriate.  Communicate to them why other items are being done and how they will help them.

Management Communication.  You need to talk a lot with the senior management in order to get the resources and buy-in to do the other items on this list.  Items that don't seem to make sense to them need to be patiently shown.

Address technical debt.  Consider "1 week in 6" for code fixes - refactoring, improving, cleaning up code.  It takes a lot of maturity to say "no features this week, it's code cleanup time", but it's incredibly valuable for the business and also a great moral boost for good programmers.

Keep the technology up-to-date.  Build into your calculations the need to constantly upgrade the components.  Consider it "oil changes" - you don't "have" to do them.  But you know the long-term consequences of not doing them.  I know this from killing a car engine with 78,000 miles on it...


答: This question brings to mind a nice section in the book Framework Design Guidelines that describes a concept called Progressive Frameworks. The Idea being that you provide an API in a layered form which allows developers to access the API through a combination of basic interface, through to a more complex interface, depending on the developer's level of experienced and use case requirements. The simpler interface would ask for a handful or parameters/objects/etc, while the next level of interface would expose more parameters, etc... all the way to the highest usable layer which would expose everything. The code itself would effectively exist and callable in layers similar to that which you've described, although you would necessarily ensure there was no duplication by having each of the simpler layers calling into the more advanced layers progressively. This can be a very useful design in terms of providing developers an easy path to learning a single complex API, as opposed to presenting  multiple APIs to suit the same purpose. It is also a concept that can be applied regardless of the programming paradigm used (I.e.: Functional, OO, or whatever).

Title: Would the concept of source code layers be of any use?

Body:
I'm talking about something like layers in photoshop, except they apply directly to the source code.  For example, in pseudo-code... inventing what some project might look like - say a computational fluid dynamics program:

[base layer]

```<code>cfdTime runTime(0);

fieldVariable U;
fieldVariable p;
U.initialize();
p.initialize();

while (runTime.run())
{
    U.solve();
    p.solve()
    runTime++;
}
</code>```

[turbulence layer]

```<code>turbulenceModel turbulence;
scalar nu(readScalar(turbulence.dictionary("nu"));

while (runTime.run())
{
    turbulence.update();
}
</code>```

[base layer + turbulence layer]

```<code>cfdTime runTime(0);

fieldVariable U;
fieldVariable p;
U.initialize();
p.initialize();

turbulenceModel turbulence;
scalar nu(readScalar(turbulence.dictionary("nu"));

while (runTime.run())
{
    U.solve();
    p.solve()
    turbulence.update();
    runTime++;
}
</code>```

You get the idea.  Obviously a lot of things would need to be worked out.

I'm all over object-oriented programming (OOP).  This idea strikes me as an awkward alternative to OOP... and I don't think it's worth much... but I thought I'd toss it to the community... there just might be something useful in it that I'm not quite seeing.

It may be useful from a GUI-only perspective - creating layers in the GUI for complex functional programming... while the underlying code is always the same.  Or it may be useful for code optimisation, perhaps an alternative to #ifdef that developers won't run screaming from.  Or, it may be an entire alternative to OOP.

Your thoughts?


问:
What are my choices for server side sandboxed scripting?
I'm building a public website where users share data and scripts to run over some data. The scripts are run serverside in some sort of sandbox without other interaction this cycle:
my Perl program reads from a database a User made script, adds the data to be processed into the script ( ie: a JSON document) then calls the interpreter, it returns the response( a JSON document or plain text), i save it to the database with my perl script.
The script should be able to have some access to built in functions added to the scripting language by myself, but nothing more.

So i've stumbled upon node.js as a javascript interpreter, and and hour or so ago with Google's V8(does v8 makes sense for this kind of thing?).
CoffeeScript also came to my mind, since it looks nice and it's still Javascript.

I think javascript is widespread enough and more "sandboxeable" since it doesn't have OS calls or anything remotely insecure ( i think ).

by the way, i'm writing the system on Perl and Php for the front end.

To improve the question:
I'm choosing Javascript because i think is secure and simple enough to implement with node.js, but what other alternatives are for achieving this kind of task?
Lua? Python? I just can't find information on how to run a sandboxed interpreter in a proper way.

答:
my first thought was node.js - as you mentiond above it's a javascript-interpreter. And that's exactly the thing you need, if you want to sandbox the scripts in a really secure way.

Another way could be, that you check every command in a script, if it's valid or not. But I don't think that you will get a secure sandbox.

Greetings


问:
Pitfalls in the Grails Framework
What are some of the biggest issues/pitfalls with using the Grails framework?  I'm learning the framework now, and I really like it, but I need to know what major issues I may encounter when using it and how to avoid them.</p>

答:
A current pitfall to using the framework is its current poor integration into the gradle build system.  It currently uses a plugin to accomplish this, but the plugin itself breaks with new versions of grails (as I have recently tried to use and to fix).  They plan to fix this problem in future version by making gradle part of the grails build system (instead of gant), but the lack of an build system that you can easily integrate is a problem.  However, this pitfall will go away in the future.

Another pitfall is the dynamic nature of the language.  You really MUST write tests for everything.  Most of the errors in your code are found at runtime.  It is really a different way of thinking about a program.  Reliance on the compiler to find some of your mistakes do not happen with this framework.  I'm not saying it is bad, it's just different (and a pitfall if you're not familiar with it).

Title: Pitfalls in the Grails Framework


问:
Best practices for team workflow with RoR/Github for designer + coder?
My friend and I have started to try to collaborate on some projects. For background, I come from a PHP/Wordpress/Drupal coding background, but recently I've become more experienced with the RoR framework, while he is more experienced as an HTML/CSS designer, working with PHP and WordPress.

We're both relatively new to RoR I think, and so we're trying to figure out our collaborative workflow, but we have no idea where to start.

For instance, we were trying to figure out how he could do some minor edits to the CSS file without having to do a full RoR deploy on his box. We still haven't figured out a solution, so I think it's best if we start to set some sort of workflow based on best practices.

I was wondering if you guys have any insight or links to articles/case studies regarding this topic?

答:
The designers need to run the stack, collaborate on the same codebase, commit to github, and in some cases do deployments on their own.

Really, it's not too hard, and the simplest solution is usually the best.

I'd avoid uses branches unless it's strictly necessary, keep it simple.

OwnerDisplayName: Josh


问:
Learning system instead of using sed/replace for reviewing test results
For every build of my software I run it through a series of tests that execute a number of commands on a command line and captures the results.

Most of the time the output is a combination of:
  - Static information that is, and should be, the same between every run.
  - Dynamic information that is not easy to predict.

For the purpose of testing this software I desire to only verify that the static information is the same between each test.

Currently I use sed on the captured output of my automated tests to filter out the dynamic information. Any differences between test runs are then identified using the filtered data resulting from applying the sed rules.

Because of the large variety of command output that is processed, maintaining the sed rules has become an onerous job.

Is there a system, that with a large sample of executed test results, can show uncommon changes between two files contained in that large sample of test results?  To clarify, if I were to diff two files, I would only want to see differences for items that changed 5% of the time between all the files involved.  Any other data that changed 95+% of the time would be excluded as differences when comparing two of the files within the large set of test results.

In this example, among the large set of test runs, the first column is almost always consistent:

Run 1:

```
1/*/1    6643   2433   12343   232424    112
2/1/1    2311    455    1342    60233   5231
2/1/2    2355   1223      93    12389   1342
```

Run 2:

```
1/*/1    3121    112   98832      451   1233
2/1/1    6342   2345   84421     3456   8362
2/1/2   72453      5     421    64321   7634
```

Run 3:

```
1/*/1      12     65     312      653    973
2/1/1   12442  54231   46012        6    734
2/1/3     734     28     623       76   1834
```

On top of the three runs above, there are hundreds of samples of this same commands output generated for each incremental build of the software.
When performing a difference between each of the three examples above I would like to have the following results:

No Differences between Run #1 and Run #2. Difference showing that "2/1/2" was changed to "2/1/3" when asked to show the difference between Run #3 and either of the other two runs.

Currently I have a sed script that replaces all the "random looking" numbers above (counts, timestamps, etc) with hashmarks or other constant indicators so that all that is left to compare is the starting column.

What options, if any, exist in this area?  Is there a name for this kind of text comparison?

答:
IMO, this is an anti-pattern in testing.  Instead of post-processing the "dynamic" parts of the output, you should control the execution environment so that the output is unvarying.  If you are reading the system time, or using a random number generator, mock them or wrap them so you can control the test output.

BTW, whatever you do, don't try to change the system time to run your tests.  That may be OK on an embedded system, but creates a mess on Windows and Linux systems.


问:
What ASP.NET MVC can do and Ruby on Rails can't?
ASP.NET MVC and Rails have similar area of use, are built around same architecture, both frameworks are relatively new and open source.

So as a Rails programmer I'd like to know, what ASP.NET MVC can do and Ruby on Rails can't, and visa versa?

答:
They are very similar, and they can all "do the same things" mostly, just some things are easier in one and harder than other.

I used ASP.NET MVC around the original release and it was definitely a Rails clone minus activerecord.  So, Rails almost certainly has a much larger featureset and a much larger plugin/gem ecosystem.


答:
In programming, there is an old saying that "premature optimization is the root of all evil". I think you have managed to successfully create another "root" (or at least first branch) of all evil. From now on, we can say "premature developer deoptimization is the root of all evil."

In short, the answer is that this will only slow up your development time and make further maintenance more difficult. Compile times will take longer, searching for code on disk will go slower, finding answers online will take longer, and MOST importantly, developers will start to use prematurely optimize their code in order to even to be able to test the needed functionality.

That last point is the most critical issue and isn't brought up in many of the other answers. You may get your first version out ok, but then when you want to update the code in the future, you will find that the developers premature optimization took the focus of your code away from good design and pushed it closer to "gotta make this at least work to keep my job" style of code. Adding additional features will become more difficult because the optimizations chosen at the time may be unneeded and lock your code into a path of semi-optimized hacks on top of other semi-optimized hacks.

As an example of this, imagine that your current version's minimum system requirement is a single processor machine of somewhat slow speed. You place developers on this box and they come up with a intricate single threaded solution that relies on a lot of hacks because they wanted to develop the product quickly. Now 5 years later, you have a new version of the product that has a minimum requirement of a dual processor machine. You would like to be able to cleanly separate out parts of the program that you can run in parallel but the decision you made 5 years ago that forced your developers to make a hacky software now prevents you from using the full power of your new minimum requirement.

What you should do is to add a phase at the end of your development cycle where you do acceptance testing on the lower bound boxes. Certainly some of the code will be too slow because of the developer's faster machine but you can isolate that part and optimize it there. The rest of your code stays clean and maintainable.

I see your question as saying, "Can I force my developers to optimize early by giving them poor developer machines yet still get good code?" And the answer is no.

Title: Does giving a developer a slower development machine result in faster/more efficient code?

Body:
Suppose I give my developers a screaming fast machine.  WPF-based VS2010 loads very quickly.  The developer then creates a WPF or WPF/e application that runs fine on his box, but much slower in the real world.

This question has two parts...

1) If I give a developer a slower machine, does that mean that the resulting code may be faster or more efficient?

2) What can I do to give my developers a fast IDE experience, while giving 'typical' runtime experiences?

Update:

For the record, I'm preparing my even-handed response to management. This isn't my idea, and you folks are helping me correct the misguided requests of my client.  Thanks for giving me more ammunition, and references to where and when to approach this.  I've +1'ed valid use cases such as:

- specific server side programming optimizations

- test labs

- the possibly buying a better server instead of top of the line graphics cards


问:
Do experienced Ruby on Rails developers use scaffolding?
In the Ruby on Rails tutorial, I read something that suggested that experienced developers do not use scaffolding since they tend to like to just write the code to connect the MVC on their own.

In a different place I read that it is a good idea to use scaffolding because it helps you stick to convention so others who look at and interact with your code will understand what you are doing.

I am pretty new to Ruby on Rails but not MVC or web application - should I generally try hard to stick to scaffolding conventions and let it guide me?

答:
In short: no.

I'll use generators but I almost never use scaffolds anymore.  You tend to spend a fair bit of time editing the scaffolds and it gets a bit unweilding.

I find a good compromise to use the controller generators can get you up and running pretty quick if you are doing top-down development.


答:
The three class approach is tempting because it mirrors correct database design, mapping one class to one table.  It's very elegant from a high-level conceptual design, but is usually overly complex in an actual implementation, and therefore rarely used in popular APIs.  Usually relationships are described by both of the involved objects, as in facebook's event and user APIs.

For example, look at GUI toolkits with containers full of widgets.  You call container.add(widget), which internally calls something like widget.setContainer(container).  Once the container-widget relationship is established, sometimes you call container.getWidgets(), and sometimes you call widget.getContainer().

Now consider how this would be implemented with a third, ContainerWidget object.  Every time you wanted to create an association, it would look like this:

```<code>containerWidget = new ContainerWidget(container, widget);
container.addContainerWidget(containerWidget);
widget.setContainerWidget(containerWidget);
</code>```

To get a widget's container would look like this:

```<code>widget.getContainerWidget().getContainer();
</code>```

Eventually someone's going to get annoyed with typing that, and just create a widget.getContainer().

Getting all the widgets for a container is even more complicated:

```<code>containerWidgets = container.getContainerWidgets();
for (containerWidget in containerWidgets)
    widgets.append(containerWidget.getWidget());
</code>```

Eventually someone's going to get annoyed with that, and create a container.getWidgets().  Then eventually someone will notice that since we already have those methods anyway, and rather than rebuild the list every time it's called, it would be a lot easier just to store a list of widgets in the container and a pointer to the container in the widget.

See where I'm going with this?  Either you end up with unnecessary complexity, or you eventually simplify down to the two class solution.

The exception to the rule is when you need to describe attributes of the relationship itself.  For example, a spousal relationship between two people doesn't merit a third class.  You just put a Person pointer in the Person class to point to the current spouse.  However, a marriage relationship merits a third class, because marriages have places, start dates, end dates, etc. that describe aspects of the relationship other than the mere fact it exists.

Title: API method placement guidelines?

Body:
The three class approach is tempting because it mirrors correct database design, mapping one class to one table.  It's very elegant from a high-level conceptual design, but is usually overly complex in an actual implementation, and therefore rarely used in popular APIs.  Usually relationships are described by both of the involved objects, as in facebook's event and user APIs.

For example, look at GUI toolkits with containers full of widgets.  You call container.add(widget), which internally calls something like widget.setContainer(container).  Once the container-widget relationship is established, sometimes you call container.getWidgets(), and sometimes you call widget.getContainer().

Now consider how this would be implemented with a third, ContainerWidget object.  Every time you wanted to create an association, it would look like this:

containerWidget = new ContainerWidget(container, widget);
container.addContainerWidget(containerWidget);
widget.setContainerWidget(containerWidget);

To get a widget's container would look like this:

widget.getContainerWidget().getContainer();

Eventually someone's going to get annoyed with typing that, and just create a widget.getContainer().

Getting all the widgets for a container is even more complicated:

containerWidgets = container.getContainerWidgets();
for (containerWidget in containerWidgets)
    widgets.append(containerWidget.getWidget());

Eventually someone's going to get annoyed with that, and create a container.getWidgets().  Then eventually someone will notice that since we already have those methods anyway, and rather than rebuild the list every time it's called, it would be a lot easier just to store a list of widgets in the container and a pointer to the container in the widget.

See where I'm going with this?  Either you end up with unnecessary complexity, or you eventually simplify down to the two class solution.

The exception to the rule is when you need to describe attributes of the relationship itself.  For example, a spousal relationship between two people doesn't merit a third class.  You just put a Person pointer in the Person class to point to the current spouse.  However, a marriage relationship merits a third class, because marriages have places, start dates, end dates, etc. that describe aspects of the relationship other than the mere fact it exists.


问:
Filling a scene with cubes
I am trying to design a solution for simulating gaseous fluids in confined areas, I am using naiver-stokes equations for fluid dynamics but since it only covers incompressible fluids like liquid, i needed to find a way to simulate compression

Recently, I came up with the solution which is, creating a field storing pressure data for each volumetric partition and I thought it would be a good idea to construct this field as a composition of cubes where each cube has homogeneous pressure value within itself.

I tried to inflate a cube from a point and create other cubes from its surfaces recursively minding the collision with surfaces inside that scene, but this algorithm fails because there are lots of detailed cases involving complex holes and notches on the object. Is there a better way to construct this field?

答:
I've seen an implementation of fluids using cellular automata, you could representate them with the minimum size that's meaningful to you. Cubes, spheres, whatever.
The shape of the container shouldn't really matter with this method, just add the rules that generate new cells to "fill" complex shapes.</p>

Title: Filling a scene with cubes


答:
This is not a bad idea - but you want your developers to have a speedy programming environment.

You could possibly implement this by giving your programmers two machines - a fast dev box, and a slower commodity box (possibly virtual) for testing.

Some tweaking of the VS build process could make deployment to the test box the norm, with remote debugging.

There are other ways to consider forcing your coders to develop more efficient code - you can include performance and memory-use goals in your unit tests, for example. Setting budgets for memory use is an excelent goal as well. Also setting page-weight budgets for html code.

OwnerDisplayName: damien


问:
How to organize large Rails application?
I am working on a large(ERP level) Rails project. We have 150 tables and more than 150 models. It takes minutes to find a model. Should we add all models under the models folder or should we put them in different subfolders? Same thing goes for controllers and views.</p>

答:
I don't think it is necessary.

Doing the namespace route you mention (for models under separate directories) is what i would do.

I would also analyze the current performance issue further.
Just having 150 models/tables should not cause more than a fraction of a second to be able to find and use the model!  Is it actually the db query itself that takes a long time (when not cached)?  That can be addressed in many ways (splitting data, aggregating data, adding indexes, changing queries to be more performant, etc.

You may or may not need to do controllers and views under separate directories.

To access things arranged this way you just use ::, e.g. if you put lots of models about bedrooms and attics and basements, etc. under a subdirectory 'buildings' and then want to access it in the controller, use ::, e.g. attics = Buildings::Attic.all


问:
Why are regular expressions so morbidly attractive?
Exhibit 1, Exhibit 2, I guess you won't find it hard to recall other examples.

Thing is: if there is more than one way to solve a problem, the PHP programmer (I usually browse the PHP tag on StackOverflow) will ask for help on the solution involving regular expressions.

Even when it will be less economic, even when the php manual suggests (link) to use str_replace instead of any preg_* or ereg_* function when no fancy substitution rules are required.

Does somebody have a clue about why this happens?

Don't get me wrong, some of my best friends are regular expressions and I don't despise Perl. What I don't get is why there is no looking for alternatives whatsoever, even when the overkill is obvious (regex to switch strings) or the code complexity rises exponentially (regex for getting data from html in PHP)

答:
In my experiencie, regexes are like an ancient art, something obscure, some peolpe resent them because they can't understand the sorcery involved and maybe because nobody will explain them to you. I haven't heard of universities teaching them for something less trivial than matching an e-mail.
Then there's the mystical inner workings of it, since most people don't understand them, they must be slow.
And getting them to work fine in the first try is always a challenge for newcomers.

The same thing can be said about Perl, awk, Linux, and everything that has no shiny buttons or nice colored syntax.
So, it's like added complexity to "trivial tasks", just throw some loops, splits, a switch, some magic and that's it, something that might work.
But well, if you are on the other side of the road, regexes are beautiful cookie cutters that look like signal noise without any nasty loops or more stuff to debug. I like them also for the flexibility they provide. When the pattern to match changes, you just change the regex, not the algorithm, or tool/whatever, and it's nice and working again. And since they are a magical string, you can put it outside the sourcecode if you wish.
And another thing that makes me think of perl, if you write a regex that's 20+ chars long, it feels that you accomplished a lot, at least for me, it's just so neat and compact. I'm a lazy programmer also, i don't like writing a lot of code with nice identation and comments and adding some bugs to the mix.


答:
I like whole grails/groovy concept, although I personally have used plain groovy more than grails I think they are both splendid.

The only downside (in my personal experience) is poor IDE support. I thought (rather optimistically) that as SpringSource had an excellent Eclipse build and were strong supporters of Grails that this would be the way to go. The groovy plugins are difficult to install, code completion is flaky (always a problem with dynamic languages but giving me a choice of 60 methods isn't that helpful), debugging can be tedious as it often requires steping through groovy's internal code, and, in the latest release installing the groovy plugin breaks the Java debugger!

Title: Pitfalls in the Grails Framework

Body: What are some of the biggest issues/pitfalls with using the Grails framework?  I'm learning the framework now, and I really like it, but I need to know what major issues I may encounter when using it and how to avoid them.</p>


问:
What to do with bugs that do not repro?
I have a tester that while testing will have an error occur (ok so far), but then he frequently reports it right away.  We (the developers) then later find that the tester has not tried to reproduce the issue and (when asked) cannot find a way to make it happen again.

Now these are still bugs, I don't want to ignore them.  But without repro steps I am kind of stuck.  Sometimes there is a stack trace (though frequently it is not useful because this is compact framework and there are no line numbers).  But when there is one I can take the stack trace and crack open the code and start guessing, but that does not lead to testable "fixes".

What do you do in scenarios like this?

答:
First of all, you should have a rigorous testing procedure (but I understand you, in my company what you have described happens frequently).

Depending on the severity of the bug, you can invest some time on it or (better) ignore it until repro steps are provided.

Title: What to do with bugs that do not repro?


问:
Are RIA plugins a thing of the past?
In the not-so-distant past our department was touting Silverlight as the de facto standard for corporate intranet applications. A robust framework that allowed us to implement SOA while leveraging our experience in the .NET framework coupled with a rich user interface, all was great, until one day...

Today HTML5 and advanced JavaScript libraries dominate the conversations of web application architects and developers, largely due to the cross device solution these technologies provide in the realm of mobile application development.

We're living in a unique time in history right now where the capabilities of standard web development technologies (HTML5, CSS3, SVG, etc) have virtually caught up with those of proprietary plugins such as Silverlight and Flash.

However, knowing how many years it took the W3C and WHATWG to get the latest version of HTML approved, can we really expect standard web development technologies to be robust and powerful enough to support the incredibly advanced and rich applications and user experiences that tomorrow's user is going to come to expect? Moreover, as processing power continues to increase and devices become more and more capable, will HTML and JavaScript be enough to deliver the goods and fully leverage the power of the next decades super devices and technologies (think holographic projections, social-commercial-industrial ubiquity, etc).

Now don't get me wrong, I LOVE HTML5 and our team is doing some truly amazing things with jquery, knockout, underscore and jasmine. I'm very excited for the recent advances in the standard web development technologies and I fully embrace them. They're very powerful, cross device compatible, and fun!

Is the death of RIA plugins inevitable?

答:
Nothing truly dies. Radio was once a media powerhouse, now I only listen to it in my car. TV after that, and so on and so on.

That said, we're not starting any new Silverlight (or Flash) projects right now. One recent project that we did in Silverlight was recently re-implemented in Knockout JS.

In many cases (though not all) HTML5 is a great skill set to have. Whether you're building a large scale distributed communications app (GMail), or a custom mobile app (check out jQuery Mobile and PhoneGap Build), or even a Windows 8 app with Chakra, or server side with Node.JS, or data access to your JSON document NoSQL store like Mongo or Couch - you can do amazing things with HTML5 and JavaScript in more places than you'd imagine.

I'm not sure the significance this can be overstated. It's been a while since you could use one language in so many places this effectively.

Title: Are RIA plugins a thing of the past?


答:
Silverlight and Flash work on multiple platforms (including phones).

A lot of iPhone apps you wouldn't expect to be "Flash" applications are written in ActionScript, compiled using Adobe's cross compiler, and run on phone devices.

They're evolving the same way standards are.  If you read Adobe's latest press release about Flash, they consider it to be mostly for HD video and games for the foreseeable future; they know everyone has changed platforms for other application types.

Flash is, today, being used for developing applications for the browser, desktop and phone just like all of the open standards you listed.  It might go away, but it's being resilient.

Title: Are RIA plugins a thing of the past?

Body:
In the not-so-distant past our department was touting Silverlight as the de facto standard for corporate intranet applications. A robust framework that allowed us to implement SOA while leveraging our experience in the .NET framework coupled with a rich user interface, all was great, until one day...

Today HTML5 and advanced JavaScript libraries dominate the conversations of web application architects and developers, largely due to the cross device solution these technologies provide in the realm of mobile application development.

We're living in a unique time in history right now where the capabilities of standard web development technologies (HTML5, CSS3, SVG, etc) have virtually caught up with those of proprietary plugins such as Silverlight and Flash.

However, knowing how many years it took the W3C and WHATWG to get the latest version of HTML approved, can we really expect standard web development technologies to be robust and powerful enough to support the incredibly advanced and rich applications and user experiences that tomorrow's user is going to come to expect? Moreover, as processing power continues to increase and devices become more and more capable, will HTML and JavaScript be enough to deliver the goods and fully leverage the power of the next decades super devices and technologies (think holographic projections, social-commercial-industrial ubiquity, etc).

Now don't get me wrong, I LOVE HTML5 and our team is doing some truly amazing things with jquery, knockout, underscore and jasmine. I'm very excited for the recent advances in the standard web development technologies and I fully embrace them. They're very powerful, cross device compatible, and fun!

Is the death of RIA plugins inevitable?