C# is a multiparadigm, managed, garbage-collected object-oriented programming language created by Microsoft in parallel with the .NET platform
3
votes
4answers
221 views
Do large test methods indicate a code smell?
I have a particular method called TranslateValues() (Cyclomatic-Complexity of 5) which I would like to test.
The test requires a substantial number of mock objects which take up most of the method; ...
3
votes
8answers
363 views
A Newbie .NET Developer Desperately Seeking for Advice
I am becoming a little desperate. I am 23 and for the last three months I've been working as a software developer for a British Company who develop a leisure management system. Prior this job, I was ...
3
votes
2answers
466 views
Is there a canonical book on CLR in .Net? [closed]
I'd like to understand the working of CLR in .Net.
Is there a book out there that's the de-facto standard for describing details, and other helpful information on CLR in .Net? What about that book ...
3
votes
4answers
194 views
Should I continue learning a language if in the meanwhile I became interested in another language/platform?
I started learning Java a couple of months ago. I also wanted to become more exposed to linux so I installed ubuntu and started working with Java since then. In the meanwhile however I became more ...
3
votes
2answers
1k views
C# Interview Preparation - References?
This is a specific question relating to C#. However, it can be extrapolated to other languages too.
While one is preparing for an interview of a C# Developer (ASP.NET or WinForms or ), what would be ...
0
votes
1answer
439 views
A sample Memento pattern: Is it correct?
Following this query on memento pattern, I have tried to put my understanding to test.
Memento pattern stands for three things:
Saving state of the "memento" object for its successful ...
74
votes
11answers
16k views
What backs up the claim that C++ can be faster than a JVM or CLR with JIT? [closed]
A reoccurring theme on SE I've noticed in many questions is the ongoing argument that C++ is faster and/or more efficient than higher level languages like Java. The counter-argument is that modern JVM ...
33
votes
12answers
17k views
For what reasons should I choose C# over Java and C++?
C# seems to be popular these days. I heard that syntactically it is almost the same as Java. Java and C++ have existed for a longer time. For what reasons should I choose C# over Java and C++?
27
votes
11answers
11k views
Java vs. C# - Productivity perspective [closed]
If you have a number of years experience in working with Java and a number of years experience in working with C# and .NET, I would value your opinion on software development productivity differences ...
35
votes
6answers
6k views
Single Responsibility Principle - How Can I Avoid Code Fragmentation?
I'm working on a team where the team leader is a virulent advocate of SOLID development principles. However, he lacks a lot of experience in getting complex software out of the door.
We have a ...
15
votes
3answers
6k views
Best design for Windows forms that will share common functionality
In the past, I have used inheritance to allow the extension of Windows forms in my application. If all of my forms would have common controls, artwork, and functionality, I would create a base form ...
34
votes
6answers
4k views
Good example of complex code using TDD
What would be a good example of the use of TDD in large, real-life, complex, projects? All the examples I've seen so far are toy projects for the purpose of a book or a paper...
Can you name an ...
11
votes
3answers
3k views
How do I set up MVP for a Winforms solution?
Question moved from Stackoverflow - http://stackoverflow.com/questions/4971048/how-do-i-set-up-mvp-for-a-winforms-solution
I have used MVP and MVC in the past, and I prefer MVP as it controls the ...
36
votes
14answers
3k views
Why are /// comment blocks important?
Someone once said we should prefix all our methods with the /// <summary> comment blocks (C#) and I am wondering if that is true or not.
I started to use them and found they annoyed me quite a ...
7
votes
3answers
5k views
What should I do to get started with Windows 8 app development?
I'm looking to get into Windows 8 app development, and from what I understand I should be mastering XAML and C#.
Now, there aren't any good tutorials on the internet about Windows 8 yet, but there ...
28
votes
22answers
5k views
Why is VB so popular?
To me, Visual Basic seems clumsy, ugly, error-prone, and difficult to read. I'll let others explain why. While VB.net has clearly been a huge leap forward for the language in terms of features, I ...
18
votes
5answers
1k views
How do you encode Algebraic Data Types in a C#- or Java-like language?
There are some problems which are easily solved by Algebraic Data Types, for example a List type can be very succinctly expressed as:
data ConsList a = Empty | ConsCell a (ConsList a)
consmap f ...
15
votes
9answers
3k views
Why the question “give five things you hate about C#” is so difficult to answer during an interview?
In podcast 73, Joel Spolsky and Jeff Atwood discuss, among other subjects, "five things everyone should hate about their favorite programming language":
If you’re happy with your current tool ...
16
votes
2answers
456 views
Why does shared state degrade performance?
I've been working under the share-nothing principle of concurrent programming. Essentially, all my worker threads have immutable read-only copies of the same state which is never shared between them ...
9
votes
4answers
3k views
In simple words what are are the purposes of abstract classes and/or interfaces?
I have to explain to some students the use of abstract classes and interfaces, as I have a very tecnical background, I would like to know if you would help me to define an easy explanation for junior.
...
7
votes
5answers
943 views
Teaching Programming to Kid / Teen [closed]
I know this topic has be discussed before, but I thought this might be a bit more of a detailed question... A family friend is a 12yr old boy with ADHD, and a very bright kid at that. He seems to ...
4
votes
1answer
892 views
test for graduate software developer role?
I'm looking for tests that are suitable for a graduate software developer role, mainly tests that are about reviewing code and finding faults and etc, multiple choice or otherwise.preferably code ...
17
votes
7answers
850 views
S.O.L.I.D., avoiding anemic domains, dependency injection?
Although this could be a programming language agnostic question, I'm interested in answers targeting the .NET ecosystem.
This is the scenario: suppose we need to develop a simple console application ...
15
votes
4answers
783 views
How would you teach C# delegate to a newbie?
I was reviewing Andrew Troelsen book on C# 4.0. The part that explains delegates starts as smooth as:
public class SimpleMath
{
//declare delegate
public delegate int BinaryOp(int x, int y);
...
20
votes
6answers
3k views
C++ Renaissance - marketing slogan? [duplicate]
Possible Duplicate:
What does the latest “C++ Renaissance” mean?
Lately, I hear a lot about C++ Renaissance. What is that?
C++ is currently undergoing a renaissance. This ...
15
votes
11answers
2k views
How does one meaningfully measure maintainability?
Context: I'm an enterprise developer in an all-MS shop.
Can anyone recommend a good way of objectively measuring maintainability of a piece of code or an application?
Why maintainability: I'm tired ...
12
votes
4answers
1k views
Is It “Wrong”/Bad Design To Put A Thread/Background Worker In A Class?
I have a class that will read from Excel (C# and .Net 4) and in that class I have a background worker that will load the data from Excel while the UI can remain responsive. My question is as follows: ...
7
votes
2answers
3k views
Creating database connections - Do it once or for each query?
At the moment I create a database connection when my web page is first loaded. I then process the page and run any queries against that conection. Is this the best way to do it or should I be creating ...
6
votes
5answers
286 views
Where to go from here, how to improve / learn more [duplicate]
Possible Duplicate:
I'm graduating with a Computer Science degree but I don't feel like I know how to program
I finished University around 4 years ago double degree in Software ...
6
votes
4answers
2k views
Use Dependency Injection For Data Objects?
I'm just learning about dependency injection, and am stuck on something. Dependency Injection recommends sending dependent classes through the constructor, but I'm wondering if this is necessary for ...
6
votes
12answers
2k views
What is the point of properties?
Here are some arguments for properties and my counter-arguments:
Easier to use than writing getter and setter methods
Getter and setter method pairs are a code smell. Making it easier to write ...
4
votes
9answers
2k views
What to do after reading a beginner's book on C#?
I am 16 years old and want to get a job in the programming field in the future. Since I will be applying for a foreign university, I want to start programming by myself and gain experience, both to ...
11
votes
13answers
1k views
Dealing with curly brace soup
I've programmed in both C# and VB.NET for years, but primarily in VB. I'm making a career shift toward C# and, overall, I like C# better.
One issue I'm having, though, is curly brace soup. In VB, ...
9
votes
9answers
414 views
Studies on code documentation productivity gains/losses
After much searching, I have failed to answer a basic question pertaining to an assumed known in the software development world:
WHAT IS KNOWN:
Enforcing a strict policy on adequate code ...
8
votes
4answers
472 views
Looking for some nice windows phone 7 development blogs [closed]
I've just started developing for windows phone 7 and am looking for some nice tech blogs with tips and trix, code samples etc :)
Thanks
8
votes
3answers
2k views
Why is there no generic implementation of OrderedDictionary in .net?
Why did Microsoft not provide generic implementation of OrderedDictionary?
There are a few custom implementations I've seen, including: ...
6
votes
10answers
361 views
What is the best way to discuss/plan/negotiate about code architecture remotely?
Our team is distributed in space and time, so we have no ability to discuss the architecture of the code in real time. How can we discuss it via documentation: write code interfaces/ comment/ modify, ...
5
votes
2answers
4k views
Difference between various Collection Generic Interfaces in C#
I have been playing around with C# for Windows and ASP.net MVC development for some time now. Some, might argue this as lame question but I am trying to understand the basic difference and performance ...
4
votes
7answers
429 views
What are ways I can speed of development time when building applications? [closed]
I noticed that overtime with experience that the curve of learning shifts from trying to learn a language or technology (the way it works) to how to develop applications faster and with less code. I ...
4
votes
5answers
750 views
Switching Programming Languages [duplicate]
I'm a senior level Delphi developer looking for move into either C# or possibly Java roles. I have around 8 years of development experience of which pretty much all of it is in Delphi, I have very ...
55
votes
8answers
3k views
Don't Use “Static” in C#?
I submitted an application I wrote to some other architects for code review. One of them almost immediately wrote me back and said "Don't use "static". You can't write automated tests with static ...
12
votes
6answers
622 views
When should I use a 2-property class over a pre-built structure like a KeyValuePair?
When should you put Key/Value type of data in it's own class instead of using a pre-built generic structure, such as a KeyValuePair or a Tuple?
For example, most ComboBoxes I create contain a ...
11
votes
1answer
1k views
Domain-Driven-Design - external dependencies in the Entity problem
I'd like to start Domain-Driven-Design, but there are several problems I'd like to solve before starting :)
Let's imagine I have a Groups and Users and when user wants to join a group, I'm calling ...
11
votes
5answers
753 views
Why have minimal user/handwritten code and do everything in XAML?
I feel the MVVM community has become overzealous like the OO programmers in the 90's - it is a misnomer MVVM is synonymous with no code. From my closed StackOverflow question:
Many times I come ...
10
votes
4answers
2k views
Dependency Injection and Singleton. Are they two entirely different concepts?
I've been hearing about using the dependency injection over Singleton for my colleague. I still can't make out if it they are two orthogonal patterns which can be replaced with one another? Or is DI a ...
9
votes
6answers
599 views
Is there an infinite amount of knowledge in a programming language?
I can program in Java, C#, C, Scala, and Javascript fluently. I'm comfortable with Objective-C, but I don't remember the conventions used for memory management. I can read Python and Ruby and I've ...
6
votes
6answers
2k views
What's the point of passing a parameter by reference in C#? [duplicate]
Possible Duplicate:
Why are objects passed by reference?
Doesn't C# send the objects themselves? So unless it's some kind of swap function for primitive typed variables - why would I send ...
6
votes
8answers
2k views
Would Java programmers hire C# programmers?
I learned and used Java in college. After graduating, I got a job in C#. Two years after, there are a lot more positions in Java. Would I have a good chance to be hired as a Java programmer? What ...
5
votes
6answers
213 views
Re-architecting a classic inheritance design
I have the opportunity to rewrite a core piece of a project (C#) that is inheritance-heavy and feels increasingly restrictive in how it is designed. The scenario is pretty simple, imagine an ...
5
votes
3answers
364 views
C# Dynamic types
I just read a chapter in a programming book about Dynamic types. Although they are quite neat I cant think of a single real world example where I would use them. Does anyone here actually use them and ...