design

Storing URLs with keywords - what's the best approach?

Hello all, I am developing a component that stores URLs and maintains a certain set of keywords associated with these URLs. For example- URL: http://www.imdb.com Keywords: search, movies, movie-index, reviews The keywords themselves are not restricted by number. The number of urls may be huge in number ranging between 10K to 100K. Wha...

design question C++

I have just read an article about the Curiously Recurring Template Pattern. And you can use it simulate virtual function with templates. For example: template<class T> struct A { void func() { static_cast<T*>(this)->func(); } }; struct B : public A<B> { void func() { cout << "B" << endl; } };` However, if we have many subcla...

RFP: why/why not outsouce early project development?

A small web development group (less than 15 people) I do some work for is looking at outsourcing some work. Through a series of random events they will soon be without a front end developer and a graphic designer. Rather than hire these positions back on, there is talk of outsourcing the work to a group in a nearby state that manages d...

Photoshop/fireworks filesize for iPhone 4

What's the best way to design for iPhone 4 using either Photoshop or Fireworks? Essentially looking for dimensions and DPI to start with. Thanks! ...

How to design multithreaded application

I have a multithreaded application. Each module is executed in a separate thread. Modules are: - network module - used to receive/send data from network - parser module - encode/decode network data to internal presentation - 2 application module - perform some application logic on the above data one after other - counter module - used t...

Simple Design problems

Hi, Tell me simple design flaw which you have faced(irrespective of programming language) while you code and how did you over come with that? ...

Database design for affiliate system

i am building an affiliate system and i have stacked with the design of the database in one part. I dont know how to keep track on that who recruited whom. Lets say we have something like this: Jon smith Alex Del Jim West Marko Polo Johny Bravo Pit Sampras Sara Mat Gabriella white Antonio Santo Maja Grozdanova Agon Xhela...

user interface guidelines for a website targeting kids

We are planning to design a website for evaluating kids (games, quiz). Are there any specific user interface guidelines for targeting the kids (e.g. keyboard usage in a laptop or a standalone keyboard, ability to control a mouse, ability to navigate the user interface and its controls, size of buttons, page navigation)? We are looking fo...

RTTI vs. additional methods

Some of my classes should be treated differently. Which solution is better: Introduce new interface to my class hierarchy and check whether the class implements it or not, using RTTI (runtime time identification) Add a method which returns boolean value that indicates whether this class should be treated normally or deserves special tr...

What is better in terms of memory allocation - subobject or a pointer to a separate object?

I have the following problem in a Visual C++ 9 program. There's a huge object that logically contains several subobjects. I can either store the subobjects inside the object or store pointers to subobjects allocated separately. The key point here is that there's always one instance of suboject of each type in one outer object - it is al...

Amazing Micro Applications and Open Source Projects

As time goes on people are finding smaller, more efficient ways to do things. I'm really impressed at some of the amazing things people have made that are so incredibly simple. Our quest for "a better wheel" has lead to things like a 3Kb javascript framework, a 1kB ORM, a tweet sized framework & DI container, an entire forum in 1kb, a 9...

What are the things you will need to consider while designing tinyurl site?

Hi, this is my first question here. I have been evaluating myselft in designing and analysing different architectures. While doing this, I came across http://tinyurl.com/ site. Could anyone throw their ideas on what could be the design consideration for this site and how architecture look like? Which algorithm will you use to generate ...

In SDLC, What are the things covered by "Design" ?

Is it the flow diagram, User Interface or what? ...

Android widget design questions

I'm creating a widget for the Android platform., however I need some advice on certain aspects. 1) If I have a 3x3 widget, what is the actual dip/dp for this layout? 2) I'm creating a basic calculator layout inside the widget, how can I better layout the elements? Linear/Absolute/Relative? 3) Depending on the layout above, are there any...

Creating two resources at once with a form in Rails

Say you have a Post model that has a :title, :author, :content, etc. It also has a :thread_id attribute, and it belongs_to :thread. The thread model doesn't have any custom fields. The only ones you'll be needing are those created by default such as :id, :created_at, and :updated_at. Threads have_many :posts. How do you create a form f...

Wrapping logging within an exception object

I currently have this class that another programmer in my team coded: public static class SoapExecuter { private static readonly ILog logger; public static Exception ExecuterException { get; private set; } public static bool IsSoapException { get { if (ExecuterException == null) ...

Java equivalent to .NET System.InvalidOperationException

I am not as familiar with Java's exception packages as with those of .NET. I'm in a situation where, if programming in C#, I would throw a System.InvalidOperationException. Before creating my own java.lang.RuntimeException subclass, I need to know if there is a similar exception type I should throw in Java. The exact scenario is: My ...

New Styles in C#

Fluent APIs are very common these days. Lately, I'm finding them in almost every system I work with. Mostly, they enhance readability but sometimes they lock me in to inflexible specifications, making understanding the runtime behavior of the specification that they build almost impossible. Is there a consensus on how to create a good fl...

What are some good fonts for User Interfaces? And what about Unicode?

Hi, I am working on a user interface, and I am wondering what fonts do other software use like Photoshop, Windows, etc use in their interface. They can't be using Arial and Tahoma, right? This is a web application I am working on, and I can use @font-face. But what about Unicode support? I would not like to put any limits on i18n. ...

Background image technique

Is there any tehnical term for the full-image centered technique? Example: topgear.com, http://safe.tumblr.com/theme/preview/979, and many others which I don't recall. ...