Search Results

Search found 4835 results on 194 pages for 'practice'.

Page 29/194 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Is what GitHub is doing here a good practice?

    - by orokusaki
    If you view this URL, you'll see that GitHub is posting all sorts of technical information. Is this a good practice so that users can email info to you about bugs, etc? http://waitdownload.github.com/cheetahtemplate-cheetah-v2.4.2-0-gd20b523.zip It's at least a good design for an error page.

    Read the article

  • Problem solving/ Algorithm Skill is a knack or can be developed with practice?

    - by KaluSingh Gabbar
    Every time I start a hard problem and if can not figure out the exact solution or can not get started, I get into this never ending discussion with myself, as below: That problem solving/mathematics/algorithms skills are gifted (not that you can learn by practicing, by practice, you only master the kind of problems that you already have solved before) only those who went to good schools can do it, as they learned it early. What are your thoughts, can one achieve awesomeness in problem solving/algorithms just by hard work or you need to have that extra-gene in you?

    Read the article

  • Best practice to maintain source code under version control with multiple companies?

    - by lastcosmonaut
    Hey, I'm wondering if there is any best practice for maintaining your source code under version control among different companies. In Open Source there is a maintainer, who receives patches, decides on them and applies them. But what about closed sourced projects where different companies get different workloads and just commit them to the trunk and branches? Is this maintainer concept applicable to a project on which multiple companies work on?

    Read the article

  • Is it good practice to separate code into blocks?

    - by LM
    If I have a method that does multiple, related things, is it good practice to stick each "thing" that the method does into a seperate block? Ex. { int var //Code } { int var //More Code } It would help reduce the number of local variables, and make the code more readable, but I'm not sure if it's a good idea.

    Read the article

  • Is it a good practice to have trim in setter?

    - by zibi
    I'm doing a code review and I noticed such a code: @Entity @Table(name = "SOME_TABLE") public class SomeReportClass { @Column(name = "REPORT_NUMBER", length = 6, nullable = false) private String reportNumber; ..... public String getReportNumber() { return reportNumber; } public void setReportNumber(String reportNumber) { this.reportNumber = StringUtils.trimToNull(reportNumber); } } Every time I see trimming inside of a setter I feel that its not the clearest solution - what is the general practice with that issue?

    Read the article

  • What's the Best Practice for Firing Manual OnClick Events?

    - by Tyler Murry
    Hey guys, I've got an XNA project that will be drawing several objects on the screen. I would like the user to be able to interact with those items. So I'm trying to build a method that checks to see which object the mouse is over, out of those which is the top most, and then fire an OnClick event for that object. Checking for the things above is not the problem, but where to actually put that logic is most of the issue. My initial feeling is that the checking should be handled by a master object - since it doesn't make sense for an object, who ideally knows only about itself, to determine information about the other objects. However, calling OnClick events remotely from the master object seems to be counter-intuitive as well. What's the best practice in this situation? Thanks, Tyler

    Read the article

  • Is Transport security a bad practice for the WCF service over the Internet?

    - by Sergey
    Hello, I have a WCF service accessible over the Internet. It has wsHttpBinding binding and message security mode with username credentials to authenticate clients. The msdn says that we should use message security for the Internet scenarios, because it provides end-to-end security instead of point-to-point security as Transport security has. What if i use transport security for the wcf service over the Internet? Is it a bad practice? Could my data be seen by malicious users? Thanks, Sergey

    Read the article

  • What programming technique / practice done by you was ahead of its time?

    - by Binoj Antony
    I once built a very good web application in ASP (classic) back in 2001 and extensively used XmlHttpRequest object in it. (I was lucky that the clients were only using IE, and only IE supported this object at that time). Then later when people started talking about AJAX in 2005, It felt good to have used something ahead (or early) of its time. Well, maybe this does not qualify to be listed as something done ahead of its time. Which programming technology/technique/practice have you done that was ahead of this time. One story per answer please. The title for this question taken from an opposite question here.

    Read the article

  • What's the best practice way to convert enum to string?

    - by dario
    Hi. I have enum like this: public enum ObectTypes { TypeOne, TypeTwo, TypeThree, ... TypeTwenty } then I need to convert this enum to string. Now Im doing this that way: public string ConvertToCustomTypeName(ObjectTypes typeObj) { string result = string.Empty; switch (typeObj) { case ObjectTypes.TypeOne: result = "This is type T123"; break; case ObjectTypes.TypeTwo: result = "This is type T234"; break; ... case ObjectTypes.TypeTwenty: result = "This is type last"; break; } return result; } Im quite sure that there is better way do do this, Im looking for some good practice solution. Thanks in advance.

    Read the article

  • JQuery. Hide elements before they rendered. Best practice

    - by Andrew Florko
    Hello everybody, I want to generate html layout with areas (divs, spans) that can be shown/hidden conditionally. These areas are hidden by default. If I call .hide method with jquery on document.ready these areas may blink (browsers render partially loaded documents). So I apply "display: none" style in html layout. I wonder what is the best practice to avoid blinking, because applying "display:none" breaks incapsulation rule - I know what jquery does with hide/show and use it. If jquery's hiding/showing implementation will change one day, I'll get the whole site unworkable. Thank you in advance

    Read the article

  • Best practice for storage and retrieval of error messages.

    - by ferrari fan
    What is a best practice for storing user messages in a configuration file and then retrieving them for certain events throughout an application? I was thinking of having 1 single configuration file with entries such as REQUIRED_FIELD = {0} is a required field INVALID_FORMAT = The format for {0} is {1} etc. and then calling them from a class that would be something like this public class UIMessages { public static final String REQUIRED_FIELD = "REQUIRED_FIELD"; public static final String INVALID_FORMAT = "INVALID_FORMAT"; static { // load configuration file into a "Properties" object } public static String getMessage(String messageKey) { // return properties.getProperty(messageKey); } } Is this the right way to approach this problem or is there some de-facto standard already in place?

    Read the article

  • Javascript : assign variable in if condition statement, good practice or not?

    - by Michael Mao
    Hi all: I moved one years ago from classic OO languages such like Java to Javascript. The following code is definitely not recommended (or even not correct) in Java: if(dayNumber = getClickedDayNumber(dayInfo)) { alert("day number found"); } function getClickedDayNumber(dayInfo) { dayNumber = dayInfo.indexOf("fc-day"); if(dayNumber != -1) //substring found { //normally any calendar month consists of "40" days, so this will definitely pick up its day number. return parseInt(dayInfo.substring(dayNumber+6, dayNumber+8)); } else return false; } Basically I just found out that I can assign a variable to a value in an if condition statement, and immediately check the assigned value as if it is boolean. For a safer bet, I usually separate that into two lines of code, assign first then check the variable, but now that I found this, I am just wondering whether is it good practice or not in the eyes of experienced javascript developers? Many thanks in advance.

    Read the article

  • How to add sort function for the table via ajax in ASP.NET MVC?What is the best practice.

    - by Eric Wang
    How to add sort function for the table via ajax in ASP.NET MVC?What is the best practice. If not use Ajax, it maybe much easier, just return View, but if use AJAX, what data structure should return?I just use Json to return the data, but i found each JSON data model return to the client browser, the JS have to use different code to parse it, remove the originally table rows, add the new data rows(because the column is different) etc. It make me crazy, is there any better way to do that? Thank you for any advice.

    Read the article

  • Switching Android SensorManager speed. What's a good practice?

    - by Johnson Tey
    Hello stackoverflow! I'm interested to switch between different sensor orientation speeds over time to optimize the program ie.. battery life. The routine may be called very often. I'm looking for the right practice. sensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); sensorManager.registerListener(sensorListener, SensorManager.SENSOR_ORIENTATION, SensorManager.SENSOR_DELAY_FASTEST); //... 1) unregister then register new speed OR //... 2) register new speed without registering sensorManager.unregisterListener(sensorListener); Should I unregister the listener and then register with SensorManager.SENSOR_DELAY_NORMAL OR Should I not bother unregistering the listener? thanks.

    Read the article

  • What's the best practice to "look up" Java Enums?

    - by Marcus
    We have a REST API where clients can supply parameters representing values defined on the server in Java Enums. So we can provide a descriptive error, we add this lookup method to each Enum. Seems like we're just copying code (bad). Is there a better practice? public enum MyEnum { A, B, C, D; public static MyEnum lookup(String id) { try { return MyEnum.valueOf(id); } catch (IllegalArgumentException e) { throw new RuntimeException("Invalid value for my enum blah blah: " + id); } } } Update: The default error message provided by valueOf(..) would be No enum const class a.b.c.MyEnum.BadValue. I would like to provide a more descriptive error from the API.

    Read the article

  • Is there a standard practice for storing default application data?

    - by Rox Wen
    Our application includes a default set of data. The default data includes coefficients and other factors that are unlikely to ever change but still need to be update-able by the user. Currently, the original default data is stored as a populated class within the application. Data updates are stored to an external XML file. This design allows us to include a "reset" feature to restore the original default data. Our rationale for not storing defaults externally [e.g. XML file] was to minimize the risk of being altered. The overall volume of data doesn't warrant a database. Is there a standard practice for storing "default" application data?

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >