Search Results

Search found 8692 results on 348 pages for 'patterns and practices'.

Page 10/348 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Need some clarification with Patterns (DAO x Gateway)

    - by Marcos Placona
    Me and my colleagues got into this discussion early this morning, and our opinions started to clash a bit, so I decided to get some impartial advice here. One of my colleagues reckons that the DAO should return an object (populated bean). I think it's completely fine when you're returning a recordset with only one line, but think it's overkill if you have to return 10 lines, and create 10 separate objects. I on the other see that the difference between DAO and Gateway pattern is that the gateway pattern will allow you to return a recordset to your business class, which will therefore deal with the recordset data and do whatever it needs to do. My questions here are: Which assumptions are correct? What should the return type be for a DAO (i.e. getContact() - for one record) Should getContacts() (for multiple records) even be on the DAO, if so, what's it's returntype? We seem to be having some sort of confusion about DAO and Gateway Patterns. Should they be used together? Thanks in advance

    Read the article

  • MVC & Design patterns in C++

    - by theunanonim
    I have an assignment (university level) in C++ The application that was done so far: - MVC agenda - the views are command-line - Agenda contains a list of contacts - a contact may be a friend or an acquiantance - Agenda may contain also a Company that is a contact and may contain other contacts (sorry the code is already too big as I tried to keep the MVC aspect of the application, and I can't post it here or request your time to study it..) To do: - implement factory method pattern - implement observer pattern - implement strategy pattern - implement visitor pattern The evaluation will depend on the number of added patterns and places they have been added. Am I an idiot or this is the stupidies possible assignement ? If not, please help me with some basic tips.. which one where ? Best Regards. P.S. Sorry for my English

    Read the article

  • Looking for design patterns to isolate framework layers from each other

    - by T Reddy
    Hi, I'm wondering if anyone has any experience in "isolating" framework objects from each other (Spring, Hibernate, Struts). I'm beginning to see design "problems" where an object from one framework gets used in another object from a different framework. My fear is we're creating tightly coupled objects. For instance, I have an application where we have a DynaActionForm with several attributes...one of which is a POJO generated by the Hibernate Tools. This POJO gets used everywhere...the JSP populates data to it, the Struts Action sends it down to a Service Layer, the DAO will persist it...ack! Now, imagine that someone decides to do a little refactoring on that POJO...so that means the JSP, Action, Service, DAO all needs to be updated...which is kind of painful...There has got to be a better way?! There's a book called Core J2EE Patterns: Best Practices and Design Strategies (2nd Edition)...is this worth a look? I don't believe it touches on any specific frameworks, but it looks like it might give some insight on how to properly layer the application... Thanks!

    Read the article

  • Comparing Design Patterns

    - by Lijo
    Hi, I am learning design patterns using C#. One of the challenges that I am facing is that they look similar. Could you please help me to distinguish them – basically when to use them? - Why not the other? Bridge and Strategy State and Strategy Façade and Strategy Composite and Strategy I understand that there are lots of resources available in the web. However they does not treat this special question. [Note: I am looking for implementation examples and rationale behind the selection; not mere explanations] It would be great if you are taking examples from any of the following 1) E-Commerce 2) Payroll system 3) Banking 4) Retailing Thanks for your understanding.. Thanks Lijo

    Read the article

  • Are there any "best practices" on cross-device development?

    - by vstrien
    Developing for smartphones in the way the industry is currently doing is relatively new. Of course, there has been enterprise-level mobile development for several decades. The platforms have changed, however. Think of: from stylus-input to touch-input (different screen res, different control layout etc.) new ways of handling multi-tasking on mobile platforms (e.g. WP7's "tombstoning") The way these platforms work aren't totally new (iPhone has been around for quite awhile now for example), but at the moment when developing a functionally equal application for both desktop and smartphone it comes down to developing two applications from ground up. Especially with the birth of Windows Phone with the .NET-platform on board and using Silverlight as UI-language, it's becoming appealing to promote the re-use of (parts of the UI). Still, it's fairly obvious that the needs of an application on a smartphone (or tablet) are very different compared to the needs of a desktop application. An (almost) one-on-one conversion will therefore be impossible. My question: are there "best practices", pitfalls etc. documented about developing "cross-device" applications (for example, developing an app for both the desktop and the smartphone/tablet)? I've been looking at weblogs, scientific papers and more for a week or so, but what I've found so far is only about "migratory interfaces".

    Read the article

  • Best Practices to Accelerate Oracle VM Server Deployments

    - by Honglin Su
    IOUG (Independent Oracle User Group) Virtualization SIG is hosting the webcast on the best practices of Oracle VM server virtualization. July 11, 2012 - Best Practices to Accelerate Oracle VM Server on SPARC Deployments. Register here. To learn the best practices on Oracle VM Server for x86,  watch the session replay here. For more white paper about best practices, visit Oracle VM OTN page here.

    Read the article

  • Progress Bar design patterns?

    - by shoosh
    The application I'm writing performs a length algorithm which usually takes a few minutes to finish. During this time I'd like to show the user a progress bar which indicates how much of the algorithm is done as precisely as possible. The algorithm is divided into several steps, each with its own typical timing. For instance- initialization (500 milli-sec) reading inputs (5 sec) step 1 (30 sec) step 2 (3 minutes) writing outputs (7 sec) shutting down (10 milli-sec) Each step can report its progress quite easily by setting the range its working on, say [0 to 150] and then reporting the value it completed in its main loop. What I currently have set up is a scheme of nested progress monitors which form a sort of implicit tree of progress reporting. All progress monitors inherit from an interface IProgressMonitor: class IProgressMonitor { public: void setRange(int from, int to) = 0; void setValue(int v) = 0; }; The root of the tree is the ProgressMonitor which is connected to the actual GUI interface: class GUIBarProgressMonitor : public IProgressMonitor { GUIBarProgressMonitor(ProgressBarWidget *); }; Any other node in the tree are monitors which take control of a piece of the parent progress: class SubProgressMonitor : public IProgressMonitor { SubProgressMonitor(IProgressMonitor *parent, int parentFrom, int parentLength) ... }; A SubProgressMonitor takes control of the range [parentFrom, parentFrom+parentLength] of its parent. With this scheme I am able to statically divide the top level progress according to the expected relative portion of each step in the global timing. Each step can then be further subdivided into pieces etc' The main disadvantage of this is that the division is static and it gets painful to make changes according to variables which are discovered at run time. So the question: are there any known design patterns for progress monitoring which solve this issue?

    Read the article

  • Existing web-site CSS replacement (re-skinning) best-practices without changing the HTML

    - by Enigmativity
    I can see a number of other good answers to questions relating to CSS best-practices on stack overflow: How to Manage CSS Explosion CSS Conventions / Code Layout Models Are there any CSS standards that I should follow while writing my first stylesheet? What is the best method for tidying CSS? Best Practices - CSS Stylesheet Formatting But I think I have a different problem. I'm trying to "re-skin" an existing site that has been nicely built using div's and ul's, etc, and it has a good existing CSS file, but when I start making changes to the CSS I quickly find that I break the layout. My feeling is that it is very hard to get a feel for how all the CSS will work together and indeed what CSS is affecting parent and sibling elements in the HTML. So, my question is "what are the best-practices around re-skinning an existing web-site by replacing the CSS only and not modifying the existing HTML?" I can't change the classes, ids, node hierarchy, etc. An example of the particular site that I am trying to re-skin is http://demo.nopcommerce.com/. The existing CSS can be as complicated/detailed as this extract from the main CSS file: .header-selectors-wrapper { text-align: right; float: right; width: 500px; } .header-currencyselector { float: right; } .header-languageselector { float: left; } .header-taxDisplayTypeSelector { float: right; } .header-links-wrapper { float: right; text-align: right; width: 570px; } .header-links { border: solid 1px #9a9a9a; padding: 5px 5px 5px 5px; margin-bottom: 5px; display: inline-table; } .order-summary-content .cart .cart-item-row td, .wishlist-content .cart .cart-item-row td { border-bottom: 1px solid #c5c5c5; vertical-align: middle; line-height: 30px; } .order-summary-content .cart .cart-item-row td.product, .wishlist-content .cart .cart-item-row td.product { text-align: left; padding: 0px 10px 0px 10px; } .order-summary-content .cart .cart-item-row td.product a, .wishlist-content .cart .cart-item-row td.product a { font-weight: bold; } Any help would be appreciated.

    Read the article

  • Best Practices for working with files via c#

    - by user177883
    Application I work on generates several hundreds of files in a 15 minutes period of times. and the back end of the application takes these files and process them (updates database with those values). One problem is database locks. What are the best practices on working with several thousands of files to avoid locking and efficiently processing these files? Would it be more efficient to create a single file and process it? or process single file at a time? What are so common best practices?

    Read the article

  • Inspiring a co-worker to adopt better coding practices?

    - by Aaronaught
    In the Handling my antiquated coworker question, various people discussed strategies for dealing with coworkers who are unwilling to integrate their workflow with the team's. I'd like, if possible, to learn some strategies for "teaching" a coworker who is merely ignorant of modern techniques and tools, and possibly a little apathetic. I've started working with a programmer who until recently has been working in relative isolation, in a different part of the company. He has extensive domain knowledge and most importantly he has demonstrated good problem-solving skills, something which many candidates seem to lack. However, the actual (C#) code I've seen is a throwback to the VB6 days. Procedural structure, Hungarian notation, global variables (abuse of static), no interfaces, no tests, non-use of Generics, throwing System.Exception... you get the idea. This programmer is a fair bit older than I am and, by first impressions at least, doesn't actively seek positive change. I'm not going to say resistant to change, because I think that is largely an issue of how the topic gets broached, and I want to be prepared. Programmers tend to be stubborn people, and going in with guns blazing and instituting rip-it-to-shreds code reviews and strictly-enforced policies is very likely not going to produce the end result that I want. If this were a new hire, a junior programmer, I wouldn't think twice about taking a "mentor" stance, but I'm extremely wary of treating an experienced employee as a clueless newbie (which he's not - he just hasn't kept pace with certain advancements in the field). How might I go about raising this developer's code quality standard the Dale Carnegie way, through gentle persuasion and non-material incentives? What would be the best strategy for effecting subtle, gradual changes, without creating an adversarial situation? Have other people - especially lead developers - been in this type of situation before? Which strategies were successful at stimulating interest and creating a positive group dynamic? Which strategies weren't successful and would be better to avoid? Clarifications: I really feel that several people are answering based on personal feelings without actually reading all of the details of the question. Please note the following, which should have been implied but I am now making explicit: This coworker is only my "senior" by virtue of age. I never said that his title, sphere of influence, or years at the organization exceed mine, and in fact, none of those things are true. He's a LOB programmer who's been absorbed into the main development shop. That's it. I am not a new hire, junior programmer, or other naïve idiot with grand plans to transform the company overnight. I am basically in charge of the software process, but as many who've worked as "leads" will know, responsibilities don't always correlate precisely with the org chart. I'm not asking people how to get my way, come hell or high water. I could do that if I wanted to, with the net result being that this person would become resentful and/or quit. Please try to understand that I am looking for a social, cooperative method of driving change. The mention of "...global variables... no tests... throwing System.Exception" was intended to demonstrate that the problems are not just superficial or aesthetic. Practices that may work for relatively small CRUD apps do not necessarily work for large enterprise apps, and in fact, none of the code so far has actually passed the integration tests. Please, try to take the question at face value, accept that I actually know what I'm talking about, and either answer the question that I actually asked or move on. P.S. My sincerest gratitude to those who -did- offer constructive advice rather than arguing with the premise. I'm going to leave this open for a while longer as I'm hoping to hear more in the way of real-world experiences.

    Read the article

  • Programming habits, patterns, and standards that have developed out of appeal to tradition/by mistake? [closed]

    - by user828584
    Being self-taught, the vast majority of what I know about programming has come from reading other peoples' code on websites like this. I'm starting to wonder if I've developed bad or otherwise pointless habits from other people, or even just made invalid assumptions. For example, in javascript, void 0 is used in a lot of places, and until I saw this, I just assumed it was necessary and that 0 had some significance. Also, the http header, referer is misspelled but hasn't been changed because it would break a lot of applications. Also mentioned in Code Complete 2: The architecture should describe the motivations for all major decisions. Be wary of “we’ve always done it that way” justifications. One story goes that Beth wanted to cook a pot roast according to an award-winning pot roast recipe handed down in her husband’s family. Her husband, Abdul, said that his mother had taught him to sprinkle it with salt and pepper, cut both ends off, put it in the pan, cover it, and cook it. Beth asked, “Why do you cut both ends off?” Abdul said, “I don’t know. I’ve always done it that way. Let me ask my mother.” He called her, and she said, “I don’t know. I’ve always done it that way. Let me ask your grandmother.” She called his grandmother, who said, “I don’t know why you do it that way. I did it that way because it was too big to fit in my pan.” What are some other examples of this?

    Read the article

  • In PHP, what are the different design patterns to implement OO controllers as opposed to procedural controllers?

    - by Ryan
    For example, it's very straightforward to have an index.php controller be a procedural script like so: <?php //include classes and functions //get some data from the database //and/or process a form submission //render HTML using your template system ?> Then I can just navigate to http://mysite.com/index.php and the above procedural script is essentially acting as a simple controller. Here the controller mechanism is a basic procedural script. How then do you make controllers classes instead of procedural scripts? Must the controller class always be tied to the routing mechanism?

    Read the article

  • Patterns for a tree of persistent data with multiple storage options?

    - by Robin Winslow
    I have a real-world problem which I'll try to abstract into an illustrative example. So imagine I have data objects in a tree, where parent objects can access children, and children can access parents: // Interfaces interface IParent<TChild> { List<TChild> Children; } interface IChild<TParent> { TParent Parent; } // Classes class Top : IParent<Middle> {} class Middle : IParent<Bottom>, IChild<Top> {} class Bottom : IChild<Middle> {} // Usage var top = new Top(); var middles = top.Children; // List<Middle> foreach (var middle in middles) { var bottoms = middle.Children; // List<Bottom> foreach (var bottom in bottoms) { var middle = bottom.Parent; // Access the parent var top = middle.Parent; // Access the grandparent } } All three data objects have properties that are persisted in two data stores (e.g. a database and a web service), and they need to reflect and synchronise with the stores. Some objects only request from the web service, some only write to it. Data Mapper My favourite pattern for data access is Data Mapper, because it completely separates the data objects themselves from the communication with the data store: class TopMapper { public Top FetchById(int id) { var top = new Top(DataStore.TopDataById(id)); top.Children = MiddleMapper.FetchForTop(Top); return Top; } } class MiddleMapper { public Middle FetchById(int id) { var middle = new Middle(DataStore.MiddleDataById(id)); middle.Parent = TopMapper.FetchForMiddle(middle); middle.Children = BottomMapper.FetchForMiddle(bottom); return middle; } } This way I can have one mapper per data store, and build the object from the mapper I want, and then save it back using the mapper I want. There is a circular reference here, but I guess that's not a problem because most languages can just store memory references to the objects, so there won't actually be infinite data. The problem with this is that every time I want to construct a new Top, Middle or Bottom, it needs to build the entire object tree within that object's Parent or Children property, with all the data store requests and memory usage that that entails. And in real life my tree is much bigger than the one represented here, so that's a problem. Requests in the object In this the objects request their Parents and Children themselves: class Middle { private List<Bottom> _children = null; // cache public List<Bottom> Children { get { _children = _children ?? BottomMapper.FetchForMiddle(this); return _children; } set { BottomMapper.UpdateForMiddle(this, value); _children = value; } } } I think this is an example of the repository pattern. Is that correct? This solution seems neat - the data only gets requested from the data store when you need it, and thereafter it's stored in the object if you want to request it again, avoiding a further request. However, I have two different data sources. There's a database, but there's also a web service, and I need to be able to create an object from the web service and save it back to the database and then request it again from the database and update the web service. This also makes me uneasy because the data objects themselves are no longer ignorant of the data source. We've introduced a new dependency, not to mention a circular dependency, making it harder to test. And the objects now mask their communication with the database. Other solutions Are there any other solutions which could take care of the multiple stores problem but also mean that I don't need to build / request all the data every time?

    Read the article

  • What are the best patterns/designs for stateful API development?

    - by Svante
    I am about to implement a API for my TCP/IP server written in Java. Right now I have a temporary method that takes a String, executes a command based on the String and returns a String basically like the following. public void communicate(BufferedReader in, PrintWriter out) { while(true) { out.println(handleCommand(in.readLine())); } } private String handleCommand(String command) { if (command.equals("command1") { // do stuff return "Command 1 executed"; } else if (command.equals("command2") { // do some other stuff return "Command 2 executed"; } } I really want to do something more extensible, smarter and stateful, so I could handle more complex and stateful commands and without the method/class getting bloated. How would you start? Suggestions, ideas, or links for further reading are very welcome.

    Read the article

  • Is MVC a Design Pattern or Architectural pattern

    - by JCasso
    According to Sun and Msdn it is a design pattern. According to Wikipedia it is an architectural pattern In comparison to design patterns, architectural patterns are larger in scale. (Wikipedia - Architectural pattern) Or it is an architectural pattern that also has a design pattern ? Which one is true ?

    Read the article

  • Patterns for dynamic CMS components (event driven?)

    - by CitrusTree
    Sorry my title is not great, this is my first real punt at moving 100% to OO as I've been procedural for more years than I can remember. I'm finding it hard to understand if what I'm trying to do is possible. Depending on people's thoughts on the 2 following points, I'll go down that route. The CMS I'm putting together is quote small, however focuses very much on different types of content. I could easily use Drupal which I'm very comfortable with, but I want to give myself a really good reasons to move myself into design patterns / OO-PHP 1) I have created a base 'content' class which I wish to be able to extend to handle different types of content. The base class, for example, handles HTML content, and extensions might handle XML or PDF output instead. On the other hand, at some point I may wish to extend the base class for a given project completely. I.e. if class 'content-v2' extended class 'content' for that site, any calls to that class should actually call 'content-v2' instead. Is that possible? If the code instantiates an object of type 'content' - I actually want it to instantiate one of type 'content-v2'... I can see how to do it using inheritance, but that appears to involve referring to the class explicitly, I can't see how to link the class I want it to use instead dynamically. 2) Secondly, the way I'm building this at the moment is horrible, I'm not happy with it. It feels very linear indeed - i.e. get session details get content build navigation theme page publish. To do this all the objects are called 1-by-1 which is all very static. I'd like it to be more dynamic so that I can add to it at a later date (very closely related to first question). Is there a way that instead of my orchestrator class calling all the other classes 1-by-1, then building the whole thing up at the end, that instead each of the other classes can 'listen' for specific events, then at the applicable point jump in and do their but? That way the orchestrator class would not need to know what other classes were required, and call them 1-by-1. Sorry if I've got this all twisted in my head. I'm trying to build this so it's really flexible.

    Read the article

  • People not respecting good practices at workplace

    - by VexXtreme
    Hi There are some major issues in my company regarding practices, procedures and methodologies. First of all, we're a small firm and there are only 3-4 developers, one of which is our boss who isn't really a programmer, he just chimes in now and then and tries to do code some simple things. The biggest problems are: Major cowboy coding and lack of methodologies. I've tried explaining to everyone the benefits of TDD and unit testing, but I only got weird looks as if I'm talking nonsense. Even the boss gave me the reaction along the lines of "why do we need that? it's just unnecessary overhead and a waste of time". Nobody uses design patterns. I have to tell people not to write business logic in code behind, I have to remind them not to hardcode concrete implementations and dependencies into classes and cetera. I often feel like a nazi because of this and people think I'm enforcing unnecessary policies and use of design patterns. The biggest problem of all is that people don't even respect common sense security policies. I've noticed that college students who work on tech support use our continuous integration and source control server as a dump to store their music, videos, series they download from torrents and so on. You can imagine the horror when I realized that most of the partition reserved for source control backups was used by entire seasons of TV series and movies. Our development server isn't even connected to an UPS and surge protection. It's just plugged straight into the wall outlet. I asked the boss to buy surge protection, but he said it's unnecessary. All in all, I like working here because the atmosphere is very relaxed, money is good and we're all like a family (so don't advise me to quit), but I simply don't know how to explain to people that they need to stick to some standards and good practices in IT industry and that they can't behave so irresponsibly. Thanks for the advice

    Read the article

  • Game logic dynamically extendable architecture implementation patterns

    - by Vlad
    When coding games there are a lot of cases when you need to inject your logic into existing class dynamically and without making unnecessary dependencies. For an example I have a Rabbit which can be affected by freeze ability so it can't jump. It could be implemented like this: class Rabbit { public bool CanJump { get; set; } void Jump() { if (!CanJump) return; ... } } But If I have more than one ability that can prevent it from jumping? I can't just set one property because some circumstances can be activated simultanously. Another solution? class Rabbit { public bool Frozen { get; set; } public bool InWater { get; set; } bool CanJump { get { return !Frozen && !InWater; } } } Bad. The Rabbit class can't know all the circumstances it can run into. Who knows what else will game designer want to add: may be an ability that changes gravity on an area? May be make a stack of bool values for CanJump property? No, because abilities can be deactivated not in that order in which they were activated. I need a way to seperate ability logic that prevent the Rabbit from jumping from the Rabbit itself. One possible solution for this is making special checking event: class Rabbit { class CheckJumpEventArgs : EventArgs { public bool Veto { get; set; } } public event EventHandler<CheckJumpEvent> OnCheckJump; void Jump() { var args = new CheckJumpEventArgs(); if (OnCheckJump != null) OnCheckJump(this, args); if (!args.Veto) return; ... } } But it's a lot of code! A real Rabbit class would have a lot of properties like this (health and speed attributes, etc). I'm thinking of borrowing something from MVVM pattern where you have all the properties and methods of an object implemented in a way where they can be easily extended from outside. Then I want to use it like this: class FreezeAbility { void ActivateAbility() { _rabbit.CanJump.Push(ReturnFalse); } void DeactivateAbility() { _rabbit.CanJump.Remove(ReturnFalse); } // should be implemented as instance member // so it can be "unsubscribed" bool ReturnFalse(bool previousValue) { return false; } } Is this approach good? What also should I consider? What are other suitable options and patterns? Any ready to use solutions? UPDATE The question is not about how to add different behaviors to an object dynamically but how its (or its behavior) implementation can be extended with external logic. I don't need to add a different behavior but I need a way to modify an exitsing one and I also need a possibiliity to undo changes.

    Read the article

  • What's the difference between these design pattern books? [on hold]

    - by BSara
    I'm currently looking for a good reference/guide for design patterns and in my search I've found the following three books highly recommended: Design Patterns: Elements of Reusable Object-Oriented Software Pattern Hatching: Design Patterns Applied Design Patterns Explained: A New Perspective on Object-Oriented Design I can't decide which book (if any) to purchase. So, my question is this: What are the fundamental differences between these books?

    Read the article

  • GWT Best Practices - MVP

    - by GWTNewbie
    A question for all the GWT gurus out there. I'm a newbie in GWT and am trying to understand the best practices of coding a GWT application. I have gone through "Large scale application development and MVP" based on Ray Ryan's talk at Google I/O 2009 and it has given me a good starting point. I downloaded the sample source code as well for the Contacts application based on the best practices listed. The application I'm trying to develop using GWT is a bit bigger (in terms of the modules involved) when compared to the sample "Contacts" application & so I want to split it up into multiple functions. I have been reading that having a single Entry point in a GWT application is a good idea, and I don't want to dump all the code in one single AppController class & one single RpcService, what would be the best approach in this situation? How would I go about dispatching the control to multiple controllers? Is there a way to achieve this using some classes in the GWT framework?

    Read the article

  • What are some Java memory management best practices?

    - by Ascalonian
    I am taking over some applications from a previous developer. When I run the applications through Eclipse, I see the memory usage and the heap size increase a lot. Upon further investigation, I see that they were creating an object over-and-over in a loop as well as other things. I started to go through and do some clean up. But the more I went through, the more questions I had like "will this actually do anything?" For example, instead of declaring a variable outside the loop mentioned above and just setting its value in the loop... they created the object in the loop. What I mean is: for(int i=0; i < arrayOfStuff.size(); i++) { String something = (String) arrayOfStuff.get(i); ... } versus String something = null; for(int i=0; i < arrayOfStuff.size(); i++) { something = (String) arrayOfStuff.get(i); } Am I incorrect to say that the bottom loop is better? Perhaps I am wrong. Also, what about after the second loop above, I set "something" back to null? Would that clear out some memory? In either case, what are some good memory management best practices I could follow that will help keep my memory usage low in my applications? Update: I appreciate everyones feedback so far. However, I was not really asking about the above loops (although by your advice I did go back to the first loop). I am trying to get some best practices that I can keep an eye out for. Something on the lines of "when you are done using a Collection, clear it out". I just really need to make sure not as much memory is being taken up by these applications.

    Read the article

  • Industry-style practices for increasing productivity in a small scientific environment

    - by drachenfels
    Hi, I work in a small, independent scientific lab in a university in the United States, and it has come to my notice that, compared with a lot of practices that are ostensibly followed in the industry, like daily checkout into a version control system, use of a single IDE/editor for all languages (like emacs), etc, we follow rather shoddy programming practices. So, I was thinking of getting together all my programs, scripts, etc, and building a streamlined environment to increase productivity. I'd like suggestions from people on Stack Overflow for the same. Here is my primary plan.: I use MATLAB, C and Python scripts, and I'd like to edit, compile them from a single editor, and ensure correct version control. (questions/things for which I'd like suggestions are in italics) 1] Install Cygwin, and get it to work well with Windows so I can use git or a similar version control system (is there a DVCS which can work directly from the windows CLI, so I can skip the Cygwin step?). 2] Set up emacs to work with C, Python, and MATLAB files, so I can edit and compile all three at once from a single editor (say, emacs) (I'm not very familiar with the emacs menu, but is there a way to set the path to the compiler for certain languages? I know I can Google this, but emacs documentation has proved very hard for me to read so far, so I'd appreciate it if someone told me in simple language) 3] Start checking in code at the end of each day or half-day so as to maintain a proper path of progress of my code (two questions), can you checkout files directly from emacs? is there a way to checkout LabVIEW files into a DVCS like git? Lastly, I'd like to apologize for the rather vague nature of the question, and hope I shall learn to ask better questions over time. I'd appreciate it if people gave their suggestions, though, and point to any resources which may help me learn.

    Read the article

  • REST API error return good practices

    - by Remus Rusanu
    I'm looking for guidance on good practices when it comes to return errors from a REST API. I'm working on a new API so I can take it any direction right now. My content type is XML at the moment, but I plan to support JSON in future. I am now adding some error cases, like for instance a client attempts to add a new resource but has exceeded his storage quota. I am already handling certain error cases with HTTP status codes (401 for authentication, 403 for authorization and 404 for plain bad request URIs). I looked over the blessed HTTP error codes but none of the 400-417 range seems right to report application specific errors. So at first I was tempted to return my application error with 200 OK and a specific XML payload (ie. Pay us more and you'll get the storage you need!) but I stopped to think about it and it seems to soapy (/shrug in horror). Besides it feels like I'm splitting the error responses into distinct cases, as some are http status code driven and other are content driven. So what is the SO crowd recommendation? Good practices (please explain why!) and also, from a client pov, what kind of error handling in the REST API makes life easier for the client code?

    Read the article

  • WiX tricks and best practices

    - by Si
    We've been using WiX 3 for a while now, and despite the usual gripes about ease of use, it's going reasonably well. What I'm looking for is useful advice regarding: Setting up a WiX project (layout, references, file patterns) Integrating WiX into solutions, and build/release processes Configuring installers for new installations and upgrades Also interested in any good WiX hacks you'd like to share, thanks!

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >