Search Results

Search found 91526 results on 3662 pages for 'clean code'.

Page 61/3662 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • How to cut the line between quality and time?

    - by m3th0dman
    On one hand, I have been taught by various software engineering books ([1] as example) that my job as a programmer is to make the best possible software: great design, flexibility, to be easily maintained etc. One the other hand although I realize that I actually write software for money and not for entertainment, although is very nice to write good code and plan ahead and refactor after writing and ... I wonder if it is always best for the business (after all we should be responsible). Is the business always benefiting from a best code? Maybe I'm over-engineering something, and it's not always useful? So how should I know when to stop in the process to achieving the best possible code? I am sure that experience is something that makes a difference here, but I believe this cannot be the only answer. [1] Uncle Bob's in Clean Code says at page 6 about the fact that: They [managers] may defend the schedule and requirements with passion; but that’s their job. It’s your job to defend the code with equal passion.

    Read the article

  • How to Write Manageable Code With Functional Programming?

    - by dade
    I just started with Functional Programming(Node.Js) and from the look of things it looks as if the code am writing would grow to be one hell of a code base to manage, when compared to Programming languages that have a sort of Object Oriented Paradigm. With OOP I am familair with practices that would ensure your code is easily managed and extensible. But am nore sure of similar convention with Functional Programming.

    Read the article

  • FxCop / Code Analysis with VS2010 Ultimate

    - by Cuartico
    I've getting some information about this, but I still can find a proper answer, I was asked recently in my company for this : "run a fxcop analysis on that code and tell me the results". Ok, I have VS2010 Ultimate which has code analysis, but before making any comment, I browse it on the internet cause I want to implement the best choice... So, let's say I'm gonna use the same rules on both analyzers: Should I recommend using one above the other? Should I say "hey, thats kinda old, let's use code analysis!" Should I get the same results on different computers? (for what I undersand, fxcop gives you some "points" and for what I've read, sometimes it gives you diff points on diff computers, I don't know about this with code analysis Thanks, any help would be appreciated

    Read the article

  • Which is more effective in coding? Reducing line of code and execution of code?

    - by Ayyappan.Anbalagan
    I have this doubt many years. I am wring some code to achieve some functionality. For example I am writing 20 lines of code to achieve the functionality and my co worker writing the code for the same functionality with just 5 lines. Since he used some looping statement to achieve that, but that code will execute around 30 to 50 times. So which is best way of coding? As per my knowledge I always try to reduce coding length as much I can.

    Read the article

  • Cloud Sample Code on OTN

    - by Oliver Steinmeier
    In recent months our blog has covered many aspects of the overall Oracle Cloud platform, whether it's PaaS (Java Cloud Service, Database Cloud Service) or SaaS (Sales Cloud Application Composer). Teams within Oracle have been busy building demos and proof-of-concept applications using the same technologies, and we have now started posting some of these as code samples on the Oracle Technology Network (OTN).  The zip files include both the source code and helpful information to get you started using the code.  Everything is covered under a BSD license.  In future blog posts we will dive deeper into some of these applications. Do you have any ideas or requests for sample code you would like us to create to help you with your work?  Hit the comments and let us know! 

    Read the article

  • Don't Copy This Code

    Normally, when we release source code we're hoping that other people will build on it and improve it. Today's release of Jarlsberg , a small yet full-featured microblogging...

    Read the article

  • JEditorPane Code Completion (Part 3)

    - by Geertjan
    The final step is to put an object into the Lookup on key listening in each of the JEditorPanes, e.g., a "City" object for the CityEditorPane and a "Country" object for the CountryEditorPane. Then, within the CompletionProviders, only add items to the CompletionResultSet if the object of interest is in the Lookup. The result is that you can then have different code completions in different JEditorPanes, as shown below: I've also included the Tools | Options | Editor | Code Completion tab, so that the code completion can be customized. The full source code for the example is here: java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.2/misc/CustomerApp

    Read the article

  • What are the design principles that promote testable code? (designing testable code vs driving design through tests)

    - by bot
    Most of the projects that I work on consider development and unit testing in isolation which makes writing unit tests at a later instance a nightmare. My objective is to keep testing in mind during the high level and low level design phases itself. I want to know if there are any well defined design principles that promote testable code. One such principle that I have come to understand recently is Dependency Inversion through Dependency injection and Inversion of Control. I have read that there is something known as SOLID. I want to understand if following the SOLID principles indirectly results in code that is easily testable? If not, are there any well-defined design principles that promote testable code? I am aware that there is something known as Test Driven Development. Although, I am more interested in designing code with testing in mind during the design phase itself rather than driving design through tests. I hope this makes sense. One more question related to this topic is whether it's alright to re-factor an existing product/project and make changes to code and design for the purpose of being able to write a unit test case for each module?

    Read the article

  • How to separate and maintain customer specific code

    - by WYSIWYG
    I am implementing customer specific code and currently following simple approach like if (cusomterId == 23) do it. I want to separate out all the customer related code in separate place. But I have following problems. In code is in 1. Stored procs 2. Plain old classes. 3. Controllers 4. Views I came up with two solutions. First is to create table CustomerFunctionlity with columns CustomerId, FunctionalityName, method/Proc, inputs/outputs With this table I can simply check if exists, execute given function. Another way is creating a factory which returns customer related object for an interface. I am writting small end to end customer specific functionalities. How can I write maintenable code. Thanks

    Read the article

  • Is testable code actually more stable? [closed]

    - by Xodarap
    A google scholar search turns up numerous papers on testability, including models for computing testability, recommendations for how ones code can be more testable, etc. They all come with the assertion that more testable code is more stable, however I can't find any studies which actually demonstrate this. I tried looking for studies evaluating the effect of testable code vs. quality, however the closest I can find is Improving the Testability of Object Oriented Systems, which discusses the relationship between design flaws and testability. Is testable code is actually more stable? And why, or why not? Please back up your answers with references or evidence to back up your claim.

    Read the article

  • Using macro to check null values [migrated]

    - by poliron
    My C code contains many functions with pointers to different structs as parameteres which shouldn't be NULL pointers. To make my code more readable, I decided to replace this code: if(arg1==NULL || arg2==NULL || arg3==NULL...) { return SOME_ERROR; } With that macro: NULL_CHECK(arg1,arg2,...) How should I write it, if the number of args is unknown and they can point to different structs?(I work in C99)

    Read the article

  • Is there a way to make sure a background process spawned by my program is killed when my process ter

    - by Davy8
    Basically the child process runs indefinitely until killed in the background, and I want to clean it up when my program terminates for any reason, i.e. via the Taskmanager. Currently I have a while (Process.GetProcessesByName("ParentProcess").Count() 0) loop and exit if the parent process isn't running, but it seems pretty brittle, and if I wanted it to work under debugger in Visual Studio I'd have to add "ParentProcess.vshost" or something. Is there any way to make sure that the child process end without requiring the child process to know about the parent process? I'd prefer a solution in managed code, but if there isn't one I can PInvoke. Edit: Passing the PID seems like a more robust solution, but for curiosity's sake, what if the child process was not my code but some exe that I have no control over? Is there a way to safeguard against possibly creating orphaned child processes?

    Read the article

  • Absent Code attribute in method that is not native or abstract

    - by kerry
    I got the following, quite puzzling error today when running a unit test: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/http/Cookie A google search found this post, which explains that it is caused by having an interface in the classpath, and not an actual implementation. In this case it’s the java-ee interface. To fix this I added the jetty servlet api implementation to my pom: jetty javax.servlet test Piece of cake. I have run in to this before, so I figured I would capture the fix here in case I run in to it again.

    Read the article

  • Are there code signing certificates cheaper than US$99 per year? [closed]

    - by gerryLowry
    K Software discounts Comodo code signing certificates to US$99 per year. In the past, I've seen Commodo code signing certificates for US$80. I'm excluding CAcert which AFAIK are FREE but are not covered by browsers like Internet Explorer AFAIK. QUESTION: What is the best price per year for a code signing certificate? Thank you ~~ gerry (lowry) Edit: **THIS SHOULD NOT HAVE BEEN CLOSED** from the FAQ: http://stackoverflow.com/faq ---------------------------- What kind of questions can I ask here? Programming questions, of course! As long as your question is: * detailed and specific <====== YES! * written clearly and simply <====== YES! * of interest to other programmers <====== YES! I've been programming for over 40 years. http://gerrylowryprogrammer.com/ I've taught computer programming at the community college level. I'm a Star level contributer to forums.asp.net. http://forums.asp.net/members/gerrylowry.aspx IMO, I've a very good idea what is of interest to other programmers. MORE INFORMATION http://en.wikipedia.org/wiki/Code_signing http://msdn.microsoft.com/en-us/library/ms537361%28VS.85%29.aspx also: via Google: code signing Ensuring the integrity of code and executables that one distributes is just as much about programming as is knowing how to flip bits in assembler, use delegates in C#, and use the BDD context/specification still of "test first testing".

    Read the article

  • Why is my code signing (MS authenticode) verification failing?

    - by Tim
    I posted this question and have a freshly minted code signing cert from Thawte. I followed the instructions (or so I thought) and the code signing claims to be done right, however when I try to verify the tool shows an error. I have no idea what it means and no idea how to fix this. Any comments would be appreciated. Command line to sign exe: signtool sign /f mdt.pfx /p password /t http://timestamp.verisign.com/scripts/timstamp.dll test.exe Results: The following certificate was selected: Issued to: [my company] Issued by: Thawte Code Signing CA Expires: 4/23/2011 7:59:59 PM SHA1 hash: 7D1A42364765F8969E83BC00AB77F901118F3601 Done Adding Additional Store Attempting to sign: test.exe Successfully signed and timestamped: test.exe Number of files successfully Signed: 1 Number of warnings: 0 Number of errors: 0 Note that there are no errors or warnings. Now, when I try to verify imagine my surprise: signtool verify /v test.exe results in: Verifying: test.exe SHA1 hash of file: 490BA0656517D3A322D19F432F1C6D40695CAD22 Signing Certificate Chain: Issued to: Thawte Premium Server CA Issued by: Thawte Premium Server CA Expires: 12/31/2020 7:59:59 PM SHA1 hash: 627F8D7827656399D27D7F9044C9FEB3F33EFA9A Issued to: Thawte Code Signing CA Issued by: Thawte Premium Server CA Expires: 8/5/2013 7:59:59 PM SHA1 hash: A706BA1ECAB6A2AB18699FC0D7DD8C7DE36F290F Issued to: [my company] Issued by: Thawte Code Signing CA Expires: 4/23/2011 7:59:59 PM SHA1 hash: 7D1A42364765F8969E83BC00AB77F901118F3601 The signature is timestamped: 4/27/2010 10:19:19 AM Timestamp Verified by: Issued to: Thawte Timestamping CA Issued by: Thawte Timestamping CA Expires: 12/31/2020 7:59:59 PM SHA1 hash: BE36A4562FB2EE05DBB3D32323ADF445084ED656 Issued to: VeriSign Time Stamping Services CA Issued by: Thawte Timestamping CA Expires: 12/3/2013 7:59:59 PM SHA1 hash: F46AC0C6EFBB8C6A14F55F09E2D37DF4C0DE012D Issued to: VeriSign Time Stamping Services Signer - G2 Issued by: VeriSign Time Stamping Services CA Expires: 6/14/2012 7:59:59 PM SHA1 hash: ADA8AAA643FF7DC38DD40FA4C97AD559FF4846DE Number of files successfully Verified: 0 Number of warnings: 0 Number of errors: 1

    Read the article

  • What does the status code of the Perl interpreter mean?

    - by futureelite7
    Hi, This might sound slightly confusing, but please bear with me. I'm trying to execute a copy of the Perl interpreter using Java's Runtime.exec(). However, it returned error code 9. After running the file a few times, the perl interpreter mysteriously started to return code 253 with no changes in my command at all. What does code 253 / code 9 mean? A google search for perl interpreter's exit codes turned up nothing. Where can I find a list of exit codes for the Perl interpreter? Thanks!

    Read the article

  • How can I use Code Contracts in a C++/CLI project?

    - by Daniel Wolf
    I recently stumbled upon Code Contracts and have started using them in my C# projects. However, I also have a number of projects written in C++/CLI. For C# and VB, Code Contracts offer a handy configuration panel in the project properties dialog. For a C++/CLI project, there is no such panel. From the documentation, I got the impression that adding Code Contracts support to a C++/CLI project should be a simple matter of calling some external tools as part of the build process (namely ccrefgen.exe, cccheck.exe, and ccrewrite.exe). However, the number of command line options and restrictions concerning the call sequence have me somewhat intimidated. Can anybody point me to a simple way to run the Code Contracts tools as an automated part of the build process in Visual Studio?

    Read the article

  • How should I move my code from dev to production?

    - by Teddy
    I have created a PHP web-application. I have 3 environments: DEV, TEST, PROD. What's a good tool / business practice for me to move my PHP web-application code from DEV to TEST to the PROD environment? Realizing that my TEST environment still only connects to my TEST database; whereas, I need to PROD environment to connect to my PROD database. So the code is mostly the same, except that I need to change my TEST code once moved into PROD to connect to the PROD database and not TEST database. I've heard of people taking down Apache in such away that it doesn't allow new connections and once all the existing connections are idle it simply brings down the web server. Then people manually copy the code and then manually update the config files of the PHP application to also point to the PROD instance. That seems terribly dangerous. Does a best practice exists?

    Read the article

  • PHP: How should I move my code from dev to production?

    - by Teddy
    I have created a PHP web-application. I have 3 environments: DEV, TEST, PROD. What's a good tool / business practice for me to move my PHP web-application code from DEV to TEST to the PROD environment? Realizing that my TEST environment still only connects to my TEST database; whereas, I need to PROD environment to connect to my PROD database. So the code is mostly the same, except that I need to change my TEST code once moved into PROD to connect to the PROD database and not TEST database. I've heard of people taking down Apache in such away that it doesn't allow new connections and once all the existing connections are idle it simply brings down the web server. Then people manually copy the code and then manually update the config files of the PHP application to also point to the PROD instance. That seems terribly dangerous. Does a best practice exists?

    Read the article

  • Can I make Visual Studio's code completion window more like Eclipse (Java)?

    - by Matt
    Is it possible to make Visual Studio 2010's code completion window more like that of Eclipse (Java)? In particular, I'd love the code completion window to give me a variable's type, and a method's return type and expected parameters, without needing to hover the highlight over that particular variable/method. VS's code completion's little icons that indicate if something is a property, method etc are useful, but they just aren't enough.

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >