Search Results

Search found 15210 results on 609 pages for 'technical writing'.

Page 184/609 | < Previous Page | 180 181 182 183 184 185 186 187 188 189 190 191  | Next Page >

  • What is a good way to comment if-else-clauses?

    - by acme
    Whenever I'm writing a typical if-else-construct in any language I wonder what would be the best way (in terms of readability and overview) to add comments to it. Especially when commenting the else clause the comments always feel out-of-place for me. Say we have a construct like this (examples are written down in PHP): if ($big == true) { bigMagic(); } else { smallMagic() } I could comment it like this: // check, what kind of magic should happen if ($big == true) { // do some big magic stuff bigMagic(); } else { // small magic is enough smallMagic() } or // check, what kind of magic should happen // do some big magic stuff if ($big == true) { bigMagic(); } // small magic is enough else { smallMagic() } or // check, what kind of magic should happen // if: do some big magic stuff // else: small magic is enough if ($big == true) { bigMagic(); } else { smallMagic() } What are your best-practice examples for commenting this?

    Read the article

  • Where can I learn to write my own database?

    - by Buttons840
    I'm interested in writing my own database - a triple-store. Are there any good resources to help with the challenges of such a project? Or more generally: How can I learn to write my own database? Some specific issues I'm unsure of: How is the data actually stored on the file-system? A flat-file seems easy enough, but a database is a lot more then a flat-file. What kinds of things are typically stored (or cached) in memory? How are indexes created and stored? How is ACID compliance achieved? Etc. This is a big topic, but knowing how to store large amounts of data in a reliable way is good to know. (My investigation into existing triple-stores was summarized back in 2008; not much has changed in 4 years it seems. This is why I want write my own.)

    Read the article

  • Learning the nuances of a language (C++)

    - by prelic
    So I'm a recent college graduate, and I really enjoy working in C++; I worked with it a lot in school, and would like to pursue a career writing in C or C++. The problem I'm having is that I'm trying to learn the nuances of C++. I'm not talking about the basics, or even advanced concepts like templates, namespaces, etc...I'm talking about the real nitty-gritty stuff like undefined behavior and stuff like that. When I'm interviewing, and they put a bizarre piece of C++ code in front of me, and ask me what the output will be, I want to be able to nail those questions. Obviously experience is a great way to learn, but when I write code for practice, I [obviously] know what it does. Reading open-source projects have been good practice, but I find that there tends to be an enormous learning curve just understanding the organization of the code (because the projects tend to be large). So basically what I'm asking is, what should I do now? Any tips are greatly appreciated!

    Read the article

  • What does backup procedures and troubleshooting guidelines mean for a system

    - by Podolski
    I am writing the documentation for a piece of software which I have made but I don't understand what it means in some aspects. It asks me to write about backup procedures but what exactly does this mean? Does this mean like backing up the database on another hosting service or something else entirely? I am dumbfounded by what troubleshooting guidelines are as well. If you have any idea what this could mean feel free to give your insight even if you aren't 100% sure in case it could spark what it means inside of me. Thanks.

    Read the article

  • Need some advice on CLI design, I need to provide simple but powerful command line options

    - by howtechstuffworks
    I am writing a utility that runs on RHEL5 command line. I need my command line options to be simple but powerful. I looked at the various UNIX utilities to get an idea of how simple command line utilities have to be. Do you guys suggest any documents/links that talk about command line etiquette? I am modelling my utility on top of LVM (that's all the info I can give for now). I know it's a software engineering question, but I thought it would be appropriate to post here. Please advise.... PS: I am not asking for details about getopt or command line utility parsers.....

    Read the article

  • Should I force users to update an application?

    - by Brian Green
    I'm writing an application for a medium sized company that will be used by about 90% of our employees and our clients. In planning for the future we decided to add functionality that will verify that the version of the program that is running is a version that we still support. Currently the application will forcequit if the version is not among our supported versions. Here is my concern. Hypothetically, in version 2.0.0.1 method "A" crashes and burns in glorious fashion and method "B" works just fine. We release 2.0.0.2 to fix method A and deprecate version 0.1. Now if someone is running 0.1 to use method B they will be forced to update to fix something that isn't an issue for them right now. My question is, will the time saved not troubleshooting old, unsupported versions outweigh the cost in usability?

    Read the article

  • ToC for the Book Club RIA Services Application

    Earlier this week, I published the RIA Services Essentials project on CodePlex to share some sample code. The first sample included is an updated version of the Book Club application. This application has become sort of a reference application. It was written to demonstrate some aspects of writing a semi-real-worldish application (note that it is still very much a demo app), but more importantly, demonstrating how you can use RIA Services effectively by going beyond the basics. As such, it isn't...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • What is the best agile project management technique for developing innovative software systems?

    - by user654019
    I am involved with the development of innovative software. The development is innovative since we don't know how to develop it and what algorithm should we use to implement and nobody else did it before. The process consists of several stages of studying books/papers, suggesting algorithms, writing prototypes and comparing the result with actual data. We hope that after some iteration, we converge to a valid software system. What is the best project management approach that we can use? Is there any project management software for these types of projects?

    Read the article

  • DRY, string, and unit testing

    - by Rodrigue
    I have a recurring question when writing unit tests for code that involves constant string values. Let's take an example of a method/function that does some processing and returns a string containing a pre-defined constant. In python, that would be something like: STRING_TEMPLATE = "/some/constant/string/with/%s/that/needs/interpolation/" def process(some_param): # We do some meaningful work that gives us a value result = _some_meaningful_action() return STRING_TEMPLATE % result If I want to unit test process, one of my tests will check the return value. This is where I wonder what the best solution is. In my unit test, I can: apply DRY and use the already defined constant repeat myself and rewrite the entire string def test_foo_should_return_correct_url(): string_result = process() # Applying DRY and using the already defined constant assert STRING_TEMPLATE % "1234" == string_result # Repeating myself, repeating myself assert "/some/constant/string/with/1234/that/needs/interpolation/" == url The advantage I see in the former is that my test will break if I put the wrong string value in my constant. The inconvenient is that I may be rewriting the same string over and over again across different unit tests.

    Read the article

  • Is it okay to introduce LESS to not so savvy UI Designers?

    - by Jason Nathan
    I just got a job as lead developer and I thought it would be best to seek the expertise of my peers (that's you) before proceeding! I had the opportunity to review my designers and they are mostly photoshop pros with dreamweaver as their main HTML/CSS editor. A more visual experience. I, on the other hand, have had much experience hand-writing all my code. From HTML markup to CSS. From my understanding, my designers have basic CSS knowledge and I am considering a simple 101 style set of tutorials for them to get a better grasp of markup before I moved into more advanced topics like accessibility and microformat markup. We need to get started up quickly. Do you think it's okay to dive into LESS from the get-go?

    Read the article

  • What are some concise and comprehensive introductory guide to unit testing for a self-taught programmer [closed]

    - by Superbest
    I don't have much formal training in programming and I have learned most things by looking up solutions on the internet to practical problems I have. There are some areas which I think would be valuable to learn, but which ended up both being difficult to learn and easy to avoid learning for a self-taught programmer. Unit testing is one of them. Specifically, I am interested in tests in and for C#/.NET applications using Microsoft.VisualStudio.TestTools in Visual Studio 2010 and/or 2012, but I really want a good introduction to the principles so language and IDE shouldn't matter much. At this time I'm interested in relatively trivial tests for small or medium sized programs (development time of weeks or months and mostly just myself developing). I don't necessarily intend to do test-driven development (I am aware that some say unit testing alone is supposed to be for developing features in TDD, and not an assurance that there are no bugs in the software, but unit testing is often the only kind of testing for which I have resources). I have found this tutorial which I feel gave me a decent idea of what unit tests and TDD looks like, but in trying to apply these ideas to my own projects, I often get confused by questions I can't answer and don't know how to answer, such as: What parts of my application and what sorts of things aren't necessarily worth testing? How fine grained should my tests be? Should they test every method and property separately, or work with a larger scope? What is a good naming convention for test methods? (since apparently the name of the method is the only way I will be able to tell from a glance at the test results table what works in my program and what doesn't) Is it bad to have many asserts in one test method? Since apparently VS2012 reports only that "an Assert.IsTrue failed within method MyTestMethod", and if MyTestMethod has 10 Assert.IsTrue statements, it will be irritating to figure out why a test is failing. If a lot of the functionality deals with writing and reading data to/from the disk in a not-exactly trivial fashion, how do I test that? If I provide a bunch of files as input by placing them in the program's directory, do I have to copy those files to the test project's bin/Debug folder now? If my program works with a large body of data and execution takes minutes or more, should my tests have it do the whole use all of the real data, a subset of it, or simulated data? If latter, how do I decide on the subset or how to simulate? Closely related to the previous point, if a class is such that its main operation happens in a state that is arrived to by the program after some involved operations (say, a class makes calculations on data derived from a few thousands of lines of code analyzing some raw data) how do I test just that class without inevitably ending up testing that class and all the other code that brings it to that state along with it? In general, what kind of approach should I use for test initialization? (hopefully that is the correct term, I mean preparing classes for testing by filling them in with appropriate data) How do I deal with private members? Do I just suck it up and assume that "not public = shouldn't be tested"? I have seen people suggest using private accessors and reflection, but these feel like clumsy and unsuited for regular use. Are these even good ideas? Is there anything like design patterns concerning testing specifically? I guess the main themes in what I'd like to learn more about are, (1) what are the overarching principles that should be followed (or at least considered) in every testing effort and (2) what are popular rules of thumb for writing tests. For example, at one point I recall hearing from someone that if a method is longer than 200 lines, it should be refactored - not a universally correct rule, but it has been quite helpful since I'd otherwise happily put hundreds of lines in single methods and then wonder why my code is so hard to read. Similarly I've found ReSharpers suggestions on member naming style and other things to be quite helpful in keeping my codebases sane. I see many resources both online and in print that talk about testing in the context of large applications (years of work, 10s of people or more). However, because I've never worked on such large projects, this context is very unfamiliar to me and makes the material difficult to follow and relate to my real world problems. Speaking of software development in general, advice given with the assumptions of large projects isn't always straightforward to apply to my own, smaller endeavors. Summary So my question is: What are some resources to learn about unit testing, for a hobbyist, self-taught programmer without much formal training? Ideally, I'm looking for a short and simple "bible of unit testing" which I can commit to memory, and then apply systematically by repeatedly asking myself "is this test following the bible of testing closely enough?" and then amending discrepancies if it doesn't.

    Read the article

  • Will C++ remain viable for game engines in somewhat distant future?

    - by samual
    C++11 has opened ways, which were only dreamt by the C++ programmers. It has been three years since I have been learning C++, and I am going well. Now I want to get into vedio games. Every core of the game code I saw, was monstourously writtern in C++. My question is - If I get into serious game engine dev, and perfecting it would take, maybe say 10 years, would we still be writing game engines in C++ ?(newer standard) Or, will John Carmack, write id tech 7 in c++? note - I am strictly talking about game engines.

    Read the article

  • When profiling a function for time use, what information is desirable?

    - by AaronMcSmooth
    I'm writing a program similar to Python's timeit module. The idea is to time a function by executing it anywhere from 10 to 100,000 times depending on how long it takes and then report results. I've read that the most important number is the minimum execution time because this is the number that best reflects how fast the machine can run the code in question in the absence of other programs competing for processor time and memory. This argument makes sense to me. Would you be happy with this? Would you want to know the average time or the standard deviation? Is there some other measure that you consider more important?

    Read the article

  • What did he or she do to enchant you? What was the feeling like? [closed]

    - by Pierre 303
    Guy Kawasaki, the famous author of The Art Of The Start is writing a new book about Enchantment (will be called Art Of Enchantment). He is asking stories about your employees, your things or even websites you visit. What about your colleagues? I need examples of a programmer (you), getting enchanted by another colleague, programmer, analyst, tester (must be within your team). UPDATE: The book is out! http://www.amazon.com/Enchantment-Changing-Hearts-Minds-Actions/dp/1591843790/ref=sr_1_2?ie=UTF8&qid=1298106612&sr=8-2

    Read the article

  • How to remove text from file icons ?

    - by Jesse
    I am fairly new to Ubuntu (Linux). I noticed when creating a .java file or .py gives me an icon, however when I start writing code it overrides the thumbnail into showing text. Is there a way to disable this silly feature ? When I installed Linux Mint on the VM I noticed I was able to accomplish this task by unchecking "Show text in icon". I know they use Namo as their file manager. I read this thread and it did not work. How to stop Nautilus from creating thumbnails of specific file types?

    Read the article

  • How can I handle this string concatenation in C in a reusable way

    - by hyphen this
    I've been writing a small C application that operates on files, and I've found that I have been copy+pasting this code around my functions: char fullpath[PATH_MAX]; fullpath[0] = '\0'; strcat(fullpath, BASE_PATH); strcat(fullpath, subdir); strcat(fullpath, "/"); strcat(fullpath, filename); // do something with fullpath... Is there a better way? The first thought that comes to mind is to create a macro but I'm sure this is a common problem in C, and I'm wondering how others have solve it.

    Read the article

  • How to clean launch a GUI app via the Terminal (so it doesn't wait for termination)?

    - by Peter.O
    Some GUI apps launch cleanly via the Terminal command line. Some don't, and they cause the Terminal to wait for the app to terminate. ...and even then, some don't "release" the command line. The mysterious ampersand "&" suffix, seems to cause the terminal to put the process into the background... (but I'm not sure what happens there). Is there a way to launch an app via the Terminal, so that there is no "hang on" effect? ... just like launching something via F2. I'd like to have the command line available again, immediately (without something still in the background and writing out system message in the terminal).

    Read the article

  • Re-sizing the form without scaling the GUI

    - by Bmoore
    I am writing a turn based strategy game in C#. My GUI implementation consists of class that extends Form containing a class that extends Panel. When I render the GUI I draw to the paint method in the panel. I am trying to figure out what is the best way for handling form re-size events. I know I want a minimum window size, but I would prefer to not have a maximum or a set size. Ideally the GUI would reveal more/less of the map as the user changes the window size. I would like to avoid scaling the graphics if at all possible. What is the best way to handle re-size events?

    Read the article

  • How to Do htaccess 301 Redirect from Old Filename Pattern to New Filename Pattern?

    - by user249493
    I have a bunch of old files prefixed with "old-" (e.g. "old-abcde.php"). I need an htaccess rule to set up a 301 redirect so that any request for a file starting with "old-" goes to its corresponding new version (e.g. "abcde.php"). To be clear, I have many files, not just one, so I can't do a literal filename match. I basically just need to strip off the "old-" from request and redirect to the version without it. I know I probably just need a simple regular expression, but I'm not good at writing them. Can anyone provide assistance?

    Read the article

  • How to get familiar with "what happens underneath of Java"?

    - by FidEliO
    I did not study CS nor IT. I just became a developer, now working with Java. Actually, since I now work with a big company writing high-scalable web applications, I think I need to be better with details. I have no understanding of what happens underneath of Java. Java Performance, Server-Side Java might be the buzz words?!! I am very poor with those more of low-level details but I do not know where to look honestly. I started looking for some keywords in Amazon, ended up reading books like "pragmatic programmer", "clean code", "code complete" which IMO they are not what I am looking for. Could you please give me some learning resources (books, articles, blog posts, online trainings) for this matter? I also read this post as well: Approaching Java/JVM internals But I think I need a pre-step before jumping into the OpenJDK, right?!

    Read the article

  • Installing SQL Server 2012 on Windows 2012 Server

    - by andyleonard
    In Want to Learn SQL Server 2012? I wrote about obtaining a fully-featured version of SQL Server 2012 (Developer Edition). This post represents one way to install SQL Server 2012 Developer Edition on a Hyper-V virtual machine running the Windows 2012 Server Standard Edition operating system. This is by no means exhaustive. My goal in writing this is to help you get a default instance of SQL Server 2012 up and running. I do not cover setting up the Hyper-V virtual machine. I begin after loading the...(read more)

    Read the article

  • What's Your Method of not forgetting the end brackets, parentheses

    - by JMC Creative
    disclaimer: for simplicity sake, brackets will refer to brackets, braces, quotes, and parentheses in the couse of this question. Carry on. When writing code, I usually type the beginning and end element first, and then go back and type the inner stuff. This gets to be a lot of backspacing, especially when doing something with many nested elements like: jQuery(function($){$('#element[input="file"]').hover(function(){$(this).fadeOut();})); Is there a more efficient way of remembering how many brackets you've got open ? Or a second example with quotes: <?php echo '<input value="'.$_POST['name'].'" />"; ?>

    Read the article

  • Are Promises/A a good event design pattern to implement even in synchronous languages like PHP?

    - by Xeoncross
    I have always kept an eye out for event systems when writing code in scripting languages. Web applications have a history of allowing the user to add plugins and modules whenever needed. In most PHP systems you have a global/singleton event object which all interested parties tie into and wait to be alerted to changes. Event::on('event_name', $callback); Recently more patterns like the observer have been used for things like jQuery. $(el).on('event', callback); Even PHP now has built in classes for it. class Blog extends SplSubject { public function save() { $this->notify(); } } Anyway, the Promises/A proposal has caught my eye. It is designed for asynchronous systems, but I'm wondering if it is also a good design to implement now that even synchronous languages like PHP are changing. Combining Dependency Injection with Promises/A seems it might be the best combination for handling events currently.

    Read the article

  • On what name should I claim copyright in open source software?

    - by ONOZ
    When I want to use the Apache 2.0 licence in my project, I should include this in the comments of my source code: Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. What name should I fill in for [name of copyright owner]? I am currently working alone on this project, but I'm going to release the source code so there might be other contributors in the near future.

    Read the article

  • Deleted files not increasing available free space on Ubuntu (as reported by df -h)

    - by Homunculus Reticulli
    I am writing data munging scripts (python and bash), to munge data and import large quantities of text files into a database. I am currently in the test phase, so I am generating several K's of files and deleting them (the files consume about 20G of space). After a test run, I delete the files (sometimes without having imported into the database). I notice that there is a steady decrease in the amount of free space on my disk (as reported by df -h). I don't understand this, as I use rm * (in the data directory), and in the cases where I use Nautilus, I empty the Trash bin as well. Similarly, I notice that when I import the data into the (postgresql) database, and then delete the data from the tables using DELETE FROM tablename;, the size consumed in the postgresql data directory does not go down either. Currently, I have lost approximately 200G from hard drive, and I need to reclaim that - but don't know what to do to reclaim it - any ideas?. I am running Ubuntu 10.0.4 LTS + postgresql 8.4

    Read the article

< Previous Page | 180 181 182 183 184 185 186 187 188 189 190 191  | Next Page >