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.

I'm enrolled in grad school and this summer we're tasked with a series of projects that should include implementations of design patterns from a couple of textbooks. Our first project is for one of a handful of system architecture patterns, and I can't seem to come up with a project to work on outside of examples involving object metaphors that do no real work. Which is probably fine, given the time frame (2 projects & a report a week). Still, we have more time in the Fall and Spring, and I'd like to... well, just be more creative in coming up with projects. The ability to come up with a kind of actual problem to solve that fits a particular solution, without being contrived, seems like a difficult skill to develop to me. With so many programmers being self-taught, however, I just figured I'd ask: When teaching yourself new skills in a hands-on manner, how does one find inspiration for projects?

Edit: This is unconstructive. Above, I bolded what I wanted, but I've been thinking today about how that's really not necessary and I forgot what school was supposed to be. What it really comes down to is doing the best job of meeting a goal within the allotted constraints. Ideally for a goal like gaining experience using a system architecture design pattern you'd want an actual software system to develop and more than a week after-hours to do the actual designing, development, and documentation. None of that is actually necessary in terms of actually meeting that goal. When it comes down to the constraints of a school assignment I'm simply going to be doing the best with what I have, which unfortunately is going to have to be some hokey console app with lots of <component> <verbed> <component> lines of output, and a solid report explaining how I met the goal.

share|improve this question

closed as not constructive by Jim G., GlenH7, gnat, Jalayn, user16764 May 15 '13 at 21:35

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Sorry, but voting to close. In essence, this is a variation of "what project should I work on next." Questions like that provide little residual value for future visitors and it's doubtful that the answers would be beneficial to anyone but you. –  GlenH7 May 15 '13 at 16:27
    
Up voted. My suggestion would be to come up with a few ideas for small projects - that would produce something that could be used in the real world for a non profit. then pitch your ideas. worst case scenario you learn something, best case scenario you create something of great value to a lot of people, and that will lead to many opportunities.... –  cartalot May 15 '13 at 20:06
1  
@GlenH7: well, I don't understand the question this way - I don't think the OP wants to get any suggestions for "projects". He is asking if there is a general way how to find good problems for demonstrating design patterns. –  Doc Brown May 15 '13 at 20:23
1  
@DocBrown - I can see that interpretation of the question, and that would be more constructive. The part that threw me was I can't seem to come up with a project to work on... CANTPRO - would you please indicate which aspect of the question your most interested in? And if it's the interpretation Doc Brown provided, please edit your question to reflect that. Don't worry if the question has closed in the mean-time. That's just a way to indicate the question needs to be revised. –  GlenH7 May 15 '13 at 20:42
add comment

3 Answers

Actually, if I had to teach something like this to other people in the last years, I did not start with a list of "solutions". I ever tried to start with real-world problems, if possible from the business context of the participants and then let the participants look for solutions (or, guided them to a "good" solution).

If you have a "solution" or "pattern", but cannot find a problem for which this pattern applies, most probably the pattern is not worth teaching.

By the way, when I remember correctly, for each of the GOF patterns, the original "design patterns" book mentions at least one real-world example. Also does the book "Pattern-Oriented Software Architecture", which contains some specific patterns for system architecture. Even when those examples are not the kind of problems you want your audience to be solved, they might be worth a look.

share|improve this answer
    
The assignments come from POSA and the book does have very detailed descriptions of how the patterns are implemented in real or at least realistic use as part of a system and does a good job of demonstrating their value, from what I've read so far. –  CANTPRO May 16 '13 at 0:53
    
@CANTPRO: well, the nature of architectural patterns is that they show its value only in software systems of a certain size - nothing your audience can easily develop in a couple of days. But as you know, there are open source systems available, including architectural documentation, where those patterns have been applied. I guess it might be possible to use those existing systems for your audience as examples. For instance, to demonstrate "pipes-and-filters", use a Unix or Linux system, show some of the available command line tools and let your audience develop a small filter program. –  Doc Brown May 16 '13 at 6:15
add comment

This is a notorious problem in computer science: How can you apply programming concepts in a real world application when most real world applications are highly complex and quite frankly, don't use these concepts for the most part?

Most programs are very complicated and as a consequence, the process of presenting these programs as a means to teach new concepts is both impractical and confusing to the student. It's easier to come up with a trivial program to explain these concepts rather than have to download the source of a complicated program and ask the student to make corrections to the code in order to add new functionality using the patterns they've learned. Ironically, this is precisely what programmers do on a day-to-day basis.

Also patterns, while very useful when used correctly, often times are not easily applied either because these opportunities don't present themselves or because they don't perfectly fit the pattern. Most programmers when faced with these types of problems simply don't attempt to implement any particular pattern (the lesser programmers would try to "make it work" anyway).

My advice to you would be to learn the patterns well, knowing full and well that they're merely just another tool in the toolbox ready to use if you happen to need it so that when the opportunity presents itself, you know how to apply it in the correct manner. This is more important than seeing the pattern applied in a real world application if you understand it well enough. However, like tools in a toolbox, please don't ever use a hammer on a screw.

share|improve this answer
add comment

Well, in my opinion this workflow is the wrong way round. Your teacher has to clearly separate between teaching the technical overall concepts (in this case the patterns) and only then providing you some real world problems you should try to challenge and which are solvable by any of the patterns you got taught.

In contrast to the real world, you have clarity that the given problems are in fact solvable with any (or a set) of the given patterns. The key in this workflow is that you explicitly have to think about which of the patterns applies best to a given context. I'd say that this is a way which enforces you to think about the problem which is essential work before writing any line of code.

Back in the days when I tried to teach myself the basic concepts including patterns, I followed this pattern:

  1. Try the concept in an artifical environment, e.g. the examples from a book, to get a feel for how it technically works
  2. Search the net for applications of this concept in various contexts
  3. Try to get as much information about the concept as you can to reach 4)
  4. The goal is that the pattern name stays in your long-term memory associated to the problems which can be solved with it
  5. If you face a problem, you bring the associated pattern to your mind and apply it (possibly with some modifications)
share|improve this answer
add comment

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