design

Is it worth cutting down a 540 byte class into smaller chunks? (C++)

So I've been developing a UI toolkit for the past year, and my Window class has gotten to a point where the size of the class (through sizeof) is 540 bytes). I was thinking, that since not all windows have children, I might split parts of the code that handles having children (its alignment etc) into a separate class and have a pointer ...

How to Group Multiple Items using GroupBy()?

Consider the following simplified objects and relationships: public class Job{ int JobId; String name; String status; Discipline disc; WorkCategory workCat; } public class Discipline { int DisciplineId; String DisciplineName; } public class Workcategory{ int WorkCategoryId; String WorkCategoryName; } public Class ...

What color spectrum is nice for a content management - backend design?

I know this question is pretty broad , but I think most of ya'l had used Content management systems and it is just a question what you really think about it, I sure that you have some conclusions of your own. thanks ...

Single or Multiple Git repositories for libraries shared between teams

I am looking at how/if I should make the switch from svn to git. I currently have a multi-layered set of projects in svn which are layered such that D uses C which uses B which uses A. Actual deployed projects like X,Y,Z use any of the common libraries A-D. The aim is for future projects and other teams to share the base libraries (A-...

Why does a SYN or FIN bit in a TCP segment consume a byte in the sequence number space?

I am trying to understand the rationale behind such a design. I skimmed through a few RFCs but did not find anything obvious. ...

Fixing tabs to the top of the page, but underneath the header

I'm trying to figure out how to design a header for a website so that there are tabs placed underneath the header (that look like they're sticking out from under the header), that stay with the header as the page is scrolled down (and the header moves up), but when they reach the top of the page become fixed there so that they're always ...

GAE python database object design for simple list of values

I'm really new to database object design so please forgive any weirdness in my question. Basically, I am use Google AppEngine (Python) and contructing an object to track user info. One of these pieces of data is 40 Achievement scores. Do I make a list of ints in the User object for this? Or do I make a separate entity with my user id...

PHP: Printing HTML-Friendly Code?

Hi All, I am wondering if there is any technique out there for making HTML code look good when printing that HTML (multiple lines) from a PHP function? In particular, new lines and tabs. Obviously, I want the HTML tags behind-the-scenes to look good with the proper new lines and tabs. However, depending on when I call the PHP function...

Why doesn't ICollection<T> implement ICollection?

This is a duplicate of: Why IEnumerable<T> inherits from IEnumerable? IList<T> implements IList. (Edit: No it doesn't; I knew this - not sure why I wrote it.) IEnumerable<T> implements IEnumerable. But ICollection<T> does not implement ICollection. What was the rationale for this and/or was it just an oversight? ...

Pascal programming help

I posted this earlier and it got closed because I did not show my try at coding it, so here is the question: SECTIONS $160 = section 1 $220 = section 2 $280 = section 3 $350 = section 4 $425 = section 5 Develop pseudocode that accepts as input the name of an unspecified number of masqueraders who each have paid the full cost of their ...

Is there a UI builder for Ext Js?

Any good UI builder for Ext Js out there? ...

Create C# bindings for complex system of C++ classes?

I have existing C++ lib containing many different classes working together. Some example usage should include something like passing an instance of one class to constructor/method of another class. I am planning to provide a C# binding for these C++ classes using C++/CLI therefore I don't have to port the whole C++ code. I can already...

Confusion with interfaces, factories, and inversion of control.

Using interfaces is a very easy way to remove dependencies, but what happens when one of your classes needs a method not defined by the interface? If you're using constructor injection or a factory, how do you access that extra method without casting? Is this possible? Here is an example of a factory with this problem. Am I trying to do...

How to represent HTTP GET/POST et. al. / webhooks in simpler string forms

I'm currently involved in the design phase of a HTTP-based API for a Messaging-type project. The system is primary composed of service-oriented loosely-coupled heterogeneous daemons talking to each other via HTTP. Each daemon handles HTTP requests and responds appropriately whether a submitted message was processed or not. At the same ...

Iterator vs. Reference vs. Pointer

I have a class that spawns an arbitrary number of worker object that compute their results into a std::vector. I'm going to remove some of the worker objects at certain points but I'd like to keep their results in a certain ordering only known to the class that spawned them. Thus I'm providing the vectors for the output in the class A. ...

ASP.NET User Controls that communicate directly with Service Layer?

Is it considered poor design to create "black box" User Controls that communicate directly with the service layer (to perform CRUD operations, validation, etc)? By "black box", I mean that they retrieve/persist data independently of the page they are hosted on (using IoC injected services). Each UC can be dropped onto a page and it w...

Keeping Track of User Points (Like SO)

I want to be able to keep track of user points earned on my website. It isn't really like SO but the point system is similar in that I want each user to have a total and then I want to keep track of the transactions that got them to that total. Should I keep a user total in the User table or should I just pull all the transactions that...

Working with separate classes, global/static class ?

Say I have two separate classes, A and B. I also have Repository class C which loads some information from a textfile. E.g. It has methods loadLines(), addLine(), deleteLine(). Ignoring databinding, how can I make A and B both work on the same class C. Is it possible? For example at the moment, in class A and B formload, I have: var...

CodeIgniter: Decision making for creating of library & helper in CodeIgniter

Hi Guys, After developing in CodeIgniter for awhile, I find it difficult to make decision as to when do i create a custom library and when do i create a custom helper. I do understand that both allows you to have business logic in it and is reusable across the framework(calling from different controller etc.) But I strongly believe th...

Service Watch-dog design

Hello I am working on a legacy product which has seven Windows services and a user interface. There are some bugs in the services which causes crash in every 10-15 days. I need to write an application to monitor the state of the services. If the services get crashed I need to send an e-mail to the administrator to start the services. I...