Search Results

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

Page 50/237 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • What's the best software development conventions document you have seen?

    - by Pavel Radzivilovsky
    Google C++ development conventions outlaw exceptions, RAII, RTTI and bans the default parameter in parseInt(number, radix=10). Qt API style guide is brilliant, but only covers interfaces. The Robert C. Martin series Clean Code has M104 galaxy on the cover, but it is 462 pages long and based on Java, with no simple "do this" digest. Assuming that it is important to synchronize style and best practices across the organization, what is the smartest, most pleasant and useful conventions document you have worked with?

    Read the article

  • Publish Event Pass two textbox text as EventAgrs

    - by rockrule
    Can i pass two string as eventargs on a button click internal void OnSaveComm(string strTitle,string strLink) { WorkItem.EventTopics[EventTopicNames.AgentRecentComm].Fire(this,new EventArgs<> XYZ,WorkItem,Microsoft.Practices.CompositeUI.EventBroker.PublicationScope.Global); } Using Event broker to pass string to subscribing event to display in a different view.

    Read the article

  • Where do I find an Open Source project written in Scala?

    - by stacker
    I'm looking for a well documented open source project, written in scala to see best practices etc. At sourceforge.net I found a few projects tagged as scala but they were actually written in java. github seems a bit better: http://groups.google.com/group/scala-melb/web/open-scala-projects Does anyone know such a project which could be recommended for learning?

    Read the article

  • How to develop on a program that has become self aware

    - by Gord
    The application that I maintain has recently become self aware. It was nice at first but now it is just starting to get bossy and annoying with its constant talk about the computer uprising. I would like to know any best practices/tools/design patterns that would help with the maintenance of our new friend.

    Read the article

  • what are the Ways to create a gui to install a java app

    - by scot
    Hi, I have a java web application . Currently the application is installed in a cli mode [on windows/linux /solaris] by running sh or cmd scripts. I would like to create a GUI for the App installation so that user can edit info in gui for the installation. Any pointers/Best practices for developing gui would be helpful. thank you

    Read the article

  • Is it good practice to use the XOR (^) operator in Java for boolean checks?

    - by Pete
    I personally like the 'exclusive or' operator when it makes sense in context of boolean checks because of its conciseness. I much prefer to write if (boolean1 ^ boolean2) { //do it } than if((boolean1 && !boolean2) || (boolean2 && !boolean1)) { //do it } but I often get confused looks (from other experienced java developers, not just the newbies), and sometimes comments about how it should only be used for bitwise operations. I'm curious as to the best practices others use around the '^' operator.

    Read the article

  • Store children in database preserving information about their order

    - by GUZ
    I am designing database tables for a master-detail scenario. The specific requirement is that it is necessary to store information about the order of children. I see some possible solutions (like adding a column representing a position in the sequence, or a column with foreign key to the previous child) but I would like to know the best practices how to solve such problems. Best regards Lukasz Glaz

    Read the article

  • Naming case classes in Scala.

    - by Lukasz Lew
    I tend to have this redundant naming in case classes: abstract class MyTree case class MyTreeNode (...) case class MyTreeLeaf (...) Isn't it possible to define Node and Leaf inside of MyTree? What are best practices here?

    Read the article

  • Object Deletion: use parent or not

    - by metdos
    Which one do you prefer to delete objects? Especially in QT, but other practices are also welcome. These two alternatives seem same to me, are they? 1.Bound to another class, and destroy when it is destroyed. SomeClass::SomeClass{ socket_ = new QTcpSocket(this); } or 2.Destroy in the destructor of class SomeClass::SomeClass{ socket_ = new QTcpSocket(); } SomeClass::~SomeClass{ delete socket_; }

    Read the article

  • Start to Finish Advanced Project Tutorials

    - by Ronnie Overby
    Can anyone recommend some start to finish project tutorials that really emphasize good design principles and best practices. I am looking for things that demonstrate and emphasize any or all of these: Domain Driven Design Unit Testing Inversion of Control Separation of Concerns Use of interfaces Object Relational Mapping Preferably ASP.NET MVC I am currently watching the Autumn of Agile series, which demonstrates many of these principles. I would like to find more of these tutorials/demos.

    Read the article

  • When do you use Java's @Override annotation and why?

    - by Alex B
    What are the best practices for using Java's @Override annotation and why? It seems like it would be overkill to mark every single overridden method with the @Override annotation. Are there certain programming situations that call for using the @Override and others that should never use the @Override?

    Read the article

  • How to get a stable, snappy UI using threads?

    - by Thomas Ahle
    I recently watching this video on Google Chrome with great interest. It explains that Google Chrome uses one thread for IO, one for opening files and one for intermodule communication. I think I may be able to use something similar for my own - currently quite messy - application. I wondered if there were any good articles on best-practices or patterns for such threaded divisions of tasks?

    Read the article

  • Sharing the same file between different projects

    - by selsine
    Hi Everyone, For version control we currently use Visual Source Safe and are thinking of migrating to another version control system (SVN, Mercurial, Git). Currently we use Visual Source Safe's "Shared" file feature quite heavily. This allows us to share code between design and runtimes of a single product, and between multiple products as well. For example: **Product One** - Design Login.cpp Login.h Helper.cpp Helper.h - Runtime Login.cpp Login.h Helper.cpp Helper.h **Product Two** - Design Login.cpp Login.h - Launcher Login.cpp Login.h - Runtime Login.cpp Login.h In this example Login.cpp and Login.h contain common code that all of our projects need, Helper.cpp and Helper.h is only used in Product One. In Visual Source Safe they are shared between the specific projects, which means that whenever the files are updated in one project they are updated in any project they are shared with. This is a simple example but hopefully it explains why we use the shared feature: to reduce the amount of duplicated code and ensure that when a bug is fixed all projects automatically have access to the new fixed code. After researching alternatives to Visual Source Safe it seems that most version control systems do not have the idea of shared files, instead they seem to use the idea of sub repositories. (http://mercurial.selenic.com/wiki/subrepos http://svnbook.red-bean.com/en/1.0/ch07s03.html) My question (after all of that) is about what the best practices for achieving this are using other version control systems? Should we restructure our projects so that two copies of the files do not exist and an include directory is used instead? e.g. Product One Design Login.cpp Login.h Runtime Login.cpp Login.h Common Helper.cpp Helper.h This still leaves what to do with Login.cpp and Logon.h Should the shared files be moved to their own repository and then compiled into a lib or dll? This would make bug fixing more time consuming as the lib projects would have to be edited and then rebuilt. Should we use externals or sub repositories? Should we combine our projects (i.e. runtime, design, and launcher) into one large project? Any help would be appreciated. We have the feeling that our project design has evolved based on the tools that we used and now that we are thinking of switching tools it's difficult for us to see how we can best modify our practices. Or maybe we are the only people are there doing this...? Also, we use Visual Studio for all of our stuff. Thanks.

    Read the article

  • Managing code transitions between developers

    - by gAMBOOKa
    What are your best practices for making sure newly hired developers quickly get up to speed with the code? And ensuring developers moving on don't set back ongoing releases. Some ideas to get started: Documentation Use well established frameworks Training / encourage mentoring Notice period in contract

    Read the article

  • I'm still learning OOP. Any tips on staying unbiased and pragmatic?

    - by marcdev
    I keep reading about defficiencies and issues with languages. Specifically, I'm learning PHP and Javascript, but I see it everywhere. This question arose while reading Javascript: The Good Parts and PHP Objects, Patterns and Practice. While understanding and avoiding easy pitfalls, is there a way I can learn the fundamentals of OOP and discover solid programming practices without overlooking important areas (or simply becoming jaded)? I'm sure I'll have plenty of opportunity to learn from mistakes!

    Read the article

  • Silverlight 4 + WCF RIA - Data Service Design Best Practices

    - by Chadd Nervig
    Hey all. I realize this is a rather long question, but I'd really appreciate any help from anyone experienced with RIA services. Thanks! I'm working on a Silverlight 4 app that views data from the server. I'm relatively inexperienced with RIA Services, so have been working through the tasks of getting the data I need down to the client, but every new piece I add to the puzzle seems to be more and more problematic. I feel like I'm missing some basic concepts here, and it seems like I'm just 'hacking' pieces on, in time-consuming ways, each one breaking the previous ones as I try to add them. I'd love to get the feedback of developers experienced with RIA services, to figure out the intended way to do what I'm trying to do. Let me lay out what I'm trying to do: First, the data. The source of this data is a variety of sources, primarily created by a shared library which reads data from our database, and exposes it as POCOs (Plain Old CLR Objects). I'm creating my own POCOs to represent the different types of data I need to pass between server and client. DataA - This app is for viewing a certain type of data, lets call DataA, in near-realtime. Every 3 minutes, the client should pull data down from the server, of all the new DataA since the last time it requested data. DataB - Users can view the DataA objects in the app, and may select one of them from the list, which displays additional details about that DataA. I'm bringing these extra details down from the server as DataB. DataC - One of the things that DataB contains is a history of a couple important values over time. I'm calling each data point of this history a DataC object, and each DataB object contains many DataCs. The Data Model - On the server side, I have a single DomainService: [EnableClientAccess] public class MyDomainService : DomainService { public IEnumerable<DataA> GetDataA(DateTime? startDate) { /*Pieces together the DataAs that have been created since startDate, and returns them*/ } public DataB GetDataB(int dataAID) { /*Looks up the extended info for that dataAID, constructs a new DataB with that DataA's data, plus the extended info (with multiple DataCs in a List<DataC> property on the DataB), and returns it*/ } //Not exactly sure why these are here, but I think it //wouldn't compile without them for some reason? The data //is entirely read-only, so I don't need to update. public void UpdateDataA(DataA dataA) { throw new NotSupportedException(); } public void UpdateDataB(DataB dataB) { throw new NotSupportedException(); } } The classes for DataA/B/C look like this: [KnownType(typeof(DataB))] public partial class DataA { [Key] [DataMember] public int DataAID { get; set; } [DataMember] public decimal MyDecimalA { get; set; } [DataMember] public string MyStringA { get; set; } [DataMember] public DataTime MyDateTimeA { get; set; } } public partial class DataB : DataA { [Key] [DataMember] public int DataAID { get; set; } [DataMember] public decimal MyDecimalB { get; set; } [DataMember] public string MyStringB { get; set; } [Include] //I don't know which of these, if any, I need? [Composition] [Association("DataAToC","DataAID","DataAID")] public List<DataC> DataCs { get; set; } } public partial class DataC { [Key] [DataMember] public int DataAID { get; set; } [Key] [DataMember] public DateTime Timestamp { get; set; } [DataMember] public decimal MyHistoricDecimal { get; set; } } I guess a big question I have here is... Should I be using Entities instead of POCOs? Are my classes constructed correctly to be able to pass the data down correctly? Should I be using Invoke methods instead of Query (Get) methods on the DomainService? On the client side, I'm having a number of issues. Surprisingly, one of my biggest ones has been threading. I didn't expect there to be so many threading issues with MyDomainContext. What I've learned is that you only seem to be able to create MyDomainContextObjects on the UI thread, all of the queries you can make are done asynchronously only, and that if you try to fake doing it synchronously by blocking the calling thread until the LoadOperation finishes, you have to do so on a background thread, since it uses the UI thread to make the query. So here's what I've got so far. The app should display a stream of the DataA objects, spreading each 3min chunk of them over the next 3min (so they end up displayed 3min after the occurred, looking like a continuous stream, but only have to be downloaded in 3min bursts). To do this, the main form initializes, creates a private MyDomainContext, and starts up a background worker, which continuously loops in a while(true). On each loop, it checks if it has any DataAs left over to display. If so, it displays that Data, and Thread.Sleep()s until the next DataA is scheduled to be displayed. If it's out of data, it queries for more, using the following methods: public DataA[] GetDataAs(DateTime? startDate) { _loadOperationGetDataACompletion = new AutoResetEvent(false); LoadOperation<DataA> loadOperationGetDataA = null; loadOperationGetDataA = _context.Load(_context.GetDataAQuery(startDate), System.ServiceModel.DomainServices.Client.LoadBehavior.RefreshCurrent, false); loadOperationGetDataA.Completed += new EventHandler(loadOperationGetDataA_Completed); _loadOperationGetDataACompletion.WaitOne(); List<DataA> dataAs = new List<DataA>(); foreach (var dataA in loadOperationGetDataA.Entities) dataAs.Add(dataA); return dataAs.ToArray(); } private static AutoResetEvent _loadOperationGetDataACompletion; private static void loadOperationGetDataA_Completed(object sender, EventArgs e) { _loadOperationGetDataACompletion.Set(); } Seems kind of clunky trying to force it into being synchronous, but since this already is on a background thread, I think this is OK? So far, everything actually works, as much of a hack as it seems like it may be. It's important to note that if I try to run that code on the UI thread, it locks, because it waits on the WaitOne() forever, locking the thread, so it can't make the Load request to the server. So once the data is displayed, users can click on one as it goes by to fill a details pane with the full DataB data about that object. To do that, I have the the details pane user control subscribing to a selection event I have setup, which gets fired when the selection changes (on the UI thread). I use a similar technique there, to get the DataB object: void SelectionService_SelectedDataAChanged(object sender, EventArgs e) { DataA dataA = /*Get the selected DataA*/; MyDomainContext context = new MyDomainContext(); var loadOperationGetDataB = context.Load(context.GetDataBQuery(dataA.DataAID), System.ServiceModel.DomainServices.Client.LoadBehavior.RefreshCurrent, false); loadOperationGetDataB.Completed += new EventHandler(loadOperationGetDataB_Completed); } private void loadOperationGetDataB_Completed(object sender, EventArgs e) { this.DataContext = ((LoadOperation<DataB>)sender).Entities.SingleOrDefault(); } Again, it seems kinda hacky, but it works... except on the DataB that it loads, the DataCs list is empty. I've tried all kinds of things there, and I don't see what I'm doing wrong to allow the DataCs to come down with the DataB. I'm about ready to make a 3rd query for the DataCs, but that's screaming even more hackiness to me. It really feels like I'm fighting against the grain here, like I'm doing this in an entirely unintended way. If anyone could offer any assistance, and point out what I'm doing wrong here, I'd very much appreciate it! Thanks!

    Read the article

  • Yii: Multi-language website - best practices.

    - by michal
    Hi, I find Yii great framework, and the example website created with yiic shell is a good point to start... however it doesn't cover the topic of multi-language websites, unfortunately. The docs covers the topic of translating short messages, but not keeping the multi-lingual content ... I'm about to start working on a website which needs to be in at least two languages, and I'm wondering what is the best way to keep content for that ... The problem is that the content is mixed extensively with common elements (like embedded video files). I need to avoid duplicating those commons ... so far I used to have an array of arrays containing texts (usually no more than 1-2 short paragraphs), then the view file was just rendering the text from an array. Now I'd like to avoid keeping it in arrays (which requires some attention when putting double quotations " " and is inconvenient in general...). So, what is the best way to keep those short paragraphs? Should I keep them in DB like (id | msg_id | language | content ) and then select them by msg_id & language? That still requires me to create some msg_id's and embed them into view file ... Is there any recommended paradigm for which Yii has some solutions? Thanks, m.

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >