which brace style is better? [closed] - styles

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm a little confused which brace style is better?
This one?
if ( a > b)
{
c = d;
}
or this one?
if ( a > b) {
c = d;
}
I'm using the first one because I think it's easy to read, but I found it seems that many experts (or experience programmers) like to use the second style, the second one looks like more professional (isn't is?). I know both styles are OK, but in your opinion, which one is better for a programmer? Your reasons? Thank you a lot!

Do whatever is right for you, unless you program in a team. In that case, follow whatever coding style you all agree on.

I personally use the second one, bu most IDEs' auto-formatters will use the first one. But it's just so minor difference that... I doubt that somebody would actually care.

Related

How to select the programming language? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a navigation providing interface, where in given the starting and destination points, and somehow the map of the street maybe, then the path is chosen based on the map, i.e. if a way is found then move in the direction, or if some blockage is found, or if the path will not lead to the desired destination then check for some other path maybe.
Now what programming language will be the best for it? I have worked with C only till now. Will it be all right for me to code in C only?
Is there anything else I need to take care before I take up this project? (Apart from the implementation issues).
Thanks.
Look, the best thing to do is to just start coding and find out. If you are not experienced, it's better to use the language you're familiar with rather than learn a new one. At the end of the day, you can achieve most tasks with most languages.
It's not so much what you use but how you use it.
In terms of the path-finding implementation, you might want to start by looking at A-star or Dijkstra's algorithm.

How do you prefer to split your multi-part program? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Having a program that has several distinct parts is usual.By part I mean a graphical part that has its own windows and functionalities.(About non graphical part, I think creating a library is the preferable solution)
How do you prefer to separate them ?
Is it better to make each of them a static library and use them in the main program?
Or the better solution is to create an executable file of each one and load them in the main program?
Or even better solution?
I suggest that you read Code Complete or something simlar. This book and others go into the best practices or even how to know which of the best practices you should look into when you create a product.
The problem is one of scope. You need to know your specifications and the parts that join together, as well as which design practices you are going to use before you can answer this question.
I am also inclined to think that there is no right or wrong answer (depending on HOW wrong you are) and that no-one else can answer that question for you, especially since you are likely to be one of the main players in maintaining the code.
Hope that gives you some food for thought :-)

Should I learn a new programming language? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have dealt and used JavaScript and am quite comfortable with it. However I was wondering if I should learn another one. Is there another language out there that used more widely or has more use in the business industry? And could you also recommend a good book for it?
Should you learn a new programming language?
Yes, you surely should.
Which one then?
I don't know. Why don't you pick one related to your expertise? Or something wildly different from what you know.
Which book is the best one?
Go to the library or a book shop. Flip some books through. Most likely, one of those books is good enough. But nothing beats learning to look up API reference on the net.
EDIT: Question from the comments:
What's the most popular and widely used?
You can use the TIOBE Community Index to look up popular programming languages. However, you shouldn't use that as a deciding factor as things may differ locally to you. I've never done C professionally (which is apparently the most "popular" language according to TIOBE), so it all depends on what you want to do.

Is Vim really that good? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I had to see what all the fuss was about Vim so tried it out for a little while; built a whole site in it. In the end I decided I was less productive.
So my question is: is Vim really that good or is it just one of those ultra-nerdy things people want to use so they can say: "I use Vim". Vim seems a little cumbersome to me. I know it's supposed to be lean but I think the years development and the mass of contributes has left it untidy. Am I wrong? Should I stick it out with Vim? What are the advantages of Vim?
How I learn to stop worrying and love VIM
Hope this helps.

What programming language is this? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
We're trying to script a CAD program, and this is the example for controlling the date in our design slugs, but I don't even know what language it is to know what to do with it.
! LIBEDATE
def &d$ &ret$
set &d$ = rstr(`/`,` `,#d$);
set &ret$ = word(&d$,2),`/`,word(&d$,1),`/`,subs(word(&d$,3), -2, 2)
What CAD is it? Almost all the ancient CADs have their own (typically weird and ill-designed) scripting languages. Can it be one of the Tribon products?
It might be AutoCAD Lisp
I thought it might be Tcl, but I don't any more... sorry (and thanks Johannes).
Looks like it might be some kind of macro language maybe? Lua or similar.
Would it be Python?

Resources