littleadv
  • Member for 10 years, 9 months
  • Last seen more than 5 years ago
18 answers
81 votes
8k views
How do you learn Regular Expressions?
Accepted answer
69 votes

I think that the knowledge of the Automata theory is critical for understanding. Once you understand what an automaton is, and how regular languages are defined, understanding the regular expressions ...

View answer
10 answers
135 votes
93k views
Why do most of us use 'i' as a loop counter variable?
67 votes

i - index. A temporary variable that is used for indexing loop iteration. If you already have an i, what's more natural than going to j, k, and so forth? In that context idx is often used as well. ...

View answer
39 answers
287 votes
71k views
Why don't all companies buy developers the best hardware?
56 votes

The difference of productivity between the "top-end" machines and "almost top-end" machines is negligible. The difference in price is significant. Not to mention the IT support for different machines ...

View answer
13 answers
36 votes
5k views
"Kill switch" in customer hosted environments, to protect payment?
46 votes

You're dealing with a lawyer, and you're not a lawyer. Get a lawyer, don't do anything to harm your client, without prior legal advice and proper representation. He'll sue your a** if you do that. To ...

View answer
13 answers
40 votes
10k views
Why and for what reasons developers may not like "daily scrum"?
Accepted answer
43 votes

I had experience participating in a "SCRUM" team with several employers. It appears to me that the managers take out the "daily scrum meeting" as the main point of SCRUM, and set it as the goal, ...

View answer
9 answers
34 votes
2k views
Why don't more companies hire remotely?
35 votes

I've worked remotely in a couple of companies over several years. Let me tell you something: it's not convenient. Both as a remote member of a team and as an employer of remote contractors. I wouldn't ...

View answer
14 answers
19 votes
3k views
University teaches DOS-style C++, how to deal with it
Accepted answer
34 votes

Math and programming are totally different things. Math is science, programming is technique. In academic world, programming is something you have to know so that you could deal with the real stuff, ...

View answer
6 answers
18 votes
22k views
Why pointer symbol and multiplication sign are same in C/C++?
Accepted answer
17 votes

Yes, the same symbols are being reused, because there were no UTF32 back there. So you have * as a pointer type, * as a dereference operator, * as a multiplication operator, and that's just in C. You ...

View answer
7 answers
19 votes
6k views
OO best practices for C programs
16 votes

I think you need to differentiate OO and C++ in this discussion. Implementing objects is possible in C, and it's pretty easy - just create structures with function pointers. That's your "second ...

View answer
6 answers
19 votes
3k views
Is it a good habit to use C expressions in C++ code?
10 votes

C++ is backward compatible with C by design, so usually C code will be compiled by C++ compiler just fine (usually because there are additional reserved words in C++ that are not in C, and could be ...

View answer
2 answers
5 votes
309 views
Undefined behaviours in C
10 votes

You can do either of the following: Check the "right" answer (the one that your experience with the professor tells you that he wants to see). Sometimes the professors think they know better when ...

View answer
4 answers
2 votes
595 views
Will you consider a Software Team Lead position with previous employer
Accepted answer
10 votes

knowing that this guy has a tendency to seek opportunities for growth every 3-5 years You're saying it like it's a bad thing. I would be very cautious towards people who stayed in the same position ...

View answer
3 answers
12 votes
6k views
Understanding Cyclomatic Complexity
Accepted answer
9 votes

Regarding the formula: nodes represent states, edges represent state changes. In every program, statements bring changes in the program state. Each consecutive statement is represented by an edge, and ...

View answer
4 answers
4 votes
204 views
Are there technical reasons for an immediate update following a fresh download/install?
Accepted answer
7 votes

It's not poor, deployment of the main install image and downloadable update/patch are different things. You cannot expect software providers chase all their downloadable images at all the mirrors to ...

View answer
12 answers
59 votes
33k views
How Do Computers Work?
7 votes

Example for a CS undergraduate course syllabus that explains precisely what you asked about can be found here (IDC.AC.IL course CS101). It's based on this MIT Press book: "The Elements of Computing ...

View answer
8 answers
5 votes
2k views
Is there a point to writing in C or C++ instead of C# without knowing specifically what would make a program faster?
6 votes

You should first consider if the languages you're already comfortable with are suitable for the task. If you conclude that you know no languages that are well-suited for the task, then you should ...

View answer
3 answers
5 votes
3k views
Handling false positives and legacy code warnings in static-analysis of C++ code?
Accepted answer
6 votes

For each of these tools you can select which classes of warnings you want to see, and which to suppress. I've got some experience with Klocwork, and the granularity of the selections there is pretty ...

View answer
3 answers
3 votes
602 views
Reasons for C++ Prototyping
Accepted answer
6 votes

The reason is that you can use the function outside of the file where you implemented it. In this case searching throughout a document won't help because the compiler won't find it, yet it has to know ...

View answer
6 answers
7 votes
2k views
Are 70% of programs/business applications/something based in COBOL?
5 votes

Depending on how you define the 100%, that number might be correct. For example, it might very well be that 70% of the programs written for banks and financial institutions until 2010 is based in ...

View answer
11 answers
15 votes
7k views
How do I know if the compiler broke my code and what do I do if it was the compiler?
5 votes

I started writing a comment and then decided its too long and too much to the point. I would argue that it is your code that is broken. In the unlikely event that you've discovered a bug in the ...

View answer
7 answers
48 votes
24k views
best practice when unit testing for embedded development
5 votes

This is a very difficult problem. I have actually designed a unit testing harness for an embedded system, which would allow simulating hardware events/interrupts, and control the timing of the ...

View answer
7 answers
8 votes
584 views
Determine Better Coding Practice
4 votes

There are several "known" coding standards that you can look at. For example, for embedded C development - MISRA C would be a good start. JSF AV is a nice C++ coding standard. There are ...

View answer
4 answers
12 votes
12k views
How did programming work when programmers used punchcards?
4 votes

Very slowly. My mother was such a programmer, so I had tons of these cards at home while growing up. What they would do was encoding the program on the cards, and then feeding the cards into the card ...

View answer
3 answers
45 votes
52k views
Copyright statements in source code
4 votes

Does a single date imply that the author claims copyright of the file from that date until eternity? The date is usually when the file was created (i.e.: first copyright). If the file was changed, ...

View answer
10 answers
27 votes
29k views
Why would I learn C++11, having known C and C++?
4 votes

Learning is always beneficial. Knowledge is power. That's the answer, basically. Everything else is just details as to how exactly you can benefit from it and what powers you have by knowing it, and ...

View answer
5 answers
3 votes
2k views
Schemes to resolve deadlocks
4 votes

I'm not sure what do you mean by recover, because since you're in a deadlock - you're obviously in a state where two threads depend on each other to complete their current tasks. So the recovery would ...

View answer
7 answers
14 votes
7k views
How to deal with different programming styles in a team?
3 votes

Yes, I've experienced that before. When working in a team, team members must agree on certain rules and conventions, and that includes the style. You should have your team sit down together and draft ...

View answer
1 answers
2 votes
335 views
"Joel test" for B2B hardware/software developers
Accepted answer
3 votes

Joel's test is a good rule of thumb, but is not sacred. For example, the rule number 5 you quoted is a bit problematic. Yes, it is desirable to fix bugs before writing new code. No, these are not ...

View answer
7 answers
30 votes
9k views
How can I learn to write idiomatic C++?
0 votes

Well, open source projects is a very good start. Don't expect to become a professional programmer based on your university classes, they are not intended for that (as I wrote in my answer here). You ...

View answer
3 answers
11 votes
20k views
Writing java doc comments for unit test cases
0 votes

Javadoc comments can be extracted and formatted in a separate reference document, unit tests cannot. Also, bear in mind that what you write in words can be different from the actual code, and usually ...

View answer