Java lets you create an entirely new subtype of Throwable, e.g:
public class FlyingPig extends Throwable { ... }
Now, very rarely, I may do something like this:
throw new FlyingPig("Oink!");
and of course elsewhere:
try { ... } catch (FlyingPig porky) { ... }
My questions are:
Is this a bad idea? And if so, why?
What could've...
I have been playing around with php-gtk recently and in the past I have experimented with Java to make GUI 'hello world' apps.
However both these types of applications have had a bit of a clunky (almost childish) look and feel to them. I cannot deny that they are handy for making apps for in-house use (and I totally respect the amount o...
What is the best way to seperate rendering code from the actually game engine/logic code? And is it even a good idea to seperate those?
Let's assume we have a game object called Knight. The Knight has to be rendered on the screen for the user to see. We're now left with two choices. Either we give the Knight a Render/Draw method that we...
Hi guys,
I'm looking for a good read on object oriented design. The two books I'm currently looking Head First Design Patterns and Head First Object object-oriented analysis & design. They seem very similar when looking at the contents and browsing through available sample text. Which one would be the best choice?
About myself:
I have ...
Hi everyone,
I need to create one table,
Description : i need to create table based on schedule like daily, weekly & monthly,
columns are like : sno, startdate, enddate, day, scheduletype
For example i ll take weekly data,
for my point of view : From sunday to saturday (1 - 7 )Id i create....
So lots of posibilities are creates lik...
I am not looking for frameworks or tools, but for advice how to get from a rough idea to a nice DSL.
...
I'm building a Qt application that needs to use libssh, a SSH client library. libssh (understandably) performs its own network connections, however Qt has its own infrastructure for network connections (QTcpSocket etc).
Should I worry about these differences? Should I be trying to make libssh make network connections via QTcpSocket... O...
Hi,
On the twitter home page (not logged in), there a scrolling text in the middle below the logo. How is this accomplished? It stops scrolling when mouseover and also has a popup dialog on relevant text.
Thanks,
Mike
...
I have a component that needs to call a specific service depending on the input it receives. So my component has to look at the input and based on a configuration that says "for this input call this service with this data" needs to call the proper service. The services have a common signature method and a specific one (each).
I thought ...
I have a C# class library behind a WCF service. The library contains ClassA which is declared as static. This static class has a method MethodA which accepts a string and uses LINQ to query the database for a translation of the string which it then sends back through the webservice to the client.
My question is whether using a s...
Hi,I have a question about patterns.I have really problems with design patterns Can you tell me the difeerences between facade pattern with builder,factory and abstract factory pattern?
...
can anyone give some reference for non-sql database query interface design pattern?
For sql-based database, the query can be achieved by combining the query token.
but for non-sql, how to design the query, given that the query could be very complex.
EDIT:
I am using db4o to store some objects, I may need to query according to a certai...
In every design tool or art principle I've heard of, relationships are a central theme. By relationships I mean the thing you can do in Adobe Illustrator to specify that the height of one shape is equal to half the height of another. You cannot express this information in CSS. CSS hard-codes all values. Using a language like LESS tha...
I have a colour scheme based around yellow, for warning messages on a website. It amounts to a slightly orange bordered box, with a pale yellow fill. The exact colours are:
#FED626 (border)
#FFF7C0 (fill)
I want to know if it's possible to convert this scheme mathematically or algorithmically somehow, to come up with a blue version...
So, why does this code:
package org.popoffka.apicross;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
public class Game extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Button testButton = new Button(this);
testB...
I am looking for exemplars (design examples) showing the use of objects (especially abstract base classes and/or interfaces, aka 'protocols' for you smalltalkers) to design a document management architecture in a large Word Processor, Spreadsheet, vector graphic or publishing package, or office-productivity (non-database) application wit...
Hi.
I am in the process of planning a database for a social networking project and
stumbled upon this url which is a (crude) reverse engineered guess at facebook's
schema:
http://www.flickr.com/photos/ikhnaton2/533233247/
What is of interest to me is the notion of "Affiliations" and I am trying to
fully understand how they work, ...
I have a WPF application with a group of asynchronous WCF service calls all mashed into the code behind, complete with event handlers and everything, that I have to refactor to productionize and maintain.
I want to separate concerns here for maintainability and all the other good reasons to do this, but I'm not sure exactly how to achie...
I'm interested in opinions about structure charts.
Do you still use them or did you abondon them for some reason?
They are old, even so old that they don't work with OOP. But I found them very good for structuring parts that are not so complex, but also not so trivial that you understand the source code for 100% in the first place.
It ...
I have spent most of my development career writing backend code, or front-end apps for used as daily business tools, by at least semi-skilled staff, e.g. order-tracking, sales capture, etc. That those I helped build peformed their tasks well is comfort enough, but I am still seeking excellence in the building of these kind of apps, vers...