principles

What is the Dependency Inversion Principle and why is it important?

What is the Dependency Inversion Principle and why is it important? ...

Strategy for Fixing Layout Bugs in IE6?

Generally, what's the best way to tackle a layout bug in IE6? What are the most common bugs or problems that one should look for when trying to figure out why your page suddenly looks like a monkey coded it? ...

What are the Principles of system architecture?

Overload protection Fail safe, clustering Scalability Software upgradable platform Data consistency Something missing? (I'm thinking of classic website + db) ...

Best Practices & Principles for GUI design

What is your best practical user-friendly user-interface design or principle? Please submit those practices that you find actually makes things really useful - no matter what - if it works for your users, share it! Summary/Collation Principles KISS. Be Clear and Specific in what an option will achieve: e.g.: use verbs that indic...

Design Principles

What principles do you generally follow when doing class design? ...

Never do anything until you ready to use it, in software too? [Toyota principle]

I was listening to a podcast. Where they talked about principles Toyota was using. " - Never do anything until you are ready to use it." I think this tell us to look in other places, to learn what other practices have known for years. Ok, here is the podcast. I think it is interesting http://itc.conversationsnetwork.org/shows/detai...

Never produce to an unknown pathway, in software too? [Toyota principle]

In Toyota manufacturing lines they always know what path a part have traveled. Just so they can be sure they can fix it of something goes wrong. Is this applicable in software too? All error messages should tell me exactly what path they traveled. Some do, the error messages with stack trace. Is this a correct interpretation? Could it b...

Always do it with the same method every time, is this usable in Software projects?

I was out running.. listening to a podcast about Toyota.. anyway. This principle I think does not come to use in the software projects. (maybe project management). The art is still to young. We don't know what we are doing, at the moment. But eventually, we will. Or, do some one see how to use this core principle? Ok, here is the podc...

Is it ok to call a virtual method from Dispose or a destructor?

I can't find a reference to it but I remember reading that it wasn't a good idea to call virtual (polymorphic) methods within a destructor or the Dispose() method of IDisposable. Is this true and if so can someone explain why? ...

Organizing classes into namespaces.

Are there some principles of organizing classes into namespaces? For example is it OK if classes from namespace N depends on classes from N.X? And if classes from N.X depends on classes from N? ...

Encapsulation Principle

There's some object-oriented engineering principle that states something along the lines of "a class should only know about the contracts of the classes that it takes as arguments, or any internal ones it uses." The counter-example, in C++, is: Foo::bar( Baz* baz) { baz()->blargh()->pants()->soil(); // this is bad, Foo knows about b...

Service Layers and Repositories

I've been using MVC frameworks for a short while now and I really like how the concerns are separated out. I've got into a bad habit of letting the controllers do quite a bit of work. So I'm really looking for some advice. When I first started using MVC I quite often had the controller doing manipulation on the models after database w...

LINQ To Entities and Lazy Loading

In a controversial blog post today, Hackification pontificates on what appears to be a bug in the new LINQ To Entities framework: Suppose I search for a customer: var alice = data.Customers.First( c => c.Name == "Alice" ); Fine, that works nicely. Now let’s see if I can find one of her orders: var order = ( from o in alic...

Objectively Good OO Design Principles

Premise I believe that there is a way to objectively define "Good" and "Bad" Object-Oriented design techniques and that, as a community we can determine what these are. This is an academic exercise. If done with seriousness and resolve, I believe it can be of great benefit to the community as a whole. The community will benefit by hav...

Where to place Git repository

Hi, I just started using Git and I want to know if this is the right way of using it. I started a Rails app with: rails newapp Then I did: cd newapp git init git add . git commit -a So is it "right" to init my git inside my working directory? ...

Do you prefer compiled or scripted languages?

Since this is wide community using all kind of different technologies, it seems like appropriate place to ask this. Do you like to compile or do you prefer scripting? I ask this because I tend to program things in small scripting languages with chosen modules I actually need (like Lua, Awk, AutoHotKey ... ) instead of mainstream langua...

Principles, Best Practices and Design Patterns for functional programming

Are there any known principles, best-practices and design patterns that one can follow while writing code in a functional programming language? ...

Can Scrum and Lean principles ruins the life of professionals?

Hi There, I work with scrum about 2 months and don’t have all the experience I wish, so I would like to hear some inputs about it. My concern is people never say about drawbacks for the two sides; company and workers. I know the benefits of a cross-functional team but which are the drawbacks? What is hidden beside the amazing Eden Gar...

How to organize my classes?

I'm developing a small project in ASP.NET MVC to manage photos, but I don't know how to organize my classes in namespaces. I have 2 base classes (Photo and Category). Should I put these classes into which namespace? Domain? POCO/POJO? For Data Access, I have more 2 classes, PhotoDAO and CategoryDAO in DAO namespace. (Is it right?) Whi...

Is there anything wrong with writing parts of a webpage in XHTML with an HTML doctype?

Hello, I've just recently started learning HTML/CSS and I've been trying to teach myself sound web programming practices. I'm familiar with XML, so coding up webpages in XHTML was intuitive enough and it just seemed like a sound thing to do. However, I've been reading articles like this one and now I'm ambivalent. My concerns with cod...