there are 2 examples of code:
# 1
string str1 = "hello";
string str2 = str1; //reference to the same string
str1 = "bye"; //new string created
and # 2
string str3 = "hello";
string str4 = (string)str3.Clone();//reference to the same string
str3 = "bye";//new string created
looks like they are identical aren't they? so what is ...
Remember installing a program for example and you can check individually each item or you can check a 'select all' check-box at the top? And when some lines are checked the 'select all' box has a green fill inside instead of a check or being empty?
What I'm trying to ask is what is the normal behavior for the 'select all' box?
For exam...
Hi,
My application is able to start without a database connection, how do I handle this with IoC and constructor injection?
Example:
public class ApplicationShellPresenter(IRepository repository, IView view)
{
}
When IRepository in this case will be constructed an exception will be thrown due to underlaying DAL cannot find config/f...
Hi,
I am a PHP developer and I have always thought that micro-optimizations are not worth the time. If you really need that extra performance, you would either write your software so that it's architecturally faster, or you write a C++ extension to handle slow tasks (or better yet, compile the code using HipHop). However, today a work m...
I do not have a ton of PHP experience, but whenever I have been given legacy code or even recent PHP code, one thing that always strikes me is how BIG the functions are. In seems like every .php file as at least one page-long function in it. Is there any intrinsic reason why functions and methods in a dynamic, high-level language like PH...
I'm writing a motor controller that has a couple of interfaces (buttons, Bluetooth, haptic knobs) which is a task that is steadily growing to be a larger than I figured. I've tried to just go at it by starting with low-level modules (e.g. write code to talk on the I2C bus), then ones above that (code to talk to a particular device on th...
Helo Guys,
Currently I am looking to domain driven design and I hope You could give me some advice.
Domain design seems a good thing since the business logic is implemented in the domain. It looks easier to be maintained once I have a good design.
However I have problem to implement them in mobile application.
This is a sample case. M...
I think my title about says it all. During the __construct()-tion of $classA, $classB is instantiated. When $classB is instantiated it needs to access to another class inside $classA (i.e. $classA->classC). $classC has already been instantiated in $classA.
Inside the __construct() function of $classB I am attempting to do something like...
I have a internet / intranet application.
I am thinking of some enhancements functionality to the current ssytem.
Normally what are the things i should look at or what are the common enhancements that people do?
...
I have a problem that can be simplified as follows: I have a particular set of objects that I want to modify in a particular way. So, it's possible for me to write a function that modifies a single object and then create a decorator that applies that function to all of the objects in the set.
So, let's suppose I have something like thi...
Hello everyone,
I would like to know if there is any tool able to extract the design from an existing Oracle database.
I have a read access to it and I would like to have the design. Or simply export it to a *.sql and then read it with any tool able to create the design with the links between the tables.
Something like that
Thank you...
Hi Folks!
I'm searching for a way to implement a designer/editor like the aspx-Designer in VS2008.
We use a custom XML-Format and want to edit it graphically.
We already have a Designer and want to integrate in VS.
Is there a good tutorial?
I want to adapt to features like "switch to code" (and those tabs at bottom of the window).
So ...
I'm having trouble designing classes to best make use of DI / IoC principles, particularly when a class shares a dependency with one of its dependencies (ie. X has dependencies Y and Z, and Y has dependency Z).
An example will probably be useful:
Lets say I have a class that will encapsulate some connection information for my app. Call...
I've been here for nearly a month and it seems that people have a tendency to be eager to use the "Premature Optimization is the root of all evil" argument as soon as someone mentions efficiency.
What is really a premature optimization? What is the difference between what is essentially writing a well designed system, or using certain m...
Over the summer, I've been reading a lot about design. Two notable pieces that I read were Test Driven Development: By Example by Kent Beck, and another named Pattern-Oriented Analysis and Design: Composing Patterns to Design Software Systems by Yacoub.
These books take two very different approaches to designing software systems. My imp...
I had to clean up code for an online college application. There's nothing particularly wrong with it, but it was complicated. Different degree programs had different prequisites, fees, required documentation, and questions. On top of that, students coming from the military get different fees, and previous students pay no fees and skip...
I am interesting in creating a better User Experience (UX). There are a lot of books out there, what are some that would be useful to a software engineer?
...
Has anyone got a TDD-ish methodology for designing complex WPF xaml components (i.e., ControlTemplates, Custom Controls with dependency properties)?
Is eyeballing the UI the closest you can come to asserting your code is correct? How about incremental development; any aids to dividing up the logic incrementally?
If there isn't any meth...
I have a fairly large ASP.NET MVC 2 application that requires a large amount of user profile based data customization. This involves things like adding/removing table columns or applying user specific column headers in data returned by AJAX requests. There are dozens of types of customizations possible and there are many permutations sup...
Hi, I have a piece of shareware that I wrote that I'd like to distribute on the internet. I have a serial number type thing set up but there is still a ton of key sharing :(. I'd like to add a system where once the user enters the serial, it is checked with my server to make sure that it is valid. Simplicity is key.
-Client sends MD5 o...