Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Back story of this question, feel free to skip down for the specific question

Hello, I've been very interested in the idea of abstract programming the last few years. I've made about 30 attempts at creating a piece of software that is capable of almost anything you throw at it. I've undertook some attempts at this that have taken upwards of a year, while getting close, never releasing it beyond my compiler.

This has been something I've always tried wrapping my head around, and something is always missing. With the title, I'm sure you're assuming, "Yes of course you noob! You can't account for everything!" To which I have to reply, "Why not?"

To give you some background into what I'm talking about, this all started with doing maybe a shade of gray hat SEO software. I found myself constantly having to create similar, but slightly different sets of code. I've gone through as many iterations of way to communicate on http as the universe has particles. "How many times am I going to have to write this multi-threaded class?" is something I found myself asking a lot.

Sure, I could create a class library, and just work with that, but I always felt I could optimize what I had, which often was a large undertaking and typically involved frequent use of the CRTL+A keyboard shortcut, mixed with the delete button.

It dawned on me that it was time to invest in a plugin system. This would allow me to simply add snippets of code. as time went on, and I could subversion stuff out, and distribute small chunks of code, rather than something that encompasses only a specific function or design.

This comes with its own complexity, of course, and by the time I had finished the software scope for this addition, it hit me that I would want to add to everything in the software, not just a new http method, or automation code for a specific website.

Great, we're getting more abstract.

However, the software that I have in my mind comes down to a quite a few questions regarding its execution. I have to have some parameters to what I am going to do. After writing what the perfect software would do in my mind, I came up with this as a list of requirements:

  • Should be able to use networking
  • A "Macro" or "Expression system" which would allow people to do something like :

=First(=ParseToList(=GetUrl("http://www.google.com?q=helloworld!"), Template.Google))

  • Multithreaded
  • Able to add UI elements through some type of XML -- People can make their own addons etc.
  • Can use third party API through the plugins, such as Microsoft CRM, Exchange, etc.

This would allow the software to essentially be used for everything. Really, any task you wish to automate, in a simple way.

Making the UI was as also extremely hard. How do you do all of this? Its very difficult.

So my question:

With so many attempts at this, I'm out of ideas how to successfully complete this. I have a very specific idea in my mind, but I keep failing to execute it. I'm a self taught programmer. I've been doing it for years, and work professionally in it, but I've never encountered something that would be as complex and in-depth as a system which essentially does everything.

Where would you start? What are the best practices for design? How can I avoid constantly having to go back and optimize my software. What can I do to generalize this and draw everything out to completion. These are things I struggle with.

P.s., I'm using c# as my main language. I feel like in this example, I might be hitting the outer limit of the language, although, I don't know if that is the case, or if I'm just a bad programmer.

Thanks for your time.

share|improve this question

closed as not a real question by gnat, Walter, Jim G., maple_shaft Sep 23 '12 at 23:45

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Always a good read when thinking about abstractions: joelonsoftware.com/articles/fog0000000018.html –  Hakan Deryal Sep 23 '12 at 6:54

2 Answers 2

A framework for everything is what we call a programming language, or for you maybe a domain specific language. Design a language that makes it easy to do everything you want to do in as little code as possible. There are plenty of resources out there for this.

Or if you want to build it all on an existing language like C#, keep in mind that many frameworks already exist on top of C# which cover pretty much everything. WPF, WinForms, Entity Framework, ASP.NET MVC, WCF... the list is a mile long. Do you think your framework for everything will be better than these, which together have required millions of man-hours and millions of dollars over several years to develop?

share|improve this answer
"A framework for everything is what we call a programming language," - that was my first exact thought :) Python can be thought of as abstraction on top of C and C is an abstraction on top of machine code which itself is still an abstraction. –  DXM Sep 23 '12 at 15:23

With the title, I'm sure you're assuming, "Yes of course you noob! You can't account for everything!" To which I have to reply, "Why not?"

Because all design decisions are a trade off. Design X makes Task A easier, but Task B harder. This is the same reason that there can be no universal programming language. By making any decision, you're invariably limiting your solution so that it can't deal (well) with certain tasks.

Good design limits fewer things, or things that are (nearly) guaranteed never to be needed. Your approach then should be to concede that some things won't fit under this framework. Code to the common case. Remember YAGNI. Iterate often, learning lessons from the previous iteration.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.