Noob Q: Deconstructing a larger a app
-
Qt tutorials, books, and online videos are great, but they usually only cover widgets and very small applications. To understand how large scale applications are developed, is it a good idea for a noob to deconstruct a larger program from the source code, say an app downloaded from qt-apps.org, and use that as a framework to build a new application?
-
Diving into a large scale application (what is that anyway? 200k lines? 500k? 1M?) will surely overwhelm you when you don't have somebody familiar with the code next to you (really next to you, not just e-mail-contact), when you're relatively new to the area. Programming small scale and programming large scale are very different things and use very different patterns/idioms, which you might just overlook, misunderstand or that will just confuse you.
Further, I don't think any large scale application has one person that really is into the code of every module. Thus you won't be able to get the grip of the whole thing either, in my opinion.As you suggest building a new application out of the old one is nonsense. Not even the developers of the project could do that, they'd tell you they will rather start from scratch. When you build an airplane, you don't start by building a yacht and then try to reengineer it into an airplane. That thing's not going to swim nor fly.
It's a different story when you only want to add some features to the existing application, but I wouldn't call that "building a new one". -
DerManu,
Thank you for your reply. I guess what I'm not understanding or having trouble finding is documentation on large scale applications, by which I mean multiple windows, forms, project files, ect. You said "Programming small scale and programming large scale are very different things and use very different patterns/idioms." Is there any online doc's or other references about such patterns?I'm a geophysicist by training attempting to devolop a GUI based open source app for testing geophysical theory. While there is much code related to the subject, it is spread across many programs,platforms, and programming languages and most lack a GUI front end. Qt seems to have the greatest functionality and the most robustness which is why I chose it for the GUI framework.
I have many sketches of what I am trying to build, but I have come to an impass when attempting to design the top level frame. In other words, I have plans for many rooms and don't know how to build the house if that makes any sense.
Can someone please send me some good references?
-
My five cents:
I, too, come from a similar background (Quantum physics), so I'm not a software developer by profession. My way of getting a grip of those things was to go to the computer science area of our university library and read books that seemed useful for such purposes, including the big design pattern book by the "Gang of four" ("Design Patterns: Elements of Reusable Object-Oriented Software"). They don't explain large scale application development itself, but teach you certain non-adhoc ways of solving recurring problems (what's called a "pattern"). Some of those patterns are essential because they form a well-known basis for your approaches to certain problems. This way other Programmers also familiar with the patterns will have an easier time understanding your code – equally you will need some of the patterns to understand their code. This is something small applications don't necessarily need, because the code is small enough to not fall apart in spite of adhoc-solutions.
Although I've read many other advanced software development books here and there, because I, too am fascinated by how large software projects can possibly work, I'm afraid I know none of them from the top of my head (the content is always more interesting than the title you know ;). Getting into this topic was a rather inefficient process for me, so I never sat down with a serious curriculum and worked through the material. I just got it bit by bit. (Oh yeah, don't get me wrong, I'd never consider myself a professional large scale software developer. For that you'll need to do it as a job and think about this stuff for eight hours a day for ten years.)Further, some very useful information can be distilled from coding guides of large projects. See google's coding rules or the ones of Qt and KDE.
And nothing's worth more than failing. Start writing your geophysics application. Maybe it works out great, then you're happy. Maybe it falls apart or becomes inflexible. Then you start over, know your design mistake, do it better. Then you're happy, too. :)