views:

33

answers:

1

I have chosen Domain Specific Language as my College Project, implementing it using Ruby. I seek suggestions regarding the Project's Objective/Problem, from the people who have worked with DSL Projects and would ask them to post the problem on which they developed their project exclulding the solution. I am trying to seek a real time problem for my Project and hope that I recieve some professional problems that you worked out with for your clients.

A: 

This might annoy the heck out of you, but when choosing what to program, simply always follow this advice: scratch your own itch.

You might want to see what we all do with DSLs (and I'll get to what I'm doing later), but that's irrelevant.

What problems do you have, that you'd like to see solved? That's what you should always be working on when you have the chance. It's the only way you'll stay enthused and interested!

With regards to DSL-specific ideas, what you're ultimately attempting is a means to having a shortcut to repeatedly solve a common set of problems without having to write a lot of code.

Think about things we currently do - or you currently do - with code, over and over again, having to tweak each time as the problem is subtly different. Ideas I have include:

  • Web scraping. I have to dive into Nokogiri every time I need to scrape a new site. It would be great if there was a shortcut language which gives me the power and flexibility I need, but I don't have to write a load of URI-handling stuff and find myself building stuff inside loops over and over again

  • Joshua's idea about webforms is a good one. Allowing a client to write a human-readable file that specifies a form or survey that can be dropped into an app would be awesome.

  • Rapid prototypes of software. What if in 10-30 lines of DSL code I could describe a web app with a couple of user flows (and perhaps some of my models with attributes), and you were able to generate a stubbed/scaffold Rails app for me to get started on (ideally with some RSpec in there as well). This could mean novice programmers could eventually build the foundations of quite complex web apps, and the lazy rails kids amongst us (incl. me) but bash up a prototype in half an hour. Yes, Rails is quick, but I think a prototype DSL could make it quicker. :-)

  • Extending this a bit, and as an aside, could you either take Cucumber (http://cukes.info) or replace it with another DSL so that when describing my scenarios I don't just get tests output, but stubbed/scaffolded code as per the above?

  • I'm currently working on (told you I'd get there) a DSL for a "Betfair bot". The principle would apply to other forms of market/exchange trading. I describe in my DSL a trading strategy, and it goes off and does it for me automatically. This could easily be used to study financial markets and do technical analysis and execute orders automatically I guess - however it could get more complex than you might think.

  • I'm also planning to write a DSL around mail and RSS processing. I get a lot of mail and RSS traffic, and rulesets aren't enough for me: I need to put some more intelligence in them. This is a bit of a back-boiler project at the moment though, as I could - at a stretch - do it with something like fetchmail and an rss-to-mail gateway, but it's something you might consider looking at too.

I know it's not quite what you asked for, but I'm hoping one of the above fires some sparks off in your head and you're feeling a bit more inspired. Good luck.

p7r
Thanks for your suggestions... I will see to it if I am able to solve the suggested problems...
Cody