Search Results

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

Page 74/237 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • What are the Worst Software Project Failures Ever?

    - by Warren P
    Is there a good list of "worst software project failures ever" in the history of software development? For example in Canada a "gun registry" project spent around two billion dollars. (http://en.wikipedia.org/wiki/Gun_registry). This is of course, insane, even if the final product "sort of worked". I have heard of an FBI Case file system which there have been several attempts to rewrite, all of them so far, failures. There is a book on the subject (Software Runaways). There doesn't seem to be be a software "boondoggle" list or "fiasco" list on Wikipedia that I can see. (Update: Therac-25 would be the 'winner' of this question, except that I was internally thinking more of Software projects that had as their deliverable, mainly software, as opposed to firmware projects like Therac-25, where the hardware and firmware together are capable of killing people. In terms of pure software monetary debacles, which was my intended question, there are several contenders.)

    Read the article

  • Controls added in the designer are null during Page_Load

    - by mwright
    All of the names below are generic and not the actual names used. I have a custom UserControl with a Panel that contains a a couple Labels, both .aspx controls. .aspx: <asp:Panel runat="server"> <asp:Label ID="label1" runat="server"> </asp:Label> </asp:Panel> <asp:Panel runat="server"> <asp:Label ID="label2" runat="server"> </asp:Label> </asp:Panel> Codebehind: private readonly Object object; protected void Page_Load(object sender, EventArgs e) { // These are the lines that are failing // label1 and label2 are null label1.Text = object.Value1; label2.Text = object.Value2; } public ObjectRow(Object objectToDisplay) { object = objectToDisplay; } On another page, in the code behind, I create a new instance of the custom user control. protected void Page_Load(object sender, EventArgs e) { CustomControl control = new CustomControl(object); } The user control takes the parameter and attempts to set the labels based off of the object passed in. The labels that it tries to assign the values to are however, null. Is this an ASP.net lifecycle issue that I'm not understanding? My understanding based on the Microsoft ASP.net lifecycle page was that page controls were available after the Page_Initialization. What is the proper way to do this? Is there a better way?

    Read the article

  • Performance Related features for migration from .net 2003 Framework 1.1 to .net 2008 framework 3.5?

    - by KuldipMCA
    I am work on VB.net 2003 Framework 1.1 for last 3.5 years in windows Application. We are currently migrating to VB.net 2008 framework 3.5, but i don't know about the features which related to ADO.net and which is important to performance. I know linq to SQL but our architecture is made in .net 2003 so we should follow this. Any features which is very important to enhance the performance?

    Read the article

  • Why avoid increment ("++") and decrement ("--") operators in JavaScript?

    - by artlung
    I'm a big fan of Douglas Crockford's writing on JavaScript, particularly his book JavaScript: The Good Parts. It's made me a better JavaScript programmer and a better programmer in general. One of his tips for his jslint tool is this : ++ and -- The ++ (increment) and -- (decrement) operators have been known to contribute to bad code by encouraging excessive trickiness. They are second only to faulty architecture in enabling to viruses and other security menaces. There is a plusplus option that prohibits the use of these operators. This has always struck my gut as "yes, that makes sense," but has annoyed me when I've needed a looping condition and can't figure out a better way to control the loop than a while( a < 10 )do { a++ } or for (var i=0;i<10;i++) { } and use jslint. It's challenged me to write it differently. I also know in the distant past using things, in say PHP like $foo[$bar++] has gotten me in trouble with off-by-one errors. Are there C-like languages or other languages with similarities that that lack the "++" and "--" syntax or handle it differently? Are there other rationales for avoiding "++" and "--" that I might be missing? UPDATE -- April 9, 2010: In the video Crockford on JavaScript -- Part 5: The End of All Things, Douglas Crockford addresses the ++ issue more directly and with more detail. It appears at 1:09:00 in the timeline. Worth a watch.

    Read the article

  • Interface and partial classes

    - by Tomek Tarczynski
    According to rule SA1201 in StyleCop elements in class must appear in correct order. The order is following: Fields Constructors Finalizers (Destructors) Delegates Events Enums Interfaces Properties Indexers Methods Structs Classes Everything is ok, except of Interfaces part, because Interface can contain mehtods, events, properties etc... If we want to be strict about this rule then we won't have all members of Interface in one place which is often very useful. According to StyleCop help this problem can be solved by spliting class into partial classes. Example: /// <summary> /// Represents a customer of the system. /// </summary> public partial class Customer { // Contains the main functionality of the class. } /// <content> /// Implements the ICollection class. /// </content> public partial class Customer : ICollection { public int Count { get { return this.count; } } public bool IsSynchronized { get { return false; } } public object SyncRoot { get { return null; } } public void CopyTo(Array array, int index) { throw new NotImplementedException(); } } Are there any other good solutions to this problem?

    Read the article

  • What is your strategy to avoid dynamic typing errors in Python (NoneType has not attribute x)?

    - by Koen Bok
    Python is one of my favorite languages, but I really have a love/hate relationship with it's dynamicness. Apart from the advantages, it often results in me forgetting to check a type, trying to call an attribute and getting the NoneType (or any other) has no attribute x error. A lot of them are pretty harmless but if not handled correctly they can bring down your entire app/process/etc. Over time I got better predicting where these could pop up and adding explicit type checking, but because I'm only human I miss one occasionally and then some end-user finds it. So I'm interested in your strategy to avoid these. Do you use type-checking decorators? Maybe special object wrappers? Please share...

    Read the article

  • Code Analysis - Treat as Error

    - by Brian Schmitt
    Looking to enable the "Enable code Analysis on Build" feature in Visual Studio. Obviously the Rules are a best practice, and I am working with an existing code base that currently fails many of the rules. I am looking for input as to which rules are the most egregious and should be treated as an Error.

    Read the article

  • Is there a compelling reason to use quantifiers in Perl regular expressions instead of just repeatin

    - by Morinar
    I was performing a code review for a colleague and he had a regular expression that looked like this: if ($value =~ /^\d\d\d\d$/) { #do stuff } I told him he should change it to: if ($value =~ /^\d{4}$/) { #do stuff } To which he replied that he preferred the first for readability (I find the second more readable, but that's a religious debate I'll save for another day). My question: is there an actual benefit to one over the other?

    Read the article

  • Should I worry about reigning in namespace number/length/scope?

    - by Jay
    I've recently reorganized a solution-in-progress from 24 projects to 4. To keep the copious files organized in the "main" project, things are in folders in folders in folders. I think I've preserved a logical, discoverable arrangement of the solution content. As a result, of course, I end up with namespaces like AppName.DataAccess.NHibernate.Fluent.Mappings. Is there any compelling reason that I should care about flattening out the namespace hierarchy when my project has a somewhat deeply nested folder structure? (I am not concerned about resolving or managing using directives; I let ReSharper do all the heavy lifting here.)

    Read the article

  • How Can I Find Out *HOW* My Site Was Hacked? How Do I Find Site Vulnerabilities?

    - by Imageree
    One of my custom developed ASP.NET sites was hacked today: "Hacked By Swan (Please Stop Wars !.. )" It is using ASP.NET and SQL Server 2005 and IIS 6.0 and Windows 2003 server. I am not using Ajax and I think I am using stored procedures everywhere I am connecting to the database so I dont think it is SQL injection. I have now removed the write permission on the folders. How can I find out what they did to hack the site and what to do to prevent it from happening again? The server is up to date with all Windows updates. What they have done is uploading 6 files (index.asp, index.html, index.htm,...) to the main directory for the website. What log files should I upload? I have log files for IIS from this folder: c:\winnt\system32\LogFiles\W3SVC1. I am willing to show it to some of you but don't think it is good to post on the Internet. Anyone willing to take a look at it? I have already searched on Google but the only thing I find there are other sites that have been hacked - I haven't been able to see any discussion about it. I know this is not strictly related to programming but this is still an important thing for programmers and a lot of programmers have been hacked like this.

    Read the article

  • best practice for boolean REST results

    - by Andrew Patterson
    I have a resource /system/resource And I wish to ask the system a boolean question about the resource that can't be answered by processing on the client (i.e I can't just GET the resource and look through the actual resource data - it requires some processing on the backend using data not available to the client). eg /system/resource/related/otherresourcename I want this is either return true or false. Does anyone have any best practice examples for this type of interaction? Possibilities that come to my mind: use of HTTP status code, no returned body (smells wrong) return plain text string (True, False, 1, 0) - Not sure what string values are appropriate to use, and furthermore this seems to be ignoring the Accept media type and always returning plain text come up with a boolean object for each of my support media types and return the appropriate type (a JSON document with a single boolean result, an XML document with a single boolean field). However this seems unwieldy. I don't particularly want to get into a long discussion about the true meaning of a RESTful system etc - I have used the word REST in the title because it best expresses the general flavour of system I am designing (even if perhaps I am tending more towards RPC over the web rather than true REST). However, if someone has some thoughts on how a true RESTful system avoids this problem entirely I would be happy to hear them.

    Read the article

  • What's the pythonic way of declaring variables?

    - by the_drow
    Usually declaring variables on assignment is considered a best practice in VBScript or JavaScript , for example, although it is allowed. Why does Python force you to create the variable only when you use it? Since Python is case sensitive can't it cause bugs because you misspelled a variable's name? How would you avoid such a situation?

    Read the article

  • How to connect remote EJB module from application client

    - by Zeck
    Hi guys, I have a EJB module in remote Glassfish server and application client in my computer. I want to connect from the application client to the remote EJB. Here is the my EJB interface: @Remote public interface BookEJBRemote { public String getTitle(); } Here is the my ejb: @Stateless public class BookEJB implements BookEJBRemote { @Override public String getTitle() { return "Twenty Thousand Leagues Under the Sea"; } } I have several questions : Can I use Dependency Injection in the remote application client to connect to the ejb? If so what can i do to achieve this. Do i need to configure in the sun-ejb-jar.xml and sun-application-client.xml? In other words, if i use DI like @EJB MyEJBRemote ejb; How application client container know what ejb to be injected? Where should i specify the information? How can i run the application client? I tried to run package-appclient in the glassfish server to get appclient.jar and copy it to my computer. Then i type appclient.jar -client myAppClient.jar . It didn't work. How do i point the target server? if i cannot use DI in the client then i guess i have to use JNDI lookup. Do i need to configure jndi name in sun-ejb-jar.xml or in the sun-application-client.xml? No matter how i try i never manage to run application client ? Can you guys put some working example? And thank you for every advises and examples?

    Read the article

  • Java operator overloading

    - by nimcap
    Not using operators makes my code obscure. (aNumber / aNother) * count is better than aNumber.divideBy(aNother).times(count) After 6 months of not writing a single comment I had to write a comment to the simple operation above. Usually I refactor until I don't need comment. And this made me realize that it is easier to read and perceive math symbols and numbers than their written forms. For example TWENTY_THOUSAND_THIRTEEN.plus(FORTY_TWO.times(TWO_HUNDERED_SIXTY_ONE)) is more obscure than 20013 + 42*261 So do you know a way to get rid of obscurity while not using operator overloading in Java? Update: I did not think my exaggeration on comments would cause such trouble to me. I am admitting that I needed to write comment a couple of times in 6 months. But not more than 10 lines in total. Sorry for that. Update 2: Another example: budget.plus(bonusCoefficient.times(points)) is more obscure than budget + bonusCoefficient * points I have to stop and think on the first one, at first sight it looks like clutter of words, on the other hand, I get the meaning at first look for the second one, it is very clear and neat. I know this cannot be achieved in Java but I wanted to hear some ideas about my alternatives.

    Read the article

  • Explaining to boss why we need to avoid horizontal scroll

    - by Bradley Herman
    I need help explaining to my boss why her design is poor on a clients website. She has no knowledge of web and it can be difficult as a web developer working with a woman who is a graphic designer (not even a web designer really). On a current site she has designed, an image bar "needs" to be like 1200px according to her, though it isn't necessary with the content. I'll show a quick sketch to illustrate what's going on: http://imgur.com/MNGOT.jpg As you see, the banner spills out past the 960px of the content and as wide as 1200px. This creates a horizontal scroll when all the content is viewable within the 960px wide viewport. I need to make this an img and not a css background because it's a jquery slideshow that fades from image to image. I think this is a big problem because a lot of people are going to get a horizontal scroll bar imposed in their browser when they're still able to see all the relevant content. How do I help her explain it. She thinks no one will notice and it'll be fine, I think it's very bad practice and confusing to the end user. Any help?

    Read the article

  • "Nearly divisible"

    - by bobobobo
    I want to check if a floating point value is "nearly" a multiple of 32. E.g. 64.1 is "nearly" divisible by 32, and so is 63.9. Right now I'm doing this: #define NEARLY_DIVISIBLE 0.1f float offset = fmodf( val, 32.0f ) ; if( offset < NEARLY_DIVISIBLE ) { // its near from above } // if it was 63.9, then the remainder would be large, so add some then and check again else if( fmodf( val + 2*NEARLY_DIVISIBLE, 32.0f ) < NEARLY_DIVISIBLE ) { // its near from below } Got a better way to do this?

    Read the article

  • Exception design: Custom exceptions reading data from file?

    - by User
    I have a method that reads data from a comma separated text file and constructs a list of entity objects, let's say customers. So it reads for example, Name Age Weight Then I take these data objects and pass them to a business layer that saves them to a database. Now the data in this file might be invalid, so I'm trying to figure out the best error handling design. For example, the text file might have character data in the Age field. Now my question is, should I throw an exception such as InvalidAgeException from the method reading the file data? And suppose there is length restriction on the Name field, so if the length is greater than max characters do I throw a NameTooLongException or just an InvalidNameException, or do I just accept it and wait until the business layer gets a hold of it and throw exceptions from there? (If you can point me to a good resource that would be good too)

    Read the article

  • HELP!! Ruby & RoR Resources?

    - by aaroninfidel
    Hello, I've been a PHP Developer for a few years now and I've recently been interested in learning Ruby & Rails but I've found a lot of the resources I've found seem to be dated and not for Rails 2.0 or Ruby 1.8.6 etc... can anyone point me in the right direction? I'm running OSX 10.6 with the default ruby & rails installation. Thanks!

    Read the article

  • Common programming mistakes for Scala developers to avoid

    - by jelovirt
    In the spirit of Common programming mistakes for Java developers to avoid? Common programming mistakes for JavaScript developers to avoid? Common programming mistakes for .NET developers to avoid? Common programming mistakes for Haskell developers to avoid? Common programming mistakes for Python developers to avoid? Common Programming Mistakes for Ruby Developers to Avoid Common programming mistakes for PHP developers to avoid? what are some common mistakes made by Scala developers, and how can we avoid them? Also, as the biggest group of new Scala developers come from Java, what specific pitfalls they have to be aware of? For example, one often cited problem Java programmers moving to Scala make is use a procedural approach when a functional one would be more suitable in Scala. What other mistakes e.g. in API design newcomers should try to avoid.

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >