Search Results

Search found 1274 results on 51 pages for 'pros'.

Page 34/51 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • Interfaces on an abstract class

    - by insta
    My coworker and I have different opinions on the relationship between base classes and interfaces. I'm of the belief that a class should not implement an interface unless that class can be used when an implementation of the interface is required. In other words, I like to see code like this: interface IFooWorker { void Work(); } abstract class BaseWorker { ... base class behaviors ... public abstract void Work() { } protected string CleanData(string data) { ... } } class DbWorker : BaseWorker, IFooWorker { public void Work() { Repository.AddCleanData(base.CleanData(UI.GetDirtyData())); } } The DbWorker is what gets the IFooWorker interface, because it is an instantiatable implementation of the interface. It completely fulfills the contract. My coworker prefers the nearly identical: interface IFooWorker { void Work(); } abstract class BaseWorker : IFooWorker { ... base class behaviors ... public abstract void Work() { } protected string CleanData(string data) { ... } } class DbWorker : BaseWorker { public void Work() { Repository.AddCleanData(base.CleanData(UI.GetDirtyData())); } } Where the base class gets the interface, and by virtue of this all inheritors of the base class are of that interface as well. This bugs me but I can't come up with concrete reasons why, outside of "the base class cannot stand on its own as an implementation of the interface". What are the pros & cons of his method vs. mine, and why should one be used over another?

    Read the article

  • Case studies for successful service (project) based software development businesses without constant overtime from its employees [closed]

    - by Ryan Taylor
    I work for an IT company that is primarily services (project) based rather than product based. All software engineers are salaried. The company has set new expectations that everyone should work 48 hours per week instead of 40. Note, this isn't occasional overtime due to crunches. This is the new 40. The reasoning is that this enables the company to provide benefits to its employees such as monetary incentives and training because the company is more profitable. more hours worked = more billable hours = larger profit I understand the need for profitability and the occasional crunch time and have put in the extra hours when it was needed and beneficial to the project. However, I am also very sensitive to work life balance and have raised my concerns about the the new expectation. My employer is open to other methods to increase profitability so I hold hope that we can turn things around before it becomes a horrible place to work. How does a services based company become more profitable without increasing the number of hours expected from it's salaried employees? Are there any case studies showing the pros and cons of consistent overtime? Are there any case studies for a successful service based business model (for software development companies) that does not require consistent overtime from its employees?

    Read the article

  • Best practice to collect information from child objects

    - by Markus
    I'm regularly seeing the following pattern: public abstract class BaseItem { BaseItem[] children; // ... public void DoSomethingWithStuff() { StuffCollection collection = new StuffCollection(); foreach(child c : children) c.AddRequiredStuff(collection); // do something with the collection ... } public abstract void AddRequiredStuff(StuffCollection collection); } public class ConcreteItem : BaseItem { // ... public override void AddRequiredStuff(StuffCollection collection) { Stuff stuff; // ... collection.Add(stuff); } } Where I would use something like this, for better information hiding: public abstract class BaseItem { BaseItem[] children; // ... public void DoSomethingWithStuff() { StuffCollection collection = new StuffCollection(); foreach(child c : children) collection.AddRange(c.RequiredStuff()); // do something with the collection ... } public abstract StuffCollection RequiredStuff(); } public class ConcreteItem : BaseItem { // ... public override StuffCollection RequiredStuff() { StuffCollection stuffCollection; Stuff stuff; // ... stuffCollection.Add(stuff); return stuffCollection; } } What are pros and cons of each solution? For me, giving the implementation access to parent's information is some how disconcerting. On the other hand, initializing a new list, just to collect the items is a useless overhead ... What is the better design? How would it change, if DoSomethingWithStuff wouldn't be part of BaseItem but a third class? PS: there might be missing semicolons, or typos; sorry for that! The above code is not meant to be executed, but just for illustration.

    Read the article

  • When decomposing a large function, how can I avoid the complexity from the extra subfunctions?

    - by missingno
    Say I have a large function like the following: function do_lots_of_stuff(){ { //subpart 1 ... } ... { //subpart N ... } } a common pattern is to decompose it into subfunctions function do_lots_of_stuff(){ subpart_1(...) subpart_2(...) ... subpart_N(...) } I usually find that decomposition has two main advantages: The decomposed function becomes much smaller. This can help people read it without getting lost in the details. Parameters have to be explicitly passed to the underlying subfunctions, instead of being implicitly available by just being in scope. This can help readability and modularity in some situations. However, I also find that decomposition has some disadvantages: There are no guarantees that the subfunctions "belong" to do_lots_of_stuff so there is nothing stopping someone from accidentally calling them from a wrong place. A module's complexity grows quadratically with the number of functions we add to it. (There are more possible ways for things to call each other) Therefore: Are there useful convention or coding styles that help me balance the pros and cons of function decomposition or should I just use an editor with code folding and call it a day? EDIT: This problem also applies to functional code (although in a less pressing manner). For example, in a functional setting we would have the subparts be returning values that are combined in the end and the decomposition problem of having lots of subfunctions being able to use each other is still present. We can't always assume that the problem domain will be able to be modeled on just some small simple types with just a few highly orthogonal functions. There will always be complicated algorithms or long lists of business rules that we still want to correctly be able to deal with. function do_lots_of_stuff(){ p1 = subpart_1() p2 = subpart_2() pN = subpart_N() return assembleStuff(p1, p2, ..., pN) }

    Read the article

  • REST API wrapper - class design for 'lite' object responses

    - by sasfrog
    I am writing a class library to serve as a managed .NET wrapper over a REST API. I'm very new to OOP, and this task is an ideal opportunity for me to learn some OOP concepts in a real-life situation that makes sense to me. Some of the key resources/objects that the API returns are returned with different levels of detail depending on whether the request is for a single instance, a list, or part of a "search all resources" response. This is obviously a good design for the REST API itself, so that full objects aren't returned (thus increasing the size of the response and therefore the time taken to respond) unless they're needed. So, to be clear: .../car/1234.json returns the full Car object for 1234, all its properties like colour, make, model, year, engine_size, etc. Let's call this full. .../cars.json returns a list of Car objects, but only with a subset of the properties returned by .../car/1234.json. Let's call this lite. ...search.json returns, among other things, a list of car objects, but with minimal properties (only ID, make and model). Let's call this lite-lite. I want to know what the pros and cons of each of the following possible designs are, and whether there is a better design that I haven't covered: Create a Car class that models the lite-lite properties, and then have each of the more detailed responses inherit and extend this class. Create separate CarFull, CarLite and CarLiteLite classes corresponding to each of the responses. Create a single Car class that contains (nullable?) properties for the full response, and create constructors for each of the responses which populate it to the extent possible (and maybe include a property that returns the response type from which the instance was created). I expect among other things there will be use cases for consumers of the wrapper where they will want to iterate through lists of Cars, regardless of which response type they were created from, such that the three response types can contribute to the same list. Happy to be pointed to good resources on this sort of thing, and/or even told the name of the concept I'm describing so I can better target my research.

    Read the article

  • Artificial Intelligence ... how to make an object roam freely/avoid other objects, and model consciousness? [on hold]

    - by help bonafide pigeons
    Say a simple free roam battle scene in which a player runs around freely and engages in battle with other enemies/objects, as shown below: The dragon/dinosaur (or whatever that thing I drew appears to be) will, by some measure, try and avoid attacks so it is modeled to appear to have a conscious desire to avoid pain. My question is ... since this is very complex, many possible strategies for solving this, algorithms, etc., what is the basic idea behind how this would be accomplished in any sort? Like, we can assume the enemy in the picture is not just going to aimlessly hop around and avoid, but freely be modeled to behave as if it were really exploring/fighting. For the best example I can give, witness the behavior of the enemies in Final Fantasy 12 in this video: http://www.youtube.com/watch?v=mO0TkmhiQ6w How do the pros, or how would anyone attempt solve/implement this? PS: I have tried several times to give an image the "illusion" that is has a conciousness, but aside from emulating a real animal's consciousness in complete, I fall short and get choppy moving images that follow predictable patterns, error-prone movements, and the worst imaginable scenario of a battle engagement.

    Read the article

  • Been doing .NET for several years and am thinking about a platform change. Where do people suggest I go?

    - by rsteckly
    Hi, I've been programming in .NET for several years now and am thinking maybe its time to do a platform switch. Any suggestions about which platform would be the best to learn? I've been thinking about going back to C++ development or just focusing on T-SQL within the Microsoft stack. I'm thinking of switching because: a) I feel that the .NET platform is increasingly becoming commodified--meaning that its more about learning a GUI and certain things to click around than really understanding programming. I'm concerned that this will lend itself to making developers on that stack increasingly paid less. b) It's very frustrating to spend your entire day essentially debugging something that should work but doesn't. Usually, Microsoft releases something that suggests anyone can just click here and there and poof there's your application. Most of the time it doesn't work and winds up sucking so much more time than it was supposed to save. c) I recently led a team in a small startup to build a WPF application. We were really hit hard with people complaining about having to download the runtime. Our code was also not portable to any other platform. Added to which, the ram usage and slowness to load of the app was remarkable for its size. I researched it and we could not find a way to optimize it. d) I'm a little concerned about being wedded to the Windows platform. What are the pros and cons of adding another platform and which platform do people suggest? Thanks!

    Read the article

  • Do you use your personal laptop for work? [closed]

    - by davekaro
    We're trying to get our company to let us use our own personal laptops for client work. We've agreed that any code/data will be encrypted using something like TrueCrypt, in case a laptop is stolen or lost. However, the company is still skeptical and not sure they want to allow us to use our personal machines for development. They would rather buy us laptops... but we want to use MacBook Pros and they don't want to pay for them. Even if they did buy us laptops, we would stil have the issue of needing to encrypt the code/data in case of theft/loss. Do you use your own laptop for work? What are the arguments for/against this? UPDATE: Thanks for all the responses, its given us a lot to think about. This was originally brought up because we were asking for a "personal loan" to buy new laptops for ourselves, and then we threw in there that we would use these laptops for work too - since right now we use our personal laptops occasionally, e.g. at client site or weekend support.

    Read the article

  • Is it a good idea to dynamically position and size controls on a form or statically set them?

    - by CrystalBlue
    I've worked mostly with interface building tools such as xCode's Interface Builder and Visual Studio's environment to place forms and position them on screens. But I'm finding that with my latest project, placing controls on the form through a graphical interface is not going to work. This more has to do with the number of custom controls I have to create that I can't visually see before hand. When I first tackled this, I began to position all of my controls relative to the last ones that I created. Doing this had its own pros and cons. On the one hand, this gave me the opportunity to set one number (a margin for example) and when I changed the margin, the controls all sized correctly to one another (such as shortening controls in the center while keeping controls next to the margin the same). But this started to become a spiders-web of code that I knew wouldn't go very far before getting dangerous. Change one number and everything re sizes, but remove one control and you've created many more errors and size problems for all the other controls. It became more surgery then small changes to controls and layout. Is there a good way or maybe a preferred way to determine when I should be using relative or absolute positioning in forms?

    Read the article

  • A Myriad of Options

    - by Mark Hesse
    I am currently working with a customer that is close to outgrowing their Exadata X2-2 half rack in both compute and storage capacity.  The platform is used for one of their larger data warehouse applications and the move to Exadata almost two years ago has been a resounding success, forcing them to grow the platform sooner than anticipated. At a recent planning meeting, we started looking at the options for expansion and have developed five alternatives, all of which meet or exceed their growth requirements, yet have different pros and cons in terms of the impact to their production and test environments. The options include an in-rack upgrade to a full rack of Exadata using the recently released X3-2 platform (an option that even applies to an older V2 rack), multi-rack cabling the existing X2-2 to another full rack or half rack X2-2 (and utilizing both compute and storage capacity in the other rack), or simply adding a new X3-2 half rack (and taking advantage of the added compute and flash performance in the X3-2). While the decision is yet to be made, it had me thinking that one of the benefits of Exadata over a traditional database deployment is that when the time comes to expand the platform, there are a myriad of options.

    Read the article

  • Should if statments be in inner or outer method?

    - by mjcopple
    Which of these designs is better? What are the pros and cons of each? Which one would you use? Any other suggestions of how to deal with methods like is are appreciated. It is reasonable to assume that Draw() is the only place that the other draw methods are called from. This needs to expand to many more Draw* methods and Show* properties, not just the three shown here. public void Draw() { if (ShowAxis) { DrawAxis(); } if (ShowLegend) { DrawLegend(); } if (ShowPoints && Points.Count > 0) { DrawPoints(); } } private void DrawAxis() { // Draw things. } private void DrawLegend() { // Draw things. } private void DrawPoints() { // Draw things. } Or public void Draw() { DrawAxis(); DrawLegend(); DrawPoints(); } private void DrawAxis() { if (!ShowAxis) { return; } // Draw things. } private void DrawLegend() { if (!ShowLegend) { return; } // Draw things. } private void DrawPoints() { if (!ShowPoints || Points.Count <= 0)) { return; } // Draw things. }

    Read the article

  • High-level strategy for distinguishing a regular string from invalid JSON (ie. JSON-like string detection)

    - by Jonline
    Disclaimer On Absence of Code: I have no code to post because I haven't started writing; was looking for more theoretical guidance as I doubt I'll have trouble coding it but am pretty befuddled on what approach(es) would yield best results. I'm not seeking any code, either, though; just direction. Dilemma I'm toying with adding a "magic method"-style feature to a UI I'm building for a client, and it would require intelligently detecting whether or not a string was meant to be JSON as against a simple string. I had considered these general ideas: Look for a sort of arbitrarily-determined acceptable ratio of the frequency of JSON-like syntax (ie. regex to find strings separated by colons; look for colons between curly-braces, etc.) to the number of quote-encapsulated strings + nulls, bools and ints/floats. But the smaller the data set, the more fickle this would get look for key identifiers like opening and closing curly braces... not sure if there even are more easy identifiers, and this doesn't appeal anyway because it's so prescriptive about the kinds of mistakes it could find try incrementally parsing chunks, as those between curly braces, and seeing what proportion of these fractional statements turn out to be valid JSON; this seems like it would suffer less than (1) from smaller datasets, but would probably be much more processing-intensive, and very susceptible to a missing or inverted brace Just curious if the computational folks or algorithm pros out there had any approaches in mind that my semantics-oriented brain might have missed. PS: It occurs to me that natural language processing, about which I am totally ignorant, might be a cool approach; but, if NLP is a good strategy here, it sort of doesn't matter because I have zero experience with it and don't have time to learn & then implement/ this feature isn't worth it to the client.

    Read the article

  • Implementing Explosions

    - by Xkynar
    I want to add explosions to my 2D game, but im having a hard time with the architecture. Several game elements might be responsible for explosions, like, lets say, explosive barrels and bullets (and there might be chain reactions with close barrels). The only options i can come up with are: 1 - Having an array of explosions and treat them as a game element as important as any other Pros: Having a single array which is updated and drawn with all the other game element arrays makes it more organized and simple to update, and the explosive barrels at a first glance would be easy to create, simply by passing the explosion array as a pointer to each explosive barrel constructor Cons: It might be hard for the bullets to add an explosion to the vector, since bullets are shot by a Weapon class which is located in every mob, so lets say, if i create a new enemy and add it to the enemy array, that enemy will have a weapon and functions to be able to use it, and if i want the weapon (rocket launcher in this case) to have access to the explosions array to be able to add a new one, id have to pass the explosion array as a pointer to the enemy, which would then pass it to the weapon, which would pass it to the bullets (ugly chain). Another problem I can think of is a little more weird: If im checking the collisions between explosions and barrels (so i create a chain reaction) and i detect an explosion colliding with a barrel, if i add a new explosion while im iterating the explosions java will trow an exception. So this is kinda annoying, i cant iterate through the explosions and add a new explosion, i must do it in another way... The other way which isnt really well thought yet is to just add an explosive component to every element that might explode so that when it dies, it explodes or something, but i dont have good ways on implementing this theory either Honestly i dont like either the solutions so id like to know how is it usually done by actual game developers, sorry if my problem seems trivial and dumb.

    Read the article

  • Should my web app have its own domain name?

    - by Daniero
    I'm going to get a domain name for my personal web page. It will contain my blog, photos and other personal stuff, plus different web apps and tools that I'm working on. I have put quite a lot of work in one of the web apps, and I think it has great potential. It covers a niche in a way that no other page has done before and I can see great possibilities to expand it. Via links to webstores and ads I think it could even make some money, and if I play it right this could be the place to go when you're into the specific niche that it covers (sorry for being so vague). My question is, would it be better for a (potentially great) web app like this to have its own domain name (nameofmyapp.com) instead of being a subpage of my personal page (mypersonaldomain.com/nameofmyapp)? Is the web app more likely to be found by others, via Google etc, with its own domain name? Could a "subpage" give more attention (visitors) to my personal page? pros and cons?

    Read the article

  • Should I use my real name in my open source project?

    - by Jardo
    I developed a few freeware programs in the past which I had signed with my pseudonym Jardo. I'm now planning to release my first open source project and was thinking of using my full real name in the project files (as the "author"). I thought it would be good to use my name as my "trademark" so if someone (perhaps a future headhunter) googles my name, they'll find my projects. But on the other side, I feel a bit paranoid about disclosing my name (in the least case I could be getting a lot of spam to my email, its not that hard to guess your private email from your name). What do you think can be "dangerous" on disclosing your full name? What are the pros and cons? Do you use your real name or a pseudonym in your projects? I read this question: What are the advantages and disadvantages to using your real name online? but that doesn't apply to me bacause it's about using your real name online (internet discussions, profiles, etc.) where I personally see no reason to use my real name... And there is also this question: Copyrighting software, templates, etc. under real name or screen name? which deals with creating a business or a brand which also doesn't apply to me because I will never sell/give away my open source project and if someone else joins in, they can write their name as co-author without any problems...

    Read the article

  • Implementing Audit Trail- Spring AOP vs.Hibernate Interceptor vs DB Trigger

    - by RN
    I found couple of discussion threads on this- but nothing which brought a comparison of all three mechanism under one thread. So here is my question... I need to audit DB changes- insert\updates\deletes to business objects. I can think of three ways to do this 1) DB Triggers 2) Hibernate interceptors 3) Spring AOP (This question is specific to a Spring\Hibernate\RDBMS- I guess this is neutral to java\c# or hibernate\nhibernate- but if your answer is dependent upon C++ or Java or specific implementation of hibernate- please specify) What are the pros and cons of selecting one of these strategies ? I am not asking for implementation details.-This is a design discussion. I am hoping we can make this as a part of community wiki

    Read the article

  • Google Maps API vs Multimap/Bing Maps API

    - by mdresser
    I want to know if anyone who has experience of using both the Google Maps API and the Multimap API can give a good reason as to why one is better than the other - or maybe a list of pros and cons? I will be working on a complete re-development of a site which currently uses the Multimap (Classic) API and want to consider the possibility of using Google Maps API instead of Multimap (now MS Bing), but I need a compelling reason to justify this decision. The site currently provides a search mechanism allowing users to search for addresses using postcode/partial postcode or city. The current system has a sqlserver database back-end containing full address details and also uploads (geocodes this information to Multimap with a daily scheduled task). I'm wondering if it's possible with the Google API to avoid the need for the daily upload and just use it's geocoding API instead (though this is limited by Google's restriction of a certain number of geocoding requests per day).

    Read the article

  • OpenCart vs. PrestaShop vs. OXID eShop

    - by rakke
    Hi all, I'm currently looking for a new e-commerce solution for a small to medium-sized webshops. By now I've narrowed it down to 3 competitors: OpenCart (http://www.opencart.com/), PrestaShop (http://www.prestashop.com/) and OXID eShop Community edition (http://www.oxid-esales.com/). I'm interested in pros and cons of the different solutions, and if you are running a site using one of these solutions, why you chose that solution over the others. Could please someone with more than 250 reputation create a tag called "oxid" to link to questions about Oxid eShop?

    Read the article

  • Plastic SCM vs. SVN

    - by jon37
    I'm currently researching new source control options for a team of 10 developers. We do .net development in Visual Studio 2008. We currently use VSS for source control. We are looking for a centralized source control solution(non-distributed), with a nice Visual Studio plugin. My manager has recommended Plastic SCM and I've always heard good things about Subversion. I'm trying to decide if we should adopt Subversion or Plastic SCM. There isn't much information out there about Plastic SCM (except what they've written) and I was wondering if it would be a good solution. They make it sound as if branching is much simpler. Subversion on the other hand has a robust, mature community, and it has been thoroughly field tested. What are the pros and cons to these tools? Also are there any other tools that you could suggest? Thanks

    Read the article

  • Coco/R vs. ANTLR

    - by Eamon Nerbonne
    I'm evaluating using Coco/R vs. ANTLR for use in a C# project as part of what's essentially a scriptable mail-merge functionality. To parse the (simple) scripts, I'll need a parser. I've focussed on Coco/R and ANTLR because both seem fairly mature and well-maintained and capable of generating decent C# parsers. Neither seem to be trivial to use either, however, and simplicity is something I'd appreciate - particularly maintainability by others. Does anyone have any recommendations to make? What are the pros/cons of either for a parsing a small language - or am I looking into the wrong things entirely? How well do these integrate into a typical continuous integration setup? What are the pitfalls? Related: Well, many questions, such as 1, 2, 3, 4, 5.

    Read the article

  • Asp.net ADO.NET Entity Framework or ADO.NET

    - by sharru
    I'm starting a new project based on ASP.NET and Windows server. The application is planned to be pretty big and serve large amount of clients pulling and updating high freq. changing data. I have previously created projects with Linq-To-Sql or with Ado.Net. My plan for this project is to use VS2010 and the new EF4 framework. It would be great to hear other programmers options about development with Entity Framework Pros and cons from previous experience? Do you think EF4 is ready for production? Should i take the risk or just stick with plain old good ADO.NET?

    Read the article

  • Best UI development framework on windows?

    - by TG
    I have been developing UI in Win32/MFC, but developing cool UI in Win32/MFC is very difficult and time consuming. Please note, I always want my code to be platform independent, So I prefer programming back-end (Business logic) in C++. Which is the best framework for developing cool UI on windows platform? I heard of quite a few, like Qt, Flex, Delphi. What is your thoughts (Pros and Cons) on these UI development frameworks. Which one do you recommend ?

    Read the article

  • Will you use Delphi Prism

    - by Mohammed Nasman
    CodeGear announces that their Next .Net product which is known as Delphi Prism Will be RemObjects's Oxygene. Oxygene has many nice features that not found in Delphi or C#, and I think it will be a more effective solution for .Net than Delphi .Net previous releases, but it's uses Visual Studio IDE instead of Delphi IDE. which has some cons and pros. As Delphi Developer or .Net Developer, do you consider to use Delphi Prism for .Net developmenet? Look at these Links for more info. Delphi Prism vs. CSharp Delphi Prism - Visual Studio Pascal For .NET Delphi Prims home page

    Read the article

  • I need to choose a compression algorithm

    - by chiz
    I need to choose a compression algorithm to compress some data. I don't know the type of data I'll be compressing in advance (think of it as kinda like the WinRAR program). I've heard of the following algorithms but I don't know which one I should use. Can anyone post a short list of pros and cons? For my application the first priority is decompression speed; the second priority is space saved. Compression (not decompression) speed is irrelevant. Deflate Implode Plain Huffman bzip2 lzma

    Read the article

  • C# Winforms vs WPF

    - by m0s
    Hi pros, I am a student and I do freelance here and there when I have opportunity. I believe my strongest language is C#. I don't really know what is going on in real programming world, so I was wondering if WPF did take over WinForms? I know the differences between two and how two can be used simultaneously but, I just don't want to invest my time in learning dying technologies, I hope you understand. So, for windows desktop programming what would you recommend to master WinForms, WPF or maybe both? I also get a lot that desktop programming is dead already and one should only care about learning web programming. Thanks for attention, any comments are greatly appreciated.

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >