Hot answers tagged

21

Robert Harvey's advice is likely best, but since career advice is off topic, I'll give what answer can be given: You are at the bottom of a very steep mountain covered in brambles and mud and irritable mountain goats. There's no easy way up. If you want to get to the top, you've got to force your way up one tremendously painful step at a time. It seems ...


8

1) Debugger cannot be used on client site ... That's perfectly normal. ... or locally Now that's a problem. 2) There is virtually no logging done in our apps. Logging is the Production Debugging. There are no unit tests. Oh dear. All to common, though. 3) Version control only has 1 version of the full solution Then you're ...


5

Besides the fact that in your current state the code would not work, because dum would be null, you cannot mock a private attribute of a class unless you have an access to it using some public method. How to do it? 1. You need to change the Class1 class signature so that the IDummyInterface1 is passed as a parameter, be it in a constructor or a method ...


5

I would argue that the IEEE behavior is correct. NaNs are not equivalent to one another in any way; they correspond to ill-defined conditions where a numeric answer isn't appropriate. Beyond the performance benefits that come from using IEEE arithmetic that most processors support natively, I think there's a semantic problem with saying that if isnan(x) ...


5

Start with logging. This will have the greatest impact. Implement a logging framework into the code base, like Log4Net or similar. Start logging what the code does. Debugging should be possible locally. If not, work on getting the symbol files (PDBs) so you can debug into 3rd party dlls to gain a complete picture of the issues that are occurring. Tools ...


4

First, all the above... ditto. Some heuristics: Use source control on your development computer. It's the best thing I've done. It is not a substitute for the project's version control, which we have. It's a tool that gives amazing freedom to fearlessly experiment, hack, work problems simultaneously yet independently, etc. I am better at using version ...


3

In my opinion, the main reason this feature is not available due to the language designers not being required to implement it or not seeing point in doing that since this can be already achieved with lambdas in a sane manner. The feature is most probably technically possible, since all expressions can be written as lambdas The adoption would mean that each ...


2

You could do that. But as mentioned by Robert in the comments you could avoid a lot of trouble by using a library, such as Lucene. In your case (.NET) you should pick the Lucene.net port.


2

A SQLServer Connection can be shared by multiple tasks executing in parallel, e.g. threads in a C# program or requests in an app server. But most use scenarios would require you to synchronize access to the Connection. A task will have to wait for the connection if another task is using it. By the time you build a shared connection mechanism that does not ...


2

This has nothing to do with ObservableCollection and everything to do with WPF. WPF requires all changes to be done on the UI thread. But WPF doesn't dispatch the changes onto UI thread when collection changes, unlike with property change. You can work around it either by dispatching the collection change onto UI thread using WPF's Dispatcher. Or you can ...


2

Primary Constructors would have helped, but they were pulled from C# 6. You could use certain IOC container black magic to make it look neater. But neither remove the underlying problem: your class is awkward because it has a bunch of dependencies. If it has a bunch of dependencies, it's probably trying to do too much, since few problems require 4 ...


1

Interfaces are required in good quality implementations of MVP for the same reason they are required in all good "OO" designs: They help reduce coupling They discourage inheritance (which further reduces coupling) Arguably most importantly, they simplify unit test writing


1

Usually an enterprise application server would have a datasource configurable through which an API could make requests. For example, WebSphere servers have a datasource which can be called via a defined JNDI name from a persistence framework (JPA, Hibernate, ...) within EJBs which handle threading on their own. So yes. However, I would highly recommend ...


1

I do not know the pattern name (but it's probably using the Reflection pattern, see below), but many Web frameworks natively implement what your are trying to do here. For example if you look at Ruby on Rails, ActiveRecord and Mongoid are the components used to represent a Database entity, and programmers usually implement their model like this : class ...


1

This sounds like combination of strategy and composite patterns. Individual validators are strategy pattern. Then, composite is used to invoke multiple strategies as single one.


1

We already know that the expression tree generation mechanism is able to generate an expression tree for any arbitrary expression, because it's able to generate an expression tree for any arbitrary expression within a lambda. So it's clear that technical limitations are not the problem. The most likely answer is that it was used only set up for automatic ...


1

What you want to do is called a three-way merge. Basically, you take the original before the branch, and the end result of the two branches. You take the differences between both branches and the original, and merge those diffs together. How do you merge the diffs? That's the tricky part, but here are several projects which implement the algorithm for ...



Only top voted, non community-wiki answers of a minimum length are eligible