[OT] How to learn software design

T

tanix

Michael Doubez wrote:
Michael Doubez wrote:
Andy Champ wrote:
Eric B se-Wolf wrote:
[lots of sarcasm snipped]
So it all depends on experience?
Mostly, yes. =A0Get a job in a good software shop - not something= little,
but one with big teams. =A010 years down the line you'll probably= have the
idea.
Bad advice. In big companies, people are on their own, and nobody = to
guide them. At least that's my experience in a big company.
Well, that's true for one's whole life :) Don't wait for somebody t= o
feed you.
Give a man a fish and you feed him for a day. Teach a man to fish an= d
you feed him for a lifetime.

In the first place, why would you expect anybody to give you a fish o= r
to teach you how to fish ?

Because I was naive and expected too much ;)

((Oups))

Well, that's your job to determine it: too much ? not well placed ?
not handled appropriately ? someone wronged you ?

Whatever the answer, IMHO bitterness springs up when you could not
adapt to your environment.

Oh, another smart fart.
:--}

You CREATE your own environment.
Chameleons "adapt".

People CREATE.

You CREATE your wold as you go.
Unless you think you are no more than a slave
of that "environment" and whatever you can do
is no more than a dead mosquito fart.

And so, eventually, you are BOUND to come to the junction
the mankind is at right now, and that is TOTAL devastation
on the face of the planet Earth.

Because all those lil parasites just silently "adapt"
and allow the most vicioust monster to exploit everything
that moves and does not move for that matter.

You need more?
Or it would be enough to activate some latent neurons
in your cockpit?
Funny how people start talking about software design and end up
talking about life choice. IMO it is because ultimately, software
design is also a matter of making choices relatively to a problem
space; which is easy to say :).

Here is something you, great software designers better know about:

"We need a program of psychosurgery and
political control of our society. The purpose is
physical control of the mind. Everyone who
deviates from the given norm can be surgically
mutilated.

The individual may think that the most important
reality is his own existence, but this is only his
personal point of view. This lacks historical perspective.

Man does not have the right to develop his own
mind. This kind of liberal orientation has great
appeal. We must electrically control the brain.
Some day armies and generals will be controlled
by electrical stimulation of the brain."

-- Dr. Jose Delgado
(MKULTRA experimenter who demonstrated a
radio-controlled bull on CNN in 1985)
Director of Neuropsychiatry, Yale University
Medical School.
Congressional Record No. 26, Vol. 118, February 24, 1974

Dig?

--
Programmer's Goldmine collections:

http://preciseinfo.org

Tens of thousands of code examples and expert discussions on
C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript,
organized by major topics of language, tools, methods, techniques.
 
M

Michael Doubez

Michael Doubez wrote:
Michael Doubez wrote:
Andy Champ wrote:
Eric B se-Wolf wrote:
[lots of sarcasm snipped]
So it all depends on experience?
Mostly, yes. =A0Get a job in a good software shop - not something= little,
but one with big teams. =A010 years down the line you'll probably= have the
idea.
Bad advice. In big companies, people are on their own, and nobody = to
guide them. At least that's my experience in a big company.
Well, that's true for one's whole life :) Don't wait for somebody t= o
feed you.
Give a man a fish and you feed him for a day. Teach a man to fish an= d
you feed him for a lifetime.
In the first place, why would you expect anybody to give you a fish o= r
to teach you how to fish ?
Because I was naive and expected too much ;)

Well, that's your job to determine it: too much ? not well placed ?
not handled appropriately ? someone wronged you ?
Whatever the answer, IMHO bitterness springs up when you could not
adapt to your environment.

Oh, another smart fart.
:--}

You CREATE your own environment.
Chameleons "adapt".

People CREATE.

Please spare us the cheap spirituality: the act of creation is very
rare and doesn't have its root in the self as you claim it. Otherwise
there would be more poets and artists.

While you can influence your environment, the first step is always to
adapt to its current state, otherwise your actions will miss the
point.

I think your are mistaken in the various levels of being.
You CREATE your wold as you go.

There is a name in psychology for that specific pathology.
Unless you think you are no more than a slave
of that "environment" and whatever you can do
is no more than a dead mosquito fart.

I recognize the gap between my internal world which is infinite and
timeless and the external world which is bound by time, matter and
energy.

I adapt to this gap and align my energies with the current state of
the world, as I perceive it, to reach my goals.
[snip blather]
You need more?

More words ? Certainly not, you've drowned us with them already.
Or it would be enough to activate some latent neurons
in your cockpit?

Yes. I come to my sense and won't waste more time on this thread.
 
D

dragan

Eric "Böse-Wolf" said:
I know it is off topic, but maybe someone could
give me a hint for a good book or few tips on
learning software design.

With software design I mean the step from the requirements
to some sort of software architecture.

Many approaches are possible of course. Fundamental knowledge is the
starting point IMO: read the pattern books and such, study existing systems
and software from a high level (rather than doing something like loading GCC
source code in your IDE), use Doxygen to analyze source code at a high
level, pay attention to how things interact (the "interfaces") rather than
the things themselves, avoid large team development roles if you can (you'll
get buried in the details rather than gain high-level perspective), create
entire application programs but do start with the pen and paper and circles
and arrows and such, way before writing any code. Do not write a whole book
of documentation before doing some iteration and feasibility studies, but do
write important things down in additon to your "circles, boxes and arrows"
or you will forget your decision-making path come implementation time.

"Jumping in with both feet" is OK, but some amount of study and THINKING
(design is more thinking than annotating) is prudent. Don't OVER-study the
commonly tauted "principles" either: you'll get to know the trade-offs and
when they apply by doing (designing and architecting, that is). Most of the
"principles" are not documented or available to read about, realize, as
experienced designers/architects draw from the larger wealth of knowledge
and experience rather than the much smaller scope that is Information
Technology.

(This is the most key point IMO: designers/architects are born, not made or
taught. If you are asking how to be one, maybe that is a sign). Know
yourself: designers find it natural to design. They create the patterns
rather than go out and look for them. Are you "a picture person"? Or do you
prefer to read/listen? Some people, perhaps most, are better at filling in
the details of a good design/architecture. Then again, some people are so
high level that their designs are not practical (cannot be implemented).
Practicality vs. extremism seems to be a big problem in SW engineering (I
think STL is the latter, for example).

Distinguish between "high-level" design and "low-level" design. The former
should be pretty much devoid of programming language peculiarities.

Build small systems and application programs first. Large systems have
specialized skill requirements but they are IN ADDITION to the stuff you
learn from building complete small systems/programs thoroughly. Taking
programs that you have already developed and "rearchitecting" or
"refactoring" them is a good starting point, for you are already have a lot
of useful information about the domains (plural).

Avoid the formal methods and stick with pen and paper (or an appropriate
graphics program). The programming-specific tools and methods are for
low-level design the ill-fated attempts at creating the proverbial "software
factory" on-the-fly (read, project work/"general SW dev").
Designing/architecting is a creative process and as such it is not conducive
to highly-structured "methods" or management (those things stifle
creativity). Your rate and patterns of creativity are just that: highly
personal: you probably can't turn it on and off like a light switch all the
time. Some days you will be highly motivated and creative and other days you
will plod along drudgerously.

Architecting the system doesn't qualify one to manage the project, realize.
Realize too that it doesn't preclude that: "ownership is nine-tenths of the
law". I've never seen a project run by someone from a business background
devoid of technical background be nearly as successful as it could have been
if someone with an engineering background was running the show (requisite
management skill are still required of course). Business rule implementation
sits on top of architectural technical foundation, NOT the other way around.

Finally, don't do it my way, do you your way! Good luck.
 
D

dragan

Pete Becker said:
I used to play a musical instrument, but I've found that the thing that's
contributed most to my understanding of programming and program design was
law school. That's where I learned to cut through the distractions to see
what's really there.

Both allude to what I think are very relevant concepts and not just
folklore: that the larger scope of someone's experience and knowledge is
very important in graduating to an advanced level of designing/architecting
capability.
 
S

Stefan Ram

dragan said:
Finally, don't do it my way, do you your way! Good luck.

What I do, when I do not know how to design:

I code in any way that will solve the problem, however
crude. Then, I refactor, refactor, refactor.

Often it is impossible to see some things in advance.

http://www.mindhacks.com/blog/2008/03/rock_climbing_hacks.html

For example: object design. Which variable should go
into an object?

When I start to code crudely, I sometimes see that a certain
value always is passed to a certain object:

classexample object( alpha, beta );

... object.gamma( delta, 2 ) ...
...
... object.epsilon( delta, 4, x, y ) ...
...
... object.zeta( delta, range, delim ) ...

So this becomes:

classexample object( alpha, beta, delta );

... object.gamma( 2 ) ...
...
... object.epsilon( 4, x, y ) ...
...
... object.zeta( range, delim ) ...

For example, I always wanted to write a rogue-like game like
nethack, but I can not see how to split it into objects,
because many properties belong to one huge »world« object.
So what I will do: I will write this huge world object, even
if it will fit the god object antipattern. But I am sure,
that then (later) I will see ways, how to refactor it.

When creating complex things, one often passes through stages
that simply are wrong or look wrong to an outsider, but they
are necessary as intermediate stages, not the final thing.

Of course, one needs some patience. There might be
conditions in a company that do not allow the time
necessary for a high-quality developement process.
 
S

Stefan Ram

What I do, when I do not know how to design:

The idea to do an »up-front design« and then implement
this, actually is the waterfall method.

It is not totally broken, but only works sometimes for

- small or simple projects with a fixed set of requirements or

- projects of the kind one has already done very often
(here »experience« comes in).
 
M

Mick

Stefan said:
The idea to do an »up-front design« and then implement
this, actually is the waterfall method.

It is not totally broken, but only works sometimes for

- small or simple projects with a fixed set of requirements or

- projects of the kind one has already done very often
(here »experience« comes in).

While literally correct that Waterfall is one good SDLC method. I
suspect the OP was looking for: "How do I convert this application
concept/idea into working code?".
Rather than "How do I design the entire development process for this
company?".
 
T

tanix

Many approaches are possible of course. Fundamental knowledge is the
starting point IMO: read the pattern books and such, study existing systems
and software from a high level (rather than doing something like loading GCC
source code in your IDE), use Doxygen to analyze source code at a high
level, pay attention to how things interact (the "interfaces") rather than
the things themselves, avoid large team development roles if you can (you'll
get buried in the details rather than gain high-level perspective), create
entire application programs but do start with the pen and paper and circles
and arrows and such, way before writing any code. Do not write a whole book
of documentation before doing some iteration and feasibility studies, but do
write important things down in additon to your "circles, boxes and arrows"
or you will forget your decision-making path come implementation time.

"Jumping in with both feet" is OK, but some amount of study and THINKING
(design is more thinking than annotating) is prudent. Don't OVER-study the
commonly tauted "principles" either: you'll get to know the trade-offs and
when they apply by doing (designing and architecting, that is). Most of the
"principles" are not documented or available to read about, realize, as
experienced designers/architects draw from the larger wealth of knowledge
and experience rather than the much smaller scope that is Information
Technology.

(This is the most key point IMO: designers/architects are born, not made or
taught.

Very good. Not far from being right on the money.
If you are asking how to be one, maybe that is a sign).

People think that sw design is like a skill you aquire in some school,
like a plumber or machist.

Yes, you CAN aquire plenty of knowle, but the whole art of it
will be missing.
Know
yourself: designers find it natural to design.

Yep. In fact it is not a "job" to them. It is something they get the
kicks out of. It is some necessity to them, like an oxygen.
They create the patterns
rather than go out and look for them.

Correct. When someone talks to me about "design patterns".
I tell them: I CREATE them and I created plenty. So far, did not
see an area where I would not feel comfortable with.

Sure, you can read the patterns from some book and blindly apply
them anywhere you can find a place to stick them on. But all of
it is artificial. It won't necessary be that, which is truly
requiered by your situation.

There are ALL sorts if issues with patterns, down to issues of
debugging. Some time ago, I needed the web crawler. So I found
some nice piece of code that looked promising. It did do most
of what I wanted. But it did have some pretty bad shortcomings.

It was using the visitor pattern.
The code was totally undocumented and I spend WEEKS trying
to understand all the intricacies. When I was debugging it,
it was a nightmare. You are totally event driven and the
environment is totally async. You don't even know where
to set the breakpoints, and even if you single step through
the whole thing, it is such a major headache, that it takes
you at least 10 times more time and effort.

And THAT is the reason I suspect that powerful and beautiful
piece of code was eventually abandoned and author stopped
maintaining and improving it. Becaues we got overloaded with
the complexities of it to the point that it was ubearable.

So, the visitor patern in the async, event driven state machine
is a disaster. And so I saw with other patterns.

People think that patterns is some kind of paradise.
Nowadays, about the fist question you are asked on the
interview is: do you know design patterns?
And if you don't, you are some kind of clueless idiot to them.
You won't have a chance in most places.

What a joke.
Are you "a picture person"? Or do you
prefer to read/listen? Some people, perhaps most, are better at filling in
the details of a good design/architecture. Then again, some people are so
high level that their designs are not practical (cannot be implemented).
Practicality vs. extremism seems to be a big problem in SW engineering (I
think STL is the latter, for example).

Yep, plenty of new "technologies" in the sw business could be classified
as extremism. The overkill and overload with complexities probably not
helps anything at the end, but creates more problems than it solves.

To me, your code should be readable like a news article.
You should be able to understand ANY piece of code within seconds,
and not sit there for hours, trying to comprehend all the nasty
details, going as far as spending minutes if not hours just to
understand the parameters of some method. I saw some code that is
basically unreadable, unless you are willing to spend HOURS,
and even there it is not clear you will see all the intricacies
of it.

People do not have that time nowadays.

On the top of it, those complications essentially do not buy
you anything. The bang for the buck is as low as it gets, and
the costs of code maintenace and expanstion is immense.

Quite often, people create overly complicated things just to
show others how "great" they are, which is basically the result
of complex of inferiority.
Distinguish between "high-level" design and "low-level" design. The former
should be pretty much devoid of programming language peculiarities.

One of the things I remember from my early days of programming
was this recepie:

Top down design and bottom up implementation.
That is probably the most valuable overall rule for sw development.
I intuitively use it more often than not.

Once you have your low level stuff worked out and working,
it makes it a breaze to hang higher level stuff on the top of it.
Build small systems and application programs first. Large systems have
specialized skill requirements but they are IN ADDITION to the stuff you
learn from building complete small systems/programs thoroughly. Taking
programs that you have already developed and "rearchitecting" or
"refactoring" them is a good starting point, for you are already have a lot
of useful information about the domains (plural).

Basically, I consider it the issue of modelling.
By creating a model, you will be able to test it and see all sorts
of things that you could not even expect before you started.
And I mean MOST of it, no matter who says what.

Then you can SCULPT your project. I do not program, I SCULPT it
like a sculpture.

From the first days on a project, this thing becomes alive.
So, you never end with doing ALL sorts of things without even
knowing if your entire concept is correct and your house does
not end up "being built on sand", and quite literallly at that.

From the first days, your creation should be alive.
So you can see its freakingess, its weakenesses, its beauty.
It should sing or hum as Rolls Royce, every step of the way.
Avoid the formal methods

I do agree with this one.
and stick with pen and paper (or an appropriate
graphics program). The programming-specific tools and methods are for
low-level design the ill-fated attempts at creating the proverbial "software
factory"

Correct. Those "factories" are some of the biggest pain on the
neck that do not necessarily buy you anything, but give you ALL sorts
of headaches and make it more difficult even for you to understand
your code.
on-the-fly (read, project work/"general SW dev").
Designing/architecting is a creative process and as such it is not conducive
to highly-structured "methods" or management (those things stifle
creativity).

Correct. They simply eat MOST of your energy on constanly worrying
about things, that you never have to worry about.

I can produce immence improvements in my projects in a matter
of days. In few days, I sometimes add some much new functionality,
that it becomes a problem to even verify it all, even thogh it
all works pretty much out of the box.

And debugging and making it more robust becomes more or less
an idle excersize because it flows by itself. No headaches.
That is when you can take a break and take it easy.

Debugging mostly becomes a verification procedure to make sure
ALL the error conditions have been handled without being lazy
or sloppy about something that "can not happen in 'REALITY'".
Your rate and patterns of creativity are just that: highly
personal:
Correct.

you probably can't turn it on and off like a light switch all the
time. Some days you will be highly motivated and creative and other days you
will plod along drudgerously.

Well, for me, for MAJOR architectural decistions and design
"patterns", it is a process of MATURING.

This process sometimes takes MONTHS untill it all finally
falls into place. I never try to write a piece of code that I can
put a final dot on it. So, no need to overstress yourself perfecting
something, that is not totally clear from the standpoint of
system as such and ALL sorts of most subtle interactions,
the issues of efficiency, compactness, robustness and you name it.
Architecting the system doesn't qualify one to manage the project, realize.
Realize too that it doesn't preclude that: "ownership is nine-tenths of the
law". I've never seen a project run by someone from a business background
devoid of technical background be nearly as successful as it could have been
if someone with an engineering background was running the show (requisite
management skill are still required of course). Business rule implementation
sits on top of architectural technical foundation, NOT the other way around.

Finally, don't do it my way, do you your way! Good luck.

--
Programmer's Goldmine collections:

http://preciseinfo.org

Tens of thousands of code examples and expert discussions on
C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript,
organized by major topics of language, tools, methods, techniques.
 
T

tanix

Both allude to what I think are very relevant concepts and not just
folklore: that the larger scope of someone's experience and knowledge is
very important in graduating to an advanced level of designing/architecting
capability.

One of things you learn with music is to deal with abstractions.
Second thing you learn is to trust yourself with improvisation.
That gives you a subconscious hint that things are still possible
even if you don't "know" which note to play next, how long and
loud, with what accentuation, with what sustain and decation,
with what tone and according to what rythm, manifest or implied.

This an immense amount of "information processing".
It is like walking on a mine field, never knowing what your next
step is going to be, a step to life or the end of your trip.
And, some people, miraculously still can walk on the mind field.
In fact it is a daily job for them.

With music, you learn now to construct objects.
It is forever a process of construction.
You also learn the principles of harmony and principles of
melody (the equivalent of sequential logic).

Plus, you learn to be a PART of the whole orchestra
and see how your playing fits into the whole piece of music.

And the grandest thing of all, you learn EXTACY.
Extacy with existance. An orgasmic feeling with life.
Something that feeds your very soul,
gives you a taste of the very JUICE of life.

Without it, you are like a machine, more or less,
programmed with knowlege to follow someone elses path,
but not your own. You never learn the very joy of existence.
In fact, you don't even have time to even recognize it
when it comes, being forever busy, trying to forever jump
higher than your own weanie, without realizing it is simply
an impossibility. Thus frustration. The grandest frustration
of all - not being able to express yourself, accept yourself
as you are and trust yourself as something PERFECTLY valid,
no matter what who says what and no matter how much you
yourself doubt your own validity.

Cool, eh?
:--}

--
Programmer's Goldmine collections:

http://preciseinfo.org

Tens of thousands of code examples and expert discussions on
C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript,
organized by major topics of language, tools, methods, techniques.
 
J

James Kanze

(e-mail address removed) (tanix) wrote:

[...]
Real programmers are those, who DON'T ship!!!

The actual quote is "real programmers don't eat quiche".

But of course, programmers how don't ship are quickly
unemployed.
Those, who "ship" write the crappiest code there is.

That's perfect nonsense. All professionals deliver code.
Well, simply because they have no time to do it forever being
under pressure to "release" and are being forced to do a 3
month worth of work in 3 weeks.

And that's also nonsense. Release dates are only established
after discussion with the programmers, and take issues like code
quality into consideration.
Their documentation sucks. It does not tell you anything
useful.

Then the product doesn't get through review, and doesn't get
released.
Their code sucks.
And their sharks called VPs and CEOs are nothing more than
viciouse sharks, whose only interest is to suck as much blood
from anything that moves as they can manage.
Their customer support sucks and at the biggest and baddest
places is simply non existant.
Their "interpersonal skills" suck becaues of "fear of
survival".
They are, on the most part vicious, utterly inhuman idiots,
driven by the complex of inferiority.
Clear enough?
Or you need more?

Obviously, you've never worked at any professional companies.
 
T

tanix

(e-mail address removed) (tanix) wrote:
[...]
Real programmers are those, who DON'T ship!!!

The actual quote is "real programmers don't eat quiche".

But of course, programmers how don't ship are quickly
unemployed.
Those, who "ship" write the crappiest code there is.

That's perfect nonsense. All professionals deliver code.

True, and that creates the whole industry to hire other
"professionals" that forever fix that stauff.
So, everybody remains gainfully employed.

And that helps. You need a few bux in your pocket once
in a while.

:--}
And that's also nonsense. Release dates are only established
after discussion with the programmers, and take issues like code
quality into consideration.

I know, I know.
Heard those "discussions" before.

The way they usually go is:
"we have 3 months to release this thing"
and not a single person on the whole team does even know
what is involved and what kind of nasty details are going
to popup.

Pretty often, when they tell me their "dead" lines,
I say, oh shitski, this is going to be a trip!
Then the product doesn't get through review, and doesn't get
released.

Not necessarily.
You think there is some kind of "panel" from God,
omniscient that produces the objective and realistic deadlines
and specifications? Never seen anything like that.

In about 90% of all cases, just to be safe,
what I saw is either UTTER abscence of documentation
or such arrogant and such useless inline statements,
that most of it is just an insult and has no practical use.
Obviously, you've never worked at any professional companies.

Well, I gave you a list already. One more time:

Intel.
HP.
SGI.
Amdahl.
Hal Computers (Fujitsu)

and a few others, right smack in the middle of silicon valley.

You've got something MORE "professional" that that?

Who are you kidding?

--
Programmer's Goldmine collections:

http://preciseinfo.org

Tens of thousands of code examples and expert discussions on
C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript,
organized by major topics of language, tools, methods, techniques.
 
J

James Kanze

[...]
Well, simply because they have no time to do it forever being
under pressure to "release" and are being forced to do a 3
month worth of work in 3 weeks.
And that's also nonsense. Release dates are only established
after discussion with the programmers, and take issues like code
quality into consideration.
I know, I know.
Heard those "discussions" before.
The way they usually go is:
"we have 3 months to release this thing"
and not a single person on the whole team does even know
what is involved and what kind of nasty details are going
to popup.

If that's the way it goes, then it's time to change jobs. I
have seen one case of that, but it's rather the exception.
Managers who run their division like that end up on a dead end
siding very quickly.
Not necessarily.
You think there is some kind of "panel" from God,
omniscient that produces the objective and realistic deadlines
and specifications? Never seen anything like that.

Not from God. Deadlines are negotiated with the implementers,
at least in any well run shop.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top