Search Results

Search found 4835 results on 194 pages for 'coding hero'.

Page 3/194 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Long lines of text in source code [closed]

    - by ale
    Possible Duplicate: Is the 80 character limit still relevant in times of widescreen monitors? I used to set a vertical line set at 80 characters in my text editor and then I added carriage returns if the lines got too long. I later increased the value to 135 characters. I started using word wrap and not giving myself a limit but tried to keep lines short if I could because it took a lot of time shortening my lines. People at work use word wrap and don't give themselves a limit.. is this the correct way? What are you meant to do ? Many thanks.

    Read the article

  • How should I get my code ready for OpenSourcing it and putting it on GitHub?

    - by Sempus
    In a few weeks, my project is going to be finished and I want to start getting my code ready for other people to use it. I am going to be posting everything to GitHub so people can tweak it and hopefully make it better. I guess what I'm asking is, what would be the best way to make sure my code is sufficiently documented and worded right for other people to use? I know you should always comment everything and I'm going to be putting in the @params feature for every method, but are there any other tips in general?

    Read the article

  • Keep coding the wrong way to remain consistent? [closed]

    - by bwalk2895
    Possible Duplicate: Code maintenance: keeping a bad pattern when extending new code for being consistent, or not? To keep things simple let's say I am responsible for maintaining two applications, AwesomeApp and BadApp (I am responsible for more and no that is not their actual names). AwesomeApp is a greenfield project I have been working on with other members on my team. It was coded using all the fancy buzzwords, Multilayer, SOA, SOLID, TDD, and so on. It represents the direction we want to go as a team. BadApp is a application that has been around for a long time. The architecture suffers from many sins, namely everything is tightly coupled together and it is not uncommon to get a circular dependency error from the compiler, it is almost impossible to unit test, large classes, duplicate code, and so on. We have a plan to rewrite the application following the standards established by AwesomeApp, but that won't happen for a while. I have to go into BadApp and fix a bug, but after spending months coding what I consider correctly, I really don't want do continue perpetuate bad coding practices. However, the way AwesomeApp is coded is vastly different from the way BadApp is coded. I fear implementing the "correct" way would cause confusion for other developers who have to maintain the application. Question: Is it better to keep coding the wrong way to remain consistent with the rest of the code in the application (knowing it will be replaced) or is it better to code the right way with an understanding it could cause confusion because it is so much different? To give you an example. There is a large class (1000+ lines) with several functions. One of the functions is to calculate a date based on an enumerated value. Currently the function handles all the various calculations. The function relies on no other functionality within the class. It is self contained. I want to break the function into smaller functions (at the very least) and put them into their own classes and hide those classes behind an interface (at the most) and use the factory pattern to instantiate the date classes. If I just broke it out into smaller functions within the class it would follow the existing coding standard. The extra steps are to start following some of the SOLID principles.

    Read the article

  • Best approach for coding ?

    - by ahmed
    What should or how should I decide the best approach for coding as a smart programmer. I have just started programming last year in VB, and I keep on listening this statement. But I never could find by myself to choose the best approach for coding. When I search for a coding example on internet I find different types of approach to achieve the same target. So help me finding the best approach. (asp.net,vb.net)

    Read the article

  • What can I do to speed up my HTC Hero?

    - by Nick Bolton
    When I first got my HTC Hero phone it was very fast. But after a couple of weeks it's become slow. Typically (on any device), I've noticed that this is caused by having too much running at once... Is there a way I can limit the number of applications that are open? I think there's a task manager application in the market, so I'll try this. Does anyone have any further suggestions?

    Read the article

  • How can I promote clean coding at my workplace?

    - by Michael
    I work with a lot of legacy Java and RPG code on an internal company application. As you might expect, a lot of the code is written in many different styles, and often is difficult to read because of poorly named variables, inconsistent formatting, and contradictory comments (if they're there at all). Also, a good amount of code is not robust. Many times code is pushed to production quickly by the more experienced programmers, while code by newer programmers is held back by "code reviews" that IMO are unsatisfactory. (They usually take the form of, "It works, must be ok," than a serious critique of the code.) We have a fair number of production issues, which I feel could be lessened by giving more thought to the original design and testing. I have been working for this company for about 4 months, and have been complimented on my coding style a couple of times. My manager is also a fan of cleaner coding than is the norm. Is it my place to try to push for better style and better defensive coding, or should I simply code in the best way I can, and hope that my example will help others see how cleaner, more robust code (as well as aggressive refactoring) will result in less debugging and change time?

    Read the article

  • How to convincing Programmers that 'being in the zone' [coding] isn't always beneficial for the project?

    - by hawkeye
    In this book review: http://books.slashdot.org/story/11/06/13/1251216/Book-Review-The-Clean-Coder?utm_source=slashdot&utm_medium=twitter Chapter 4 talks about the coding process itself. One of the hardest statements the book makes here is to stay out of "the zone" when coding. Bob asserts that you lose parts of the big picture when you go down to that level. While I may struggle with that assertion, I do agree with his next statement that debugging time is expensive, so you should avoid having to do debugger-driven development whenever possible. He finishes the chapter with examples of pacing yourself (walking away, taking a shower) and how to deal with being late on your projects (remembering that hope is not a plan, and being clear about the impact of overtime) along with a reminder that it is good to both give and receive help, whether it be small questions or mentoring others. they talk about how 'being in the zone' - can actually be detrimental to the project. How do you convince your team members that this is the case?

    Read the article

  • I can't program because old coding style. This is normal to programmers?

    - by Renato Dinhani Conceição
    I'm in my first real job as programmer, but I can't solve any problems because of the coding style used. The code here: don't have comments don't have functions (50, 100, 200, 300 or more lines executed in sequence) uses a lot of if statements with a lot of paths has variables that make no sense (eg.: cf_cfop, CF_Natop, lnom, r_procod) uses a language I am unfamiliar with (Visual FoxPro 8 from 2002) I feel like I have gone back to 1970. Is it normal for a programmer familiar with OOP, clean-code, design patterns, etc. to have trouble with coding in this old-fashion way?

    Read the article

  • Coding events. What they actually are about, and are they worth it?

    - by BKC
    I'm a relatively new programmer, but am very much interested in it. I enrolled to this coding event (Yahoo! Hack India, to be precise), and got invited after the pre-coding contest. The event is like a contest where developers create an application in 24 hours, In group or individually. I've never been to such an event before, and certainly don't know anyone who did. So, here are my questions. First of all, is it worth it? What if we don't get any ideas in the first place to start with? I'm not actually a developer, I'm an electrical engineering student who just completed his 2nd semester. So will be able to match up to the level of other developers who will be there? Any other advice/suggestions Thank you in advance.

    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

  • Perl coding to PHP coding conversion

    - by Haskella
    Hi, I am trying to convert some Perl into PHP using this guideline: http://www.cs.wcupa.edu/~rkline/perl2php/#basedir Basically I know next to nothing about these two languages. Please give me some simple English explanation of what each line does, I'll be more than happy. Thanks for reading :D Perl CGI program: #!/usr/bin/perl -T use strict; use warnings; use CGI (); my %fruit_codes = ( apple => '2321.html', banana => '1234.html', coconut => '8889.html', ); my $c = CGI->new; my $fruit_parameter = $c->param('fruit_name'); my $iframe_document; if (defined $fruit_parameter and exists $fruit_codes{$fruit_parameter}) { $iframe_document = $fruit_codes{$fruit_parameter}; } else { $iframe_document = 'sorry-no-such-fruit.html'; } $c->header('application/xhtml+xml'); print <<"END_OF_HTML"; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Fruits</title> </head> <body> <form action="fruits.cgi"> <fieldset> <label for="fruit">Name of the fruit:</label> <input id="fruit" name="fruit_name" type="text" /> <input type="submit" /> </fieldset> </form> <iframe src="$iframe_document"> <a href="$iframe_document">resulting fruit</a> </iframe> </body> </html> END_OF_HTML 1;

    Read the article

  • RTF template coding, XSLT coding

    - by sujith
    I have the below requirement <data> <dataset1> <number>1</number> <name>red</name> <number>2</number> <name>Yellow</name> <number>3</number> <name>black</name> <number>4</number> <name>Violet</name> </dataset1> <dataset2> <index>1</index> <index>2</index> <index>3</index> <index>4</index> </dataset2> </data> I need to loop through dataset2 take the index value, compare it with the value of number tag in dataset1. If a match occurs then display value of corresponding name tag. I need to get the output in rtf format. Please give BI tags or relevent xslt code to do the same. Thanks in advance.

    Read the article

  • Coding guidelines + Best Practices?

    - by Chathuranga Chandrasekara
    I couldn't find any question that directly applies to my query so I am posting this as a new question. If there is any existing discussion that may help me, please point it out and close the question. Question: I am going to do a presentation on C# coding guidelines but it is not supposed to limit to coding standards. So I have a rough idea but I think I need to address good programing practices. So the contents will be something like this. Basic coding standards - Casing, Formatting etc. Good practices - Usage of Hashset over other data structures, String vs String Builder, String's immutability and using them effectively etc Really I would like to add more good practices (Especially to improve the performance.) So like to hear some more good practices to be used with C#. Any suggestions??? (No need of large descriptions :) Just the idea is sufficient.)

    Read the article

  • Coding guidelines + Best Practises?

    - by Chathuranga Chandrasekara
    I couldn't find any question that directly applies to my query so I am posting this as a new question. If there is any existing discussion that may help me, please point it out and close the question. Question: I am going to do a presentation on C# coding guidelines but it is not supposed to limit to coding standards. So I have a rough idea but I think I need to address good programing practices. So the contents will be something like this. Basic coding standards - Casing, Formatting etc. Good practices - Usage of Hashset over other data structures, String vs String Builder, String's immutability and using them effectively etc Really I would like to add more good practices (Especially to improve the performance.) So like to hear some more good practices to be used with C#. Any suggestions??? (No need of large descriptions :) Just the idea is sufficient.)

    Read the article

  • Arguments, local variables, and global variables coding convention in Python

    - by prosseek
    In python, there is no way to differentiate between arguments, local variables, and global variables. The easy way to do so might be have some coding convention such as Global variables start with _ and capital letter arguments end with with _ _Gvariable = 10 def hello(x_, y_): z = x_ + y_ Is this a Pythonian way to go? I mean, is there well established/agreed coding-standards to differentiate them in python?

    Read the article

  • Coding styles for html

    - by Hulk
    Hi, Please the coding standard followed for HTML .Please suggest links that the has the coding styles for html.(like Camel case or .....) <table> <tr> <td> Data </td> </tr> </table> Thanks..

    Read the article

  • Mood for coding

    - by dole doug
    When you don't have the mood for coding, how do you get it? Now I'm working on a project that I don't like at all, besides is a new programming language for me and I have to do it alone. So, the question is: how do you get the mood for coding? Any tips/tricks are welcome :)

    Read the article

  • How can I keep current with Python coding style?

    - by vartec
    I've been using Python since version 2.2. I do pick up new language constructs like for example with statement or dictionary/set comprehensions. However, I've realized that even though I'm being consistent with PEP-8, for existing constructs I'm using old style, rather than new style (for example except Exception, e instead of except Exception as e). Is there a resource which would have either most current style guide, or even better a list of changes in Python's coding style?

    Read the article

  • How Can I up my Street Cred in the coding world

    - by RedEye
    I know this isn't directly related to a specific coding problem. It's a more general programming question. I'm a n00b... Been coding for 1 year, and it's where I belong. I want to get hardcore and put everything I have into it. I started with C++ and now I'm into C#. I love it all. What can I do to up my game and up my respect in the programming world?

    Read the article

  • Coding with laptop and external screen - neck, back, comfort ...

    - by Xorty
    Guess I'm not the only one here coding on laptop + external keyboard + external screen. I can't really decide. Figure 1: Putting screen directly in front of (upright) my eyes and move laptop to the side. That feels like more comfortable but I can't really see so good to 15" laptop which is now quite away. Feels unused. Figure 2: Putting laptop in front of me and move external monitor on side. Feels like more efficient space usage, but I am afraid that my neck/back might start hurting since I need to turn my head often. What do you prefer? Some good advice? Sacrificing health is definitely no option here so that's why I'm worried and asking this silly question. Thanks

    Read the article

  • Recommended Reading for Polishing JavaScript coding style?

    - by wml653
    I've been coding in JavaScript for a while now and am fairly familiar with some of the more advanced coding features of the language (closures, self-executing functions, etc). So my question is, what advanced books/blogs/or anything else would be recommended to help tighten up my coding style? For example, recently I was coding something similar to: var x = ['a', 'b', 'c']; var exists = false; for(var i = 0; i < x.length; i++){ exists = x[i] === 'b' ? true : exists; } But found that the following condensed code would work better: var y = {'a':'', 'b':'', 'c':''}; var exists = 'b' in y; Both store the same value in 'exists', but the second is less common, but much cleaner. Any suggestions for where I should go to learn more tricks like this?

    Read the article

  • tips for fixing bad coding/dev habits ?

    - by dfafa
    i want to become a better coder....so i have decided to sign up for computing science program...maybe a formal education can assist me. i started working on smaller projects to learn but currently i have really bad coding/dev habits which is hindering my productivity as the codebase increases.... i have highlighted them and perhaps someone could make suggestions (or redirect to resources) or a more efficient method. most stuff that i made in the past were web apps. i usually develop with putty + nano...i just love the minimalist feel i use winscp and develop directly on my private web server...too lazy to do it on localhost and upload it later. i dont use subversion control...which one do i need ? sometimes ctrl +z doesn't work well. when i run out of ideas for naming variable, i use swear words instead. i swear a lot when i get stuck....how to deal with anger issue ? my codes look ugly with comments everywhere. would rather use procedural coding finds "thinking" in OO difficult and time consuming i "write first think later". refactors code only if i am getting paid for it. dislikes configuring linux distro, Apache, MySQL, scaling, designing graphics and layouts. does not like writing tests likes working alone. does not like sharing codes. has an econ degree dislikes reading other people's code would rather write it on my own it seems my only true desire is to translate my ideas to a working prototype as fast as possible....it seems like i am very uninterested in the other details...could it be that i am not cut out to be a coder after all ? is going back to study comp sci a bad idea ?

    Read the article

  • Should we encourage coding styles in favor of developer's autonomy, or discourage it in favor of consistency?

    - by Saeed Neamati
    A developer writes if/else blocks with one-line code statements like: if (condition) // Do this one-line code else // Do this one-line code Another uses curly braces for all of them: if (condition) { // Do this one-line code } else { // Do this one-line code } A developer first instantiates an object, then uses it: HelperClass helper = new HelperClass(); helper.DoSomething(); Another developer instantiates and uses the object in one line: new HelperClass().DoSomething(); A developer is more easy with arrays, and for loops: string[] ordinals = new string[] {'First', 'Second', 'Third'}; for (i = 0; i < ordinals.Length; i++) { // Do something } Another writes: List<string> ordinals = new List<string>() {'First', 'Second', 'Third'}; foreach (string ordinal in ordinals) { // Do something } I'm sure that you know what I'm talking about. I call it coding style (cause I don't know what it's called). But whatever we call it, is it good or bad? Does encouraging it have an effect of higher productivity of developers? Should we ask developers to try to write code the way we tell them, so to make the whole system become style-consistent?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >