четверг, 12 марта 2015 г.

Backbone.js. Remove model from collection without a reference to collection.

What if you have a model in a collection and in a model view you need to remove model from the collection. You can call destroy method on a model, but this will trigger the ajax delete method to the server.
Well, you can trigger the destroy event on a model like this: this.model.trigger('destroy',this.model).
And you model will be deleted from the collection and no DELETE method will be sent to the server.

понедельник, 2 марта 2015 г.

Joel Spolsky. And on Diverse and Occasionally Related Matters That Will Prove of Interest to Software Developers, Designers, and Managers, and to Those Who, Whether by Good Fortune or Ill Luck, Work with Them in Some Capacity

The world of IT is not about programming. This is all about making money. To stay profitable companies should understand the clients needs. Who can understand the clients needs better: programmers or program managers? How the development process should be organized? How the company's internal process should be organized? Should managers be on the way of programmers and throw away all the written code and start from the ground?

Some answers to this questions can be found in the book Joel on Software: And on Diverse and Occasionally Related Matters That Will Prove of Interest to Software Developers, Designers, and Managers, and to Those Who, Whether by Good Fortune or Ill Luck, Work with Them in Some Capacity . Although is a bit outdated it is still actual. It is actual because it contains the description of people errors and relations between people in it-business.

Personally, here are some minds I like:
The desire for rewriting  program from scratch is in inverse proportion to the experience of the programmers.

The most important ability of program manager - is to learn how to make programmers do what he needs by convincing them as this was their own idea.