design

Are you able to close your eyes and focus/think just on your code?

Hi, I have some colleagues at work, they arrive at the morning, switch off email, phone, close the door, etc. Then they close their eyes and during 30 minutes try to focus on their programming (C++, C, etc) and remember what they did yesterday. Then and somehow the process or imagine the code on they mind, with closed eyes. And some tim...

How to avoid accessors in test-driven development?

I'm learning test-driven development, and I have noticed that it forces loosely coupled objects, which is basically a good thing. However, this also sometimes forces me to provide accessors for properties I wouldn't need normally, and I think most people on SO agree that accessors are usually a sign of bad design. Is this inevitable when...

SR Flip Flop and D Flip Flop

I know this isn't really a programming question, but it is definitely computer related and someone might know this. How do you construct a SR flip-flop with a D flip-flop and other logic gates? I understand that ultimately, what you want is logic gates (with S and R as inputs) connecting in to the D input of the D flip-flop, but I am...

How to Design software to incorporate updates easily?

I have started building a small application which I plan to release as soon as possible. What I want is for users that have purchased it to be able to receive new updates and download new versions with only the one purchase. So is there a way to design to application that will make incorporating updates easy? And how can I build the upda...

Android linearlayout design problem

hi, For my design i have in the xml file something like: The design is like a row that have two cells. I want one of them to be autosize and fill the row and one of them to have fixez size. I want that the second linearlayout to wrapp its content and the first one to fill the rest of the space. Something like in css ...

ASP.NET MVC - Keeping a controller thin (too many action methods)

I'm working on my first real ASP.NET MVC project and I've noticed that the controller I've been working in is getting rather large. This seemingly goes against the best practice of keeping your controllers thin. I've done a good job keeping the business logic out of the controllers. I use a separate layer for that. Each action primar...

Rails RESTful controllers vs. view specific controllers

This design question needs a bit of context, so please bear with me. I currently have three models that go something like this: class MyItem < ActiveRecordBase has_many :my_list_items ... class MyList < ActiveRecordBase has_many :my_list_items has_many :my_items, :through => :my_list_items ... class MyListItem < ...

if using an interface should a class always strictly implement an interface

The better way to ask this question would be an example as follows What are the pros and cons of the 2 approaches? Is one always better than the other or under specific circumstances? If using Approach1, using an interface would be moot right? since anyone can access the public methods anyway? public interface IDoSomething { void Meth...

Web Form Design - How to speed up?

Hey all, I am just going to be honest and say that I hate building web forms. I am a programmer, not a designer but frequently get stuck building input forms for various web applications. I would really like to find a utility for doing this in a more visual manner. The problem I have found in the past with products like this (cough c...

C# plugin architecture question

I'm working on a system monitoring application similar to Nagios in C#. I have a plugin interface defined as: public interface IPlugin { PluginResult Execute(); } Each plugin, depending on its functionality, will have a variable number of arguments. As an example, a ping plugin might take a hostname, # of packets, timeout value, e...

Something similar to ParallelPython for C++?

I need to do some extensive searching and string comparisons and for this I figure that a compiled program is much better than an interpreted ones especially after seeing some comparison studies. I came across ParallelPython which was beautiful. It has autodiscovery for clusters and can pretty much do all the load balancing for me as wel...

Design Guidelines Distributed computing.

Hi there, I have a software system that performs OCR on Multiple machine simultaneously. Current system works as follows: All documents which needs to be ocred are inserted into a table in db. Each client ocr machine pools that table and whenever data is found for ocr, it locks table and pick n no. of files for ocr. Locking is used for...

Why must I use Qt Designer 2.7 with Python 2.7 ?

Why can't I use other Qt series with different Python releases? ...

Full screen App in Android: a good practice?

Is it a good practice to develop an app that uses the full screen? It is not a game, full screen would be just nice to have more space on the screen for GUI elements. But I have the dim feeling, that a full screen app could break some recommandations for good app design. The developer guide gives no answer to this. Who knows more? I'm...

capture changes to properties of an object

I have multiple business objects in my application (C#, Winforms, WinXP). When the user executes some action on the UI, each of these objects are modified and updated by different parts of the application. After each modification, I need to first check what has changed and then log these changes made to the object. The purpose of logging...

What's the point of a logging facade?

There are a bunch of different logging libraries to choose from, each with their own set of quirks and advantages. (.Net examples: log4net, System.Diagnostics.TraceSource, nLog, etc.) The natural inclination is to abstract away those quirks and use a logging facade. (examples: Castle.Services.Loigging, Common.Logging, Simple Logging Fa...

Find Similar Rows in Database

I try to design my app to find database entries which are similar. Let's for example take the table car (Everything in one table to keep the example simple): CarID | Car Name | Brand | Year | Top Speed | Performance | Displacement | Price 1 Z3 BMW 1990 250 5.4 123 23456 2 ...

Basic design of a multithreaded game server?

How are multithreaded game servers written? If there are 4 threads, is there one thread running the game loop, and 3 accepting and processing requests? Also: is information sent from the thread running the game loop? ...

Why do we use graph paper?

Question just occurred to me today. So many folks in computer science/engineering and related disciplines always seem to be drawing/writing on graph paper. As I write this, I have 3-4 pads sitting on my shelf. It's something I've always done, but I can't say why. (I also can't remember the last time I drew a graph that required graph...

vertically scrollable image gallery

I was going through this tutorial about designing a vertically scrollable image gallery. http://flowplayer.org/tools/demos/scrollable/vertical.html Now can anyone explain me how to change these setting such that i can have more than 3 rows in a single page. Or can anyone show me a tutorial where such a vertical image gallery as been m...