Search Results

Search found 88709 results on 3549 pages for 'code efficiency'.

Page 23/3549 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • How do I get developers to treat test code as "real" code?

    - by womp
    In the last two companies I've been at, there is an overriding mentality among developers that it's okay to write unit tests in a throw-away style. Code that they would never write in the actual product suddenly becomes OK in the unit tests. I'm talking Rampant copying and pasting between tests Code styling rules not followed Hard-coded magic strings across tests No object-oriented thought or design for integration tests, mocks or helper objects (250 line single-function tests!) .. and so on. I'm highly dissatisfied with the quality of the test code. Generally we do not do code reviews on our test assemblies, and we also do not enforce style or code analysis of them on our build server. Is that the only way to overcome this inertia about test quality? I'm looking for ideas to take to our developers, without having to go to higher management saying that we need to use resources for enforcement of test quality (although I will if I have to). Any thoughts or similar experiences?

    Read the article

  • Tool to convert inline C# into a code behind file

    - by Jon Jones
    Hi I have a number of legacy web controls (ascx) that contains huge amounts of inline C#. The forms contain a number of repeated and duplicate code. Our first plan is to move the code into code behinds per file, then refactor etc... were doing this to upgrade the client to the latest version of their cms At the moment we are going to have to manually copy and paste from hundreds of files, create a code behind, copy the code, add the namespaces based on the client-side imports and then do any tidying up does anybody PLEASE know of a tool that can do the majority of this work for us ? Thanks

    Read the article

  • Excluding standard directories from code coverage results with C++/CLI

    - by brickner
    I have a Visual Studio 2010 .NET 4 solution with C# projects and a C++/CLI project. I use Visual Studio's built in unit tests and code coverage. Other than the fact that Visual Studio 2010 coverage tool for C++/CLI projects seems to be much weaker than Visual Studio 2008 coverage tool, I get weird results. For example, I get uncovered code in this file: c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring And some other files in that directory. I want to exclude this code from coverage results. Is there a way to put some exclude attributes on that code? If not, is there a different automatic way to exclude that code from coverage? If not, is there a way to use EXCLUDE option to exclude it? Can it be done automatically within Visual Studio without running the coverage tool from command prompt? Any other solutions?

    Read the article

  • Tools for code snippet execution

    - by nzpcmad
    By "code snippet execution", I mean the ability to write a few lines of code, run and test it without having to fire up an IDE and create a dummy project. It's incredibly useful for helping people with a small code sample without creating a project, compiling everything cleanly, sending them the code snippet and deleting the project. I'm not asking about the best code snippets or a snippet editor or where to store snippets! For C#, I use Snippet Compiler. For Java, I use Eclipse Scrapbook. For LINQ, I use LINQPad. Any suggestions for other (better?) tools? e.g. is there one for Java that doesn't involve firing up Eclipse? What about C?

    Read the article

  • Decoding equivalent assembly code of C code...

    - by puffadder
    Hi All, Wanting to see the output of the compiler (in assembly) for some C code, I wrote a simple program in C and generated its assembly file using gcc. The code is this: #include <stdio.h> int main() { int i = 0; if ( i == 0 ) { printf("testing\n"); } return 0; } The generated assembly for it is here (only the main function): _main: pushl %ebpz movl %esp, %ebp subl $24, %esp andl $-16, %esp movl $0, %eax addl $15, %eax addl $15, %eax shrl $4, %eax sall $4, %eax movl %eax, -8(%ebp) movl -8(%ebp), %eax call __alloca call ___main movl $0, -4(%ebp) cmpl $0, -4(%ebp) jne L2 movl $LC0, (%esp) call _printf L2: movl $0, %eax leave ret I am at an absolute loss to correlate the C code and assembly code. All that the code has to do is store 0 in a register and compare it with a constant 0 and take suitable action. But what is going on in the assembly ? Thanks in advance.

    Read the article

  • Visual Studios Team System 2008 Code Coverage Window Closes

    - by ThoughtCrhyme
    Trying to run the code coverage tool in Visual Studios for a set of unit tests. Adam from Think First, Code Later has had the same problem: I wanted to get the code coverage metrics for the project. Naturally, I fire up the solution in Visual Studio 2008, go to the Test menu, click Edit Test Run Configurations, and click Local Test Run. I then click Code Coverage to turn on code coverage for a given assembly and POOF the Local Test Run Configraution window just disappears. He recommends installing this hotfix to fix the problem, however a) when I run that hotfix I get the message “None of the products that are addressed by this software update are installed on this computer. Click Cancel to exit setup.” and b) there is no Silverlight in our solution. Any other ideas for a fix?

    Read the article

  • How to keep code maintainable after original programmer quit

    - by Stan
    Say if it's a 10 people project, 2-3 of the original programmer quit after the project has been release a stable version for a while. How to have the code maintainable in this case? My imagination is reviewing the code after the project goes to release version and keep review it afterwards? Maybe split into 2-3 small groups and have each group review part of the code. So at least 3-4 people are familiar with part of code. Does this work? How do companies deal with this issue? Usually how many percentage of time spent on reviewing the code? Please advise, thanks to community.

    Read the article

  • How to reduce virtual memory by optimising my PHP code?

    - by iCeR
    My current code (see below) uses 147MB of virtual memory! My provider has allocated 100MB by default and the process is killed once run, causing an internal error. The code is utilising curl multi and must be able to loop with more than 150 iterations whilst still minimizing the virtual memory. The code below is only set at 150 iterations and still causes the internal server error. At 90 iterations the issue does not occur. How can I adjust my code to lower the resource use / virtual memory? Thanks! <?php function udate($format, $utimestamp = null) { if ($utimestamp === null) $utimestamp = microtime(true); $timestamp = floor($utimestamp); $milliseconds = round(($utimestamp - $timestamp) * 1000); return date(preg_replace('`(?<!\\\\)u`', $milliseconds, $format), $timestamp); } $url = 'https://www.testdomain.com/'; $curl_arr = array(); $master = curl_multi_init(); for($i=0; $i<150; $i++) { $curl_arr[$i] = curl_init(); curl_setopt($curl_arr[$i], CURLOPT_URL, $url); curl_setopt($curl_arr[$i], CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_arr[$i], CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($curl_arr[$i], CURLOPT_SSL_VERIFYPEER, FALSE); curl_multi_add_handle($master, $curl_arr[$i]); } do { curl_multi_exec($master,$running); } while($running > 0); for($i=0; $i<150; $i++) { $results = curl_multi_getcontent ($curl_arr[$i]); $results = explode("<br>", $results); echo $results[0]; echo "<br>"; echo $results[1]; echo "<br>"; echo udate('H:i:s:u'); echo "<br><br>"; usleep(100000); } ?> Processor Information Total processors: 8 Processor #1 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #2 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #3 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #4 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #5 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #6 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #7 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Processor #8 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Speed 1995.120 MHz Cache 6144 KB Memory Information Memory for crash kernel (0x0 to 0x0) notwithin permissible range Memory: 8302344k/9175040k available (2176k kernel code, 80272k reserved, 901k data, 228k init, 7466304k highmem) System Information Linux server3.server.com 2.6.18-194.17.1.el5PAE #1 SMP Wed Sep 29 13:31:51 EDT 2010 i686 i686 i386 GNU/Linux Physical Disks SCSI device sda: 1952448512 512-byte hdwr sectors (999654 MB) sda: Write Protect is off sda: Mode Sense: 03 00 00 08 SCSI device sda: drive cache: write back SCSI device sda: 1952448512 512-byte hdwr sectors (999654 MB) sda: Write Protect is off sda: Mode Sense: 03 00 00 08 SCSI device sda: drive cache: write back sd 0:1:0:0: Attached scsi disk sda sd 4:0:0:0: Attached scsi removable disk sdb sd 0:1:0:0: Attached scsi generic sg4 type 0 sd 4:0:0:0: Attached scsi generic sg7 type 0 Current Memory Usage total used free shared buffers cached Mem: 8306672 7847384 459288 0 487912 6444548 -/+ buffers/cache: 914924 7391748 Swap: 4095992 496 4095496 Total: 12402664 7847880 4554784 Current Disk Usage Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 898G 307G 546G 36% / /dev/sda1 99M 19M 76M 20% /boot none 4.0G 0 4.0G 0% /dev/shm /var/tmpMnt 4.0G 1.8G 2.0G 48% /tmp

    Read the article

  • Suggestions for displaying code on webpages, MUST use <br> for newline

    - by bguiz
    Hi, I want to post code snippets online (wordpress.com blog) - and have its whitespace formatted nicely. See the answers suggested by this other SO question: Those would be OK, except that I like to copy code to clip board or clip entire pages using Evernote - and they use either the <pre> tag or <table> (or both) to format the code. So I end up with text whose newlines and white spaces ignored, e.g. string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">"; // single line comments // second single line override protected void OnLoad(EventArgs e) { if(Attributes["class"]&nbsp;!= null) { //_year.CssClass = _month.CssClass = _day.CssClass = Attributes["class"]; } base.OnLoad(e); } Which I find rather annoying myself. I find that if the code was formatted using <br> tags, they copy/ clip porperly, e.g. string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">"; // single line comments // second single line override protected void OnLoad(EventArgs e) { if(Attributes["class"]&nbsp;!= null) { //_year.CssClass = _month.CssClass = _day.CssClass = Attributes["class"]; } base.OnLoad(e); } I find this annoying myself, so I don't want to inflict it upon others when I post my own code. Please suggest methods of posting code snippets online that are able to do this. I would like to emphasise that syntax highlighting capability is secondary to correct white space markup. Thank you

    Read the article

  • php: how to return an HTTP 500 code on any error, no matter what

    - by Jake
    Hi guys. I'm writing an authentication script in PHP, to be called as an API, that needs to return 200 only in the case that it approves the request, and 403 (Forbidden) or 500 otherwise. The problem I'm running into is that php returns 200 in the case of error conditions, outputting the error as html instead. How can I make absolutely sure that php will return an HTTP 500 code unless I explicitly return the HTTP 200 or HTTP 403 myself? In other words, I want to turn any and all warning or error conditions into 500s, no exceptions, so that the default case is rejecting the authentication request, and the exception is approving it with a 200 code. I've fiddled with set_error_handler() and error_reporting(), but so far no luck. For example, if the code outputs something before I send the HTTP response code, PHP naturally reports that you can't modify header information after outputting anything. However, this is reported by PHP as a 200 response code with html explaining the problem. I need even this kind of thing to be turned into a 500 code. Is this possible in PHP? Or do I need to do this at a higher level like using mod_rewrite somehow? If that's the case, any idea how I'd set that up? Thanks for any help. Jake

    Read the article

  • Increasing Regex Efficiency

    - by cam
    I have about 100k Outlook mail items that have about 500-600 chars per Body. I have a list of 580 keywords that must search through each body, then append the words at the bottom. I believe I've increased the efficiency of the majority of the function, but it still takes a lot of time. Even for 100 emails it takes about 4 seconds. I run two functions for each keyword list (290 keywords each list). public List<string> Keyword_Search(HtmlNode nSearch) { var wordFound = new List<string>(); foreach (string currWord in _keywordList) { bool isMatch = Regex.IsMatch(nSearch.InnerHtml, "\\b" + @currWord + "\\b", RegexOptions.IgnoreCase); if (isMatch) { wordFound.Add(currWord); } } return wordFound; } Is there anyway I can increase the efficiency of this function? The other thing that might be slowing it down is that I use HTML Agility Pack to navigate through some nodes and pull out the body (nSearch.InnerHtml). The _keywordList is a List item, and not an array.

    Read the article

  • Reading Code - helpful visualizers and browser tools

    - by wishi_
    Hi! I find myself reading 10 times more code than writing. My IDEs all are optimized to make me edit code - with completion, code assist, outlines etc. However if I'm checking out a completely new project: getting into the application's logics isn't optimized with these IDE features. Because I cannot extend what I don't fully understand. If you for example check out a relatively new project, frama-c, you realize that it has got plugins that are helpful to gain insight into "unfamiliar code": http://frama-c.com/plugins.html - However of course the project has a different scope. What I'm fully aware of. I'm looking for something that does helpful things for code-reading. Like: providing a graph, - reverse engineering UML e g., showing variable scopes showing which parts are affected by attempted modifications visualizing data-flow semantics showing tag-lists of heavily utilized functions ... My hope is that something like that exists. - That there're some Eclipse plugins I don't know or that there's a code-browser that has some of these features?

    Read the article

  • How To Go About Updating Old C Code

    - by Ben313
    Hello: I have been working on some 10 year old C code at my job this week, and after implementing a few changes, I went to the boss and asked if he needed anything else done. Thats when he dropped the bomb. My next task was to go through the 7000 or so lines and understand more of the code, AND, to modularize the code somewhat. I asked him how he would like the source code modularized, and he said to start putting the old C code into c++ classes. Being a good worker, I nodded my head yes, and went back to my desk, where I sit now, wondering how in the world to take this code, and "modularize" it. Its already in 20 source files, each with its own purpose and function. in addition, there are three "main" structs. each of these stuctures has 30 plus fields, many of them being other, smaller sturcts. Its a complete mess to try to understand, but almost every single function in the program is passed a pointer to one of the structs, and uses the struct heavily. Is there any clean way for me to shoehorn this into classes? I am resolved to do it if it can be done, I just have no idea how to begin.

    Read the article

  • How to best integrate generated code

    - by Arne
    I am evaluating the use of code generation for my flight simulation project. More specifically there is a requirement to allow "the average engineer" (no offense I am one myself) to define the differential equations that describe the dynamic system in a more natural syntax than C++ provides. The idea is to devise a abstract descriptor language that can be easily understood and edited to generate C++ code from. This descriptor is supplied by the modeling engineer and used by the ones implementing and maintaining the simulation evironment to generate code. I've got something like this in mind: model Aircraft has state x1, x2; state x3; input double : u; input bool : flag1, flag2; algebraic double : x1x2; model Engine : tw1, tw2; model Gear : gear; model ISA : isa; trim routine HorizontalFight; trim routine OnGround, General; constant double : c1, c2; constant int : ci1; begin differential equations x1' = x1 + 2.*x2; x2' = x2 + x1x2; begin algebraic equations x1x2 = x1*x2 + x1'; end model It is important to retain the flexibility of the C language thus the descriptor language is meant to only define certain parts of the definition and implementation of the model class. This way one enigneer provides the model in from of the descriptor language as examplified above and the maintenance enigneer will add all the code to read parameters from files, start/stop/pause the execution of the simulation and how a concrete object gets instatiated. My first though is to either generate two files from the descriptor file: one .h file containing declarations and one .cpp file containing the implementation of certain functions. These then need to be #included at appropriate places [File Aircarft.h] class Aircraft { public: void Aircraft(..); // hand-written constructor void ReadParameters(string &file_name); // hand-written private: /* more hand wirtten boiler-plate code */ /* generate declarations follow */ #include "Aircraft.generated.decl" }; [File Aircraft.cpp] Aircarft::Aircraft(..) { /* hand-written constructer implementation */ } /* more hand-written implementation code */ /* generated implementation code follows */ #include "Aircraft.generated.impl" Any thoughts or suggestions?

    Read the article

  • jQuery bind efficiency

    - by chelfers
    I'm having issue with load speed using multiple jQuery binds on a couple thousands elements and inputs, is there a more efficient way of doing this? The site has the ability to switch between product lists via ajax calls, the page cannot refresh. Some lists have 10 items, some 100, some over 2000. The issue of speed arises when I start flipping between the lists; each time the 2000+ item list is loaded the system drags for about 10 seconds. Before I rebuild the list I am setting the target element's html to '', and unbinding the two bindings below. I'm sure it has something to do with all the parent, next, and child calls I am doing in the callbacks. Any help is much appreciated. loop 2500 times <ul> <li><input type="text" class="product-code" /></li> <li>PROD-CODE</li> ... <li>PRICE</li> </ul> end loop $('li.product-code').bind( 'click', function(event){ selector = '#p-'+ $(this).prev('li').children('input').attr('lm'); $(selector).val( ( $(selector).val() == '' ? 1 : ( parseFloat( $(selector).val() ) + 1 ) ) ); Remote.Cart.lastProduct = selector; Remote.Cart.Products.Push( Remote.Cart.customerKey, { code : $(this).prev('li').children('input').attr('code'), title : $(this).next('li').html(), quantity : $('#p-'+ $(this).prev('li').children('input').attr('lm') ).val(), price : $(this).prev('li').children('input').attr('price'), weight : $(this).prev('li').children('input').attr('weight'), taxable : $(this).prev('li').children('input').attr('taxable'), productId : $(this).prev('li').children('input').attr('productId'), links : $(this).prev('li').children('input').attr('productLinks') }, '#p-'+ $(this).prev('li').children('input').attr('lm'), false, ( parseFloat($(selector).val()) - 1 ) ); return false; }); $('input.product-qty').bind( 'keyup', function(){ Remote.Cart.lastProduct = '#p-'+ $(this).attr('lm'); Remote.Cart.Products.Push( Remote.Cart.customerKey, { code : $(this).attr('code') , title : $(this).parent().next('li').next('li').html(), quantity : $(this).val(), price : $(this).attr('price'), weight : $(this).attr('weight'), taxable : $(this).attr('taxable'), productId : $(this).attr('productId'), links : $(this).attr('productLinks') }, '#p-'+ $(this).attr('lm'), false, previousValue ); });

    Read the article

  • Duplicity Full Backup Lifetime and Efficiency

    - by Tim Lytle
    I'm trying to work up a backup strategy for some clients, and am leaning towards duplicity for remote backup (already use rdiff-backup for internal/on location backups). Is it reasonable to want a full backup every so often? Since duplicity increments forward, each incremental backup is relying on the previous increment, and all are relying heavily on the last full backup. Should that become corrupt, bad things happen. A related question: Does Duplicity test the incremental backups for consistency? Assuming I do want a full backup every so often, how efficiently does duplicity create that full backup? Can/does it check file signatures and copy unchanged data from previous full backups/increments? Basically creating a new 'full' archive transferring new/changed data and merging existing unchanged data? Right now my concern is that running a full backup is needed, but the consistent large bandwidth use of full backups will make this unreasonable for some clients.

    Read the article

  • Code signing issues.

    - by abc
    i have purchased a certificate from godaddy, i have that in .pfx format. i tried to convert it into .cer using IE and ff. using converted .cer file when i try to sign midlet. i am getting following error message "The KeyStore does not contain private key associated with this alias !!" "Cannot sign" how to get work done?

    Read the article

  • MS Securily Essentials efficiency / usage, suspicious processes

    - by biggvsdiccvs
    I recently noticed that my (originally pretty fast) Windows 7 Pro laptop started getting slow and using a lot of CPU power for no apparent reason. A full scan by Microsoft Security Essentials revealed nothing. After some investigation, I found multiple instances of a strange process called urpev.exe and a couple of similar exe files sitting in subdirectories of Users//AppData/Roaming (this particular one was in a folder called Xyceowme). Description: "Mescrosift Visaal Studie 2010". Company name: "Mesrosift Corporatien". Is it a virus or something? :) Now, all of these exe files were scheduled to be started from the Task Scheduler by tasks with names like "Security Center Update - 1291373911" and similar. My user name was listed as the author of the tasks. I disabled the tasks, restarted the computer in safe mode and moved all of the exe files to quarantine for further investigation. All of this was done last night. I just scanned the files with Security Essentials again (not updated since yesterday) in the quarantine location and this time it found PWS:Win32/Zbot.gen!plock in urpev.exe (but not in the other exe files, which are most likely viruses, too). Category: Password Stealer Description: This program is dangerous and captures user passwords. Another strange process is browser.exe (not chrome.exe) by Google Inc., described as Google Chrome. I uninstalled Chrome but it's still there. It runs out of Users\\AppData\LocalLow\UIVoice\ToolMedium\browser.exe and if I move it in safe mode, it just reappears there, and multiple instances run. Needless to say, it I kill it, it just runs again. Couldn't see anything in Task Scheduler, but found a couple of references to it in the Registry Editor: HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/LowRegistry/Audio/PolicyConfig/PropertyStore/ HKEY_USERS/S-1-5-21-1685709306-872053864-2599010960-1002/Software/Microsoft/Internet Explorer/LowRegistry/Audio/PolicyConfig/PropertyStore/ Maybe it's a legit process, but seems kind of strange. For the time being, I suspended the process and killed all of the child processes when I booted up the laptop. I used Security Essentials to scan the system periodically, but obviously it's not effective at least against one virus. I had the "real-time protection" turned off. Would it help if it were turned on and how much of a nuisance would it be? I wonder if there is a better alternative to Security Essentials. Over the years I've used multiple antivirus products at home and especially at work and was not very happy with any of them. Apparently, asking for software recommendations or comparisons is taboo here, but I will mention that I installed Malware Bytes and it was able to find an quarantine a bunch of suspicious files, and at least some of which were truly infected, but when it scans the bogus security center update executables from Mesrosift Corporatien, it finds nothing wrong. Also, any thoughts on the browser.exe mystery? Neither MS Security Essentials nor Malware Bytes found anything wrong with that file. However, after I ran a Malware Bytes scan and quarantined everything it found suspicious and rebooted the laptop, the process did not run.

    Read the article

  • Multitasking on iOS4 and its stated battery efficiency

    - by eml
    Apple stated that the reason multitasking didn't arrive before iOS4 is because they hadn't figured out how to do it right. Jobs stated at Apple WWDC 2010 that they now do and that they solved the problem of preserving battery performance regarding multitasking. Is iOS4's multitasking "feature" indeed more efficient regarding battery performance compared to Android? Have the Android developers managed to "do it right" too?

    Read the article

  • How do you change data from a qr code on a scanner [on hold]

    - by Malcolm Eaton
    I have a problem now with the QR bar codes on the Wheelie Bins we deliver. The scan was giving us the following .. RL0313550 Now due to some changes at the manufacturing plant they have had to add more data as follows. 1234567891,RL031550 We only need the "RL031550" can anyone let me know how to fix this. We use Intermec CN50 device with 2d Imager fitted, was hoping to fix this within the device settings.

    Read the article

  • What techniques are used in solving code golf problems?

    - by Lord Torgamus
    "Regular" golf vs. code golf: Both are competitions. Both have a well-defined set of rules, which I'll leave out for simplicity. Both have well-defined goals; in short, "use fewer hits/characters than your competitors." To win matches, athletic golfers rely on equipment Some situations call for a sand wedge; others, a 9-iron. techniques The drive works better when your feet are about shoulder width apart and your arms are relaxed. and strategies Sure, you could take that direct shortcut to the hole... but do you really want to risk the water hazard or sand bunker when those trees are in the way and the wind is so strong? It might be better to go around the long way. What do code golfers have that's analagous to athletic golfers' equipment, techniques and strategies? Sample answer to get this started: use the right club! Choose GolfScript instead of C#.

    Read the article

  • Introducing Code Map for Visual Studio 2012 September CTP

    - by krislankford
    As part of the Visual Studio 2012 CTP for September, Visual Studio got a little sexier at helping you discover and visualize your code. The introduction of the Code Map feature helps compliment the variety of other tools that are included with Visual Studio to help you analyze and visualize your projects and solutions. Code Map leverages the dgml format within Visual Studio that is currently used b the Architecture and Modeling tools. This is a nice addition that gets us from point A to point B a little faster. The great thing about Code Map is that you can gain access to the functionality from directly within your code from the context menu. This Code Map functionality is also context specific based on your cursor. You can evaluate and add items such as methods and variables directly to the Code Map window. As you add items the Code Map surface is updated to show your new item plus any relationships and dependencies that have been introduced in your code. Something that is also very nice is that the Code Map surface is interactive and allows you to use the F12 button (Go To Definition) which can help you navigate your code especially is you are adding items that span multiple files or projects. To get started all you have to do is go out and download the September CTP for Visual Studio 2012 located here. Happy Coding!   Code Map Window

    Read the article

  • So we've got a code review tool, now what can we use for software documents?

    - by Tini
    We're using Subversion as a full CM for code and also for related project documents. We have JIRA and Fisheye. When we wanted to add a peer review tool, we looked at and tested several candidates. Our weighted requirements included both code and document review, but ultimately, the integration with JIRA slanted the scores in Crucible's favor. Atlassian has slammed the door on ever supporting Word or PDF in Crucible. I've tested several workaround methods to make Crucible work for documents without success. (The Confluence/Crucible plug-in was deprecated by Atlassian, so that option is out, too.) I haven't found a plugin for Crucible that adds this functionality, so short of writing my own plug-in, Crucible for documents is unworkable. Word Track Changes doesn't provide a method for true collaboration and commenting. Adobe PDF Comment and Markup is interesting, but doesn't provide a great way to keep a permanent quality record of the conversation. We can't go cloud-based, our documents must be locally hosted on our own server only. We're only on Sharepoint 2007. Help! Anyone have a suggestion?

    Read the article

  • How do I parse a header with two different version [ID3] avoiding code duplication?

    - by user66141
    I really hope you can give me some interesting viewpoints for my situation, because I am not satisfied with my current approach. I am writing an MP3 parser, starting with an ID3v2 parser. Right now I`m working on the extended header parsing, my issue is that the optional header is defined differently in version 2.3 and 2.4 of the tag. The 2.3 version optional header is defined as follows: struct ID3_3_EXTENDED_HEADER{ DWORD dwExtHeaderSize; //Extended header size (either 6 or 8 bytes , excluded) WORD wExtFlags; //Extended header flags DWORD dwSizeOfPadding; //Size of padding (size of the tag excluding the frames and headers) }; While the 2.4 version is defined : struct ID3_4_EXTENDED_HEADER{ DWORD dwExtHeaderSize; //Extended header size (synchsafe int) BYTE bNumberOfFlagBytes; //Number of flag bytes BYTE bFlags; //Flags }; How could I parse the header while minimizing code duplication? Using two different functions to parse each version sounds less great, using a single function with a different flow for each occasion is similar, any good practices for this kind of issues ? Any tips for avoiding code duplication? Any help would be appreciated.

    Read the article

  • Rule of thumb for cost vs. savings for code re-use

    - by Styler
    Is it a good rule of thumb to always write code for the intent of re-using it somewhere down the road? Or, depending on the size of the component you are writing, is it better practice to design it for re-use when it makes sense with regards to time spent on it. What is a good rule of thumb for spending extra time on analysis and design on project components that have "some probability" of being needed later down the road for other things that may or may need this part. For example, if I have the need for project X to do things A, and B. A definitely needs to be written for re-use because it just makes sense to do so. B is very project specific at the moment, and I can hack it all together in a couple days to finish the project on time and give everyone kudos for being a great team, etc. Or if we say, lets spend a whole friggin' 2 weeks figuring out what project Y/Z might need this thing for and spend a load of extra time on on part B because someday we might need to use it on project Y/Z (where the savings will be realized). I'd imagine a perfect world situation would be a nicely crafted combination of project specific vs. re-use architected components given the project. However some code shops might feel it would be a great idea to write everything for the intention of using it at some point down the road.

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >