Search Results

Search found 5915 results on 237 pages for 'practices'.

Page 54/237 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • Best practices to deal with "slightly different" branches of source code

    - by jedi_coder
    This question is rather agnostic than related to a certain version control program. Assume there is a source code tree under certain distributed version control. Let's call it A. At some point somebody else clones it and gets its own copy. Let's call it B. I'll call A and B branches, even if some version control tools have different definitions for branches (some might call A and B repositories). Let's assume that branch A is the "main" branch. In the context of distributed version control this only means that branch A is modified much more actively and the owner of branch B periodically syncs (pulls) new updates from branch A. Let's consider that a certain source file in branch B contains a class (again, it's also language agnostic). The owner of branch B considers that some class methods are more appropriate and groups them together by moving them inside the class body. Functionally nothing has changed - this is a very trivial refactoring of the code. But the change gets reflected in diffs. Now, assuming that this change from branch B will never get merged into branch A, the owner of branch B will always get this difference when pulling from branch A and merging into his own workspace. Even if there's only one such trivial change, the owner of branch B needs to resolve conflicts every time when pulling from branch A. As long as branches A and B are modified independently, more and more conflicts like this appear. What is the workaround for this situation? Which workflow should the owner of branch B follow to minimize the effort for periodically syncing with branch A?

    Read the article

  • WinSock best accept() practices

    - by Meta
    Imagine you have a server which can handle only one client at a time. The server uses WSAAsyncSelect to be notified of new connections. In this case, what is the best way of handling FD_ACCEPT messages: A Accept the connection attempt right away but queue the client until its turn? B Do not accept the next connection attempt until we are done serving the currently connected client? What do you guys think is the most efficient?

    Read the article

  • PHP Flush: How Often and Best Practises

    - by Cory Dee
    I just finished reading this post: http://developer.yahoo.com/performance/rules.html#flush and have already implemented a flush after the top portion of my page loads (head, css, top banner/search/nav). Is there any performance hit in flushing? Is there such a thing as doing it too often? What are the best practices? If I am going to hit an external API for data, would it make sense to flush before hand so that the user isn't waiting on that data to come back, and can at least get some data before hand? Thanks to everyone in advance.

    Read the article

  • *Client* scalability for large numbers of remote web service calls

    - by Yuriy
    Hey Guys, I was wondering if you could share best practices and common mistakes when it comes to making large numbers of time-sensitive web service calls. In my case, I have a SOAP and an XML-RPC based web service to which I'm constantly making calls. I predict that this will soon become an issue as the number of calls per second will grow. On a higher level, I was thinking of batching those calls and submitting those to the web services every 100 ms. Could you share what else works? On a lower level side of the things, I use Apache Xml-Rpc client and standard javax.xml.soap.* packages for my client implementations. Are you aware of any client scalability related tricks/tips/warnings with these packages? Thanks in advance Yuriy

    Read the article

  • When to log exception?

    - by Rune
    try { // Code } catch (Exception ex) { Logger.Log("Message", ex); throw; } In the case of a library, should I even log the exception? Should I just throw it and allow the application to log it? My concern is that if I log the exception in the library, there will be many duplicates (because the library layer will log it, the application layer will log it, and anything in between), but if I don't log it in the library, it'll be hard to track down bugs. Is there a best practices for this?

    Read the article

  • Developing ASP.NET MVC UI Extensions - best approach

    - by user252160
    What are the best practices in developing rich UI extensions for ASP.NET MVC (I mean asynchronous / partial loading, slick effects, skinning etc) ? I saw that Telerik has an MVC suite of extensions, but haven't tried them yet, so I cannot comment on them. My biggest concern as of the moment is how to structure the code of my extensions so that C#, ASP markup, and JQuery remain separate from each other, yet encapsulated in a way that the extension must be easy to distribute and reuse. I know that the user control approach had many flaws, yet it sort of allowed application developers to just reference a control, set some parameters and get it going in a few minutes. I'd like to achieve the same kind of portability/reusability as I still keep the code easy to extend and build upon. Now, some ideas that come to mind as topics for discussion are: template helpers vs. extension method helpers or a possible integration efficient use of jQuery - naming conventions - - asynchronous action loading - etc you can add whatever comes to your mind

    Read the article

  • Suggestions for Single-Page Web Application Design?

    - by DaveDev
    My view is that unless you need to change the basic structure of the user interface, you should not have to reload the page at all for any user interactions. I'd like to approach my next ASP.NET MVC project with this in mind. Can anyone suggest any principles, patterns or practices* I should consider? Excellent book, btw. Still trying to wrap my head around some of the concepts though. I thought a question like this would help link the theory to a practical design. Thanks

    Read the article

  • Is url.openStream harmful?

    - by Casebash
    I was using the java.net.URL.openStream() method to retrieve content from the server. I recently ran into an issue where the HTTP Response code indicated an error, but instead of throwing an exception, the stream still was read anyway. This caused the error to appear much later in the execution and proved to be a red herring. As far as I can see, when you have opened a stream using this method, there is no way to check the HTTP response code. The only way I could find to handle this properly was to use code such as: HttpURLConnection conn=(HttpURLConnection) url.openConnection() if(conn.getResponseCode()!=HttpStatus.SC_OK) //Raise Exception; InputStream in=conn.getInputStream() So do you agree? Is it possible to use openStream safely, or is it a method that should be avoided at all costs. It is worth noting that Sun uses the method in their tutorial code for reading directly from a URL. Then again, the code throws Exception so it isn't exactly a bastion of good coding practices.

    Read the article

  • Passing sql results to views hard-codes views to database column names

    - by Galen
    I just realized that i may not be following best practices in regards to the MVC pattern. My issue is that my views "know" information about my database Here's my situation in psuedo code... My controller invokes a method from my model and passes it directly to the view view.records = tableGateway.getRecords() view.display() in my view each records as record print record.name print record.address ... In my view i have record.name and record.address, info that's hard-coded to my database. Is this bad? What other ways around it are there other than iterating over everything in the controller and basically rewriting the records collection. And that just seems silly. Thanks

    Read the article

  • One Update Panel vs. Multiple Update Panels

    - by mattruma
    I have an ASP.NET web page that displays a variety of fields that need to be updated best on certain conditions, button clicks and so on. We've implemented AJAX, using the ASP.NET Update Panel to avoid visible postbacks. Originally there was only one area that needed this ability ... that soon expanded to other fields. Now my web page has multiple UpdatePanels. I am wondering if it would be best to just wrap the entire form in a single UpdatePanel, or keep the individual UpdatePanels. What are the best practices for using the ASP.NET UpdatePanel?

    Read the article

  • JUnit Best Practice: Different Fixtures for each @Test

    - by Juri Glass
    Hi I understand that there are @Before and @BeforeClass, which are used to define fixtures for the @Test's. But what should I use if I need different fixtures for each @Test? Should I define the fixture in the @Test? Should I create a test class for each @Test? I am asking for the best practices here, since both solutions aren't clean in my opinion. With the first solution, I would test the initialization code. And with the second solution I would break the "one test class for each class" pattern.

    Read the article

  • OpenLayers, Layers: Tiled vs. single tile

    - by Chau
    Each time we add a new layer to our OpenLayers based website (data provided primarily by a GeoServer server), we discuss whether to use a single-tile or a tiled approach. Some of the parameters we evaluate are the following: Using the tiled approach we get: Slow but continuous buildup of the viewport Lots of small images Client side caching possibilities Blocking of the loading pipeline (6 requests at a time) Jerky feeling when navigating during load Using the single-tile approach we get: Smoother feeling when navigating during load Time delay before layer is loaded One large image for each layer No caching of the single tile We have a lot of data editing in the layers, thus a tile-cache might not be that efficient. Are there any best-practices when it comes to tiling? Progressing towards infinitely fast hardware and unlimited data connections, the discussion becomes irrelevant, but what configuration do you percieve as the most user-pleasing?

    Read the article

  • Perl When is using AUTOLOAD OK?

    - by Robert S. Barnes
    In "Perl Best Practices" the very first line in the section on AUTOLOAD is: Don't use AUTOLOAD However all the cases he describes are dealing with OO or Modules. I have a stand alone script in which some command line switches control which versions of particular functions get defined. Now I know I could just take the conditionals and the evals and stick them naked at the top of my file before everything else, but I find it convenient and cleaner to put them in AUTOLOAD at the end of the file. Is this bad practice / style? If you think so why, and is there a another way to do it?

    Read the article

  • Shorten Zend Framework Route Definitions

    - by Sebastian Hoitz
    Hi! How can I shorten the definition of my custom routes in Zend Framework? I currently have this as definition: $route = new Zend_Controller_Router_Route( ":module/:id", array( "controller" => "index", "action" => "index" ), array("id" => "\d+") ); self::$frontController->getRouter()->addRoute('shortcutOne', $route); $route = new Zend_Controller_Router_Route( ":module/:controller/:id", array("action" => "index"), array("id" => "\d+") ); self::$frontController->getRouter()->addRoute('shortcutTwo', $route); $route = new Zend_Controller_Router_Route( ":module/:controller/:action/:id", null, array("id" => "\d+") ); self::$frontController->getRouter()->addRoute('shortcutThree', $route); Is there a way to better combine these rules? And what are your best practices in where to place these? I currently have them in my bootstrap class right after the Front Controller initialization.

    Read the article

  • Modern way to handle and validate POST-data in MVC 2

    - by zerkms
    There are a lot of articles devoted to working with data in MVC, and nothing about MVC 2. So my question is: what is the proper way to handle POST-query and validate it. Assume we have 2 actions. Both of them operates over the same entity, but each action has its own separated set of object properties that should be bound in automatic manner. For example: Action "A" should bind only "Name" property of object, taken from POST-request Action "B" should bind only "Date" property of object, taken from POST-request As far as I understand - we cannot use Bind attribute in this case. So - what are the best practices in MVC2 to handle POST-data and probably validate it. UPD: After Actions performed - additional logic will be applied to the objects so they become valid and ready to store in persistent layer. For action "A" - it will be setting up Date to current date.

    Read the article

  • When is performance gain significant enough to implement that optimization?

    - by Zwei steinen
    Hi, following the text book, I do measure performance whenever I try optimizing my code. Sometimes, however, the performance gain is rather small and I can't decisively decide whether I should implement that optimization. For example, when a fix shortens an average response time of 100ms to 90ms under some conditions, should I implement that fix? What if it shortens 200ms to 190ms? How many condition should I try before I can conclude that it will be beneficial overall? I guess it's not possible to give a straight forward answer to this, as it depends on too many things, but is there a good rule of thumb that I should follow? Are there any guideline/best-practices?

    Read the article

  • Improving the speed of php

    - by cast01
    I'm currently working on a website in PHP, and I'm wondering what the best practices/methods are to reduce the time requests take. I've build the site in a modular way, so a page would consist of a number of modules, and each of these would need to request information. For example, I have a cart module, that (if a cart is set) will fetch the cart with the id (stored in a session variable) from the database and return its contents. I have another module that lists categories and this needs to fetch the categories from the database. My system is built with models, and each model might also make a request, for example a category model will make a request to get products in that category.

    Read the article

  • PostgreSQL 8.3 data types: xml vs varchar

    - by Sejanus
    There's xml data type in Postgres, I never used it before so I'd like to hear opinions. Downsides and upsides vs using regular varchar (or Text) column to store xml. The text I'm going to store is xml, well-formed, UTF-8. No need to search by it (I've read searching by xml is slow). This XML actually is data prepared for PDF generation with Apache FOP. XML can be generated dynamically from data found elsewhere (other Postgres tables), it's stored as is only so that I won't need to generate it twice. Kinda backup#2 for already generated PDF documents. Anything else to know? Good practices, performance, maintenance, etc?

    Read the article

  • MS SQL: Mitigating schema changes/upgrades

    - by bradhe
    I haven't spent a ton of time researching this yet, mostly looking for best practices on upgrading/changing DB schemas. We're actively developing a new product and as such we often have additions or changes to our DB schema. We also have many copies of the DB -- one for the test environment, one for the prod environment, dev environments, you name it. We don't really want to have to blow away test data every time we want to make a change to the DB. s Are there good ways of automating this or handling this? None of us have really ever had to deal with this so...

    Read the article

  • What guides or standards do you use for CVS in your team ?

    - by PaulHurleyuk
    I'm starting to do a small amount of development within my company. I'm intending to use Git for CVS, and I'm interested to see what guidelines or standards people are using around CVS in their groups, similar to coding standards are often written within the group for the group. I'm assuming there will be things like; Commit often (at least every day/week/meeting etc) Release builds are always made from the master branch Prior to release, a new branch will be created for Testing and tagged as such. only bug fixes from this point onwards. The final release of this will be tagged as such and the bug fixes merged back into the trunk Each developer will have a public repo New features should get their own branch Obviously a lot of this will depend on what cvs you're using and how you've structured it. Similar Questions; http://stackoverflow.com/questions/273695/git-branch-naming-best-practices http://stackoverflow.com/questions/2006265/is-there-an-standard-naming-convention-for-git-tags

    Read the article

  • What are some best practises and "rules of thumb" for creating database indexes?

    - by Ash
    I have an app, which cycles through a huge number of records in a database table and performs a number of SQL and .Net operations on records within that database (currently I am using Castle.ActiveRecord on PostgreSQL). I added some basic btree indexes on a couple of the feilds, and as you would expect, the peformance of the SQL operations increased substantially. Wanting to make the most of dbms performance I want to make some better educated choices about what I should index on all my projects. I understand that there is a detrement to performance when doing inserts (as the database needs to update the index, as well as the data), but what suggestions and best practices should I consider with creating database indexes? How do I best select the feilds/combination of fields for a set of database indexes (rules of thumb)? Also, how do I best select which index to use as a clustered index? And when it comes to the access method, under what conditions should I use a btree over a hash or a gist or a gin (what are they anyway?).

    Read the article

  • Python - Things I shouldn't be doing?

    - by cornjuliox
    I've got a few questions about best practices in Python. Not too long ago I would do something like this with my code: ... junk_block = "".join(open("foo.txt","rb").read().split()) ... I don't do this anymore because I can see that it makes code harder to read, but would the code run slower if I split the statements up like so: f_obj = open("foo.txt", "rb") f_data = f_obj.read() f_data_list = f_data.split() junk_block = "".join(f_data_list) I also noticed that there's nothing keeping you from doing an 'import' within a function block, is there any reason why I should do that?

    Read the article

  • Implementing Multilingual web site using ASP.Net

    - by Abdel Olakara
    Hi all, I am implementing an multilingual web site using ASP.Net. The languages are English,French and Arabic. Please note that Arabic's direction is RTL. What is the best way to implement the multilingual support. I am planning to use the .Net localization feature but the website texts are stored in DB. For the controls ( form controls) , I can used resx file. Do I need to build two different pages ( one for LTR and another for RTL )? Or can I have one ASPx file for all the three languages? I would like to hear some best practices in implementing these kind of web applications. Thanks in advance, Abdel Olakara

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >