PDA

View Full Version : Programmer-Oriented Programming


MichaelxxOA
01-05-2008, 10:21 AM
This is me ranting about wanting to make my job less stressful.

I want to focus on making good decisions from the beginning. As a human I can only retain so much information and keeping up with everything is overwhelming. As a professional it is my responsibility to make good decisions using what I have at hand. Being on the cutting edge of technology and technique is a result of me growing as a programmer. I should be comfortable with the decisions I make now even though I don't know all of the options I have available to me. As I learn I am able to apply. Knowing everything isn't what being a professional is about.

It seems that, more often than not, my decisions are made arbitrarily. If I need a variable I create it. If I need a method I write it. If I determine a class is necessary it comes to fruition, but even here I'm not completely sure how I make the determination ... I just do and I feel that it's a problem. We don't have anything concrete to base our decisions off of. Instead we are given ideas of how to go about things. Ideas like generalizing, hiding your data, programming to interfaces, and so on. Are there decisions that can be made based on context?

It has been suggested to me that Design Patterns are the "right way" to program in an object-oriented manner, but this is false and misleading. It's a deceptively good way to think, but design patterns generally only describe the relationships and interactions between classes and objects. Programming in an object-oriented manner is, in fact, a much richer topic. Most of what is available on learning how to suffers from the same issue: the way object-oriented programming (OOP) is taught and the way it is practiced are not the same.

So why say anything? I have been making very dramatic changes in the way I approach programming. Some of the ideas are my own, but a lot of it comes from people with more experience and wisdom. What I don't have are peoples opinions on things they find stressful about programming and whether or not people will find writing about these things useful. That is what this thread is for. I would love to talk about the things going on in my brain, but I definitely don't want to bore anyone.

hangalot
01-05-2008, 04:04 PM
some questions from me to see what kind of conversation we should be happening.

do u use flash or flex,
do you unit test,
do you have a CI machine,
what framework(s) do you use

Cota
01-05-2008, 10:11 PM
I believe its conversations like these that push our industry forward. Some one with the courage to stand up and question the "rules of engagement".

For years I was seen as a trouble maker simply because I question the "standards" of development. Lets remember, these standards originated from a single person, who simply sought to have his/her opinions accepted by all developers in a particular technology.

Before any of you go off telling me what an idiot I am, step back and let the man air his thoughts, we may all actually learn something about development, or even ourselves.

Flash Gordon
01-05-2008, 10:13 PM
Hey Michael, I got an A on my paper buddy! Thanks pal! :)

And rant on, friend. I always learn from you guy's rants.

peptobismol
01-07-2008, 02:01 AM
however you want to want to do it, you have to keep in mind the modularity of your work.... Will it be a pain to update, modify, correct? (by you and others)... And also the fact that many people might work on a project as well.

That's why OOP is the preferred method. This is about efficiency and productivity more than anything.

Cota
01-07-2008, 02:12 AM
I think you're missing the point of what he's getting at.

peptobismol
01-07-2008, 02:17 AM
what is the point?

MichaelxxOA
01-07-2008, 03:19 AM
I'm still writing the second reply.

Focus on how we make object-oriented decisions. What principles affect your structural decisions?

Consider these three simple examples:


Variables store
Functions compute
Classes define relationships between variables and functions


Do you consider the following when determining good program structure:


The lifetime of variables
How often the state of a variable changes
The scope of classes


@FG awesome! :)

Cota
01-07-2008, 03:40 AM
Whats the point? Please do not be offended by my response, but thats a pretty closed minded response. The whole point of this thread was for Michael wade through his thoughts on OOP and the techniques "the powers that be" have proclaimed stadards.

You cant expect to have a clear, cut and dry, response right away. Give it time to develop and please keep an open mind. I'm not 100% where its going either, but lets enjoy the ride and see what we learn.

peptobismol
01-07-2008, 04:51 AM
there's no emotional or 'closed mindedness' to my response... I was just asking what you think MichaelxxOA's point was...

You didn't understand my point....
My point is it doesn't matter the decision is to when or why to create a variable as long it is a clear, efficient, productive decision.

And the 'mantra' for computing is usually right because it works in a precise, efficient way. And it's a proven standard...
You can have your methodology.. That's fine if it works for you.

Cota
01-07-2008, 04:59 AM
How do you define a "proven standard"? Because a few people in the industry say it is? Bare in mind, this conversation is bound to be more philosophical than a re-invention of the industry.

peptobismol
01-07-2008, 05:12 AM
of course this is philosophical.. We're deconstructing a methodology... Code is irrelevant at this point :)

I'm assuming we've all taken advanced programming classes here.. Or at least have read a few books about a size of baby on this topic... (I wish I read more fiction)

Are you criticizing those methodology that's taught in schools? Because programmers learn this methodology and are in the work force now. And big companies are hiring them. That's why it's a proven standard.

MichaelxxOA
01-07-2008, 05:32 AM
What I am talking about has absolutely nothing to do with current standards, methodologies, or conventions. I have no idea where you got that idea.

Good program structure reveals the intentions of its developer. Understanding what the developer was intending to do allows programs to be understood and therefore maintained more effectively.

Variables and functions serve as the building blocks of computer programs. If decisions regarding when, where, and why they are created are made arbitrarily, what is there to understand other than their obvious necessity?

I want to make my job "less stressful" by removing a lot of the obscurity with which I make my decisions. I have found ways to do this and I'm hoping to further develop the idea.

peptobismol
01-07-2008, 06:02 AM
What I am talking about has absolutely nothing to do with current standards, methodologies, or conventions. I have no idea where you got that idea.

Good program structure reveals the intentions of it's developer. Understanding what the developer was intending to do allows programs to be understood and therefore maintained more effectively.

Variables and functions serve as the building blocks of computer programs. If decisions regarding when, where, and why they are created are made arbitrarily, what is there to understand other than their obvious necessity?

I want to make my job "less stressful" by removing a lot of the obscurity with which I make my decisions. I have found ways to do this and I'm hoping to further develop the idea.

Sorry if we're going left field with this thread but methodology is the key to your problem/question?

Well, first you have a problem.. then you map out a solution.. Some people sketch out this route, defining functions & variables they're going to use just like how flashGordon did in this thread http://www.actionscript.org/forums/showthread.php3?t=150549

Some people do all that in there heads (me).. And some make it up as we go (all of us)... This last method produces sloppy and inefficient code most times..


I don't think there are arbitrary decisions btw.

hangalot
01-07-2008, 11:08 AM
What I am talking about has absolutely nothing to do with current standards, methodologies, or conventions. I have no idea where you got that idea.

Good program structure reveals the intentions of its developer. Understanding what the developer was intending to do allows programs to be understood and therefore maintained more effectively.

Variables and functions serve as the building blocks of computer programs. If decisions regarding when, where, and why they are created are made arbitrarily, what is there to understand other than their obvious necessity?

I want to make my job "less stressful" by removing a lot of the obscurity with which I make my decisions. I have found ways to do this and I'm hoping to further develop the idea.

are you going to answer my questions regarding testing and frameworks. a lot of what you say would indicate that you do not unit test.

MichaelxxOA
01-07-2008, 09:26 PM
are you going to answer my questions regarding testing and frameworks. a lot of what you say would indicate that you do not unit test.

I'm not sure how you got the idea that I don't unit test. =)

I use Flash to put together movies which can be interactive. I use frameworks that offer a lot of what my project requires. I unit test, but I'm not always brought into projects that allow for it. If you do unit test it becomes just another aspect of programming. I usually use CI machines when working within a team. Maintaining the progress and scope of a project makes Continual Integration (CI) a fundamental process in a team environment.

Everything you mentioned relates to how you approach a project and not necessarily how you program it.

I'm not a stranger to the processes of software development.


...

I want to make my job "less stressful" by removing a lot of the obscurity with which I make my decisions. I have found ways to do this and I'm hoping to further develop the idea.

I don't mind the discussion, but I'm putting together a reply which doesn't relate to any of the responses. I gave reasons for my changes in the first post.

hangalot
01-08-2008, 09:48 AM
I unit test, but I'm not always brought into projects that allow for it. If you do unit test it becomes just another aspect of programming.


all projects should be unit tested, it becomes your documentation.
process is not another aspect of programming, i disagree on that, software is such an immature engineering enviroment and your process is all you have to ensure quality.

jsebrech
01-08-2008, 10:23 AM
You ask how you determine when to use a variable? Well, how does a welder decide where to place his welds? How does a woodworker decide where to shave curls off the wood for the chair he's building? Programming is a craft, that involves intuitive insight, talent, skill, and finally knowledge. The issue is that programming in academic environments is seen as science: a bunch of inputs, some functions to map those inputs, and an output. That is not how programming happens in practice. Even though programming tools are clearly science, the act of programming itself is not, and it suffers from the fact that it is taught as if it is science.

hangalot
01-08-2008, 10:31 AM
You ask how you determine when to use a variable? Well, how does a welder decide where to place his welds? How does a woodworker decide where to shave curls off the wood for the chair he's building? Programming is a craft, that involves intuitive insight, talent, skill, and finally knowledge. The issue is that programming in academic environments is seen as science: a bunch of inputs, some functions to map those inputs, and an output. That is not how programming happens in practice. Even though programming tools are clearly science, the act of programming itself is not, and it suffers from the fact that it is taught as if it is science.
i totally agree, its a manufacturing process akin to most other engineering sciences instead of a "real" science. it has so many soft issues involved/

MichaelxxOA
01-08-2008, 11:25 AM
Again ... I never said that 'process' is another aspect of programming. I said 'unit tests' are another aspect of programming. You write unit tests for your program and validate by compiling or am I missing the point?

I'm not arguing when or where unit testing should take place. What if you don't have control of a project? What if you're brought onto a project well after it has started? According to methodology tests should be written before the program.

This has to do with programming and not process. Maybe you don't need any of this? I'm not telling you how to program. I am trying to discuss things which have helped me while I write programs.

Is there anything wrong with me trying to base my day-to-day decisions on more than my intuition?

I keep coming back to variables and functions because just about everyone understands them. What makes variables and functions different?

Accessing a variable is like executing a function which returns the contents from a location in memory. Executing a function is like reading a location in memory whose contents are computed. Is there any value in emphasizing store-vs-compute decisions?

The possibility of a function returning void seems to most affect our general idea of what they are. Is returning void a convenience for functional decomposition?

Just these two things have an impact on how I decide when to create a variable or a function.

I don't know how you guys keep finding something wrong with what I'm saying when I'm only trying to get ideas out which have helped me. Should I even continue?

hangalot
01-08-2008, 11:32 AM
i am not finding anything wrong in what you are saying, i think this is a valid conversation.
one of the things i have learned over the last few years (i run teams of up to 20 people these days) is that one developer is fine, but several developers need process. making things easier to understand is all part of this. my thoughts are very process orientated currently as i see this as the easiest way to create code of high quality. a lot of what you originally said is encapsulated around this (for me at least).
i am but putting fwd my point of view :)

MichaelxxOA
01-08-2008, 11:49 AM
I understand, I just didn't expect it to turn into this. So I'm trying to keep everything focused while responding, but it's difficult. :)

Eventually I plan on getting to questions you can ask yourself while programming. These questions emphasize good program structure. I do not mean to replace or challenge process, standards, methodologies, or convention. Instead I want to provide structure within which smaller decisions can be made. I don't like thinking to myself should this be a class? should this be a variable or a function? should this be a field here or a field there? That sort of thing. A lot of the answers to these questions exist within the context of the code.

Anyway, I really do appreciate the discussion. I'm off to bed though. Night!

hangalot
01-08-2008, 01:25 PM
there is a book called Code Complete which I can recomend for these types of questions

MichaelxxOA
01-08-2008, 04:48 PM
Code Complete (http://cc2e.com/Default.aspx) is an excellent book, but still doesn't cover what I'm getting at the way I'm getting at it. I'll try to get a second post up today.

newblack
01-08-2008, 06:49 PM
i think what you're trying to do is prove/find worth in what appears to be arbitrary decision-making. but the truth is that it's not arbitrary- it's simply intangible from a "fly by the seat of your pants" standpoint. in any problem solving situation (not just programming), there is something that can be identified as process. needing a method here and a property there seems like a rather dismissable impetus for your application's design, but it stems from the quite powerful origin of need satisfaction. in other words, you're solving the needs of your system by addressing its problems. if you step back from this instinctual-seeming, compulsive design and abstract a solution that's elegant and sweeping; you're STILL satisfying the need for that initial problem to be solved.

jsebrech
01-09-2008, 10:25 AM
The thing is: there is no simple "right" decision when you're talking about things like whether or not to use a class or function. Classes and functions are tools, and whether to use them in certain circumstances depends on the tool user. It's a bit like asking whether you need to use a hammer to mend a fence. It depends on how good you are with a hammer.

MichaelxxOA
01-09-2008, 10:58 PM
i think what you're trying to do is prove/find worth in what appears to be arbitrary decision-making. but the truth is that it's not arbitrary- it's simply intangible from a "fly by the seat of your pants" standpoint. in any problem solving situation (not just programming), there is something that can be identified as process. needing a method here and a property there seems like a rather dismissable impetus for your application's design, but it stems from the quite powerful origin of need satisfaction. in other words, you're solving the needs of your system by addressing its problems. if you step back from this instinctual-seeming, compulsive design and abstract a solution that's elegant and sweeping; you're STILL satisfying the need for that initial problem to be solved.

I mean this with no disrespect, but you think you know what I'm trying to do before I have even had the chance to share. Most of these ideas come from advice people have given to me over the last few months. These ideas have helped me a lot. Do I need more of a reason for sharing them?


The thing is: there is no simple "right" decision when you're talking about things like whether or not to use a class or function. Classes and functions are tools, and whether to use them in certain circumstances depends on the tool user. It's a bit like asking whether you need to use a hammer to mend a fence. It depends on how good you are with a hammer.


I never said anything about "right" decisions. The ideas have helped me to better understand my "tools". This has helped me to better understand when, where, and why to use them.

I don't disagree with most of what has been said, but it isn't relevant to what I was trying to get at ... which makes it hard to have a focused discussion.

I'm in the middle of a move. I have been having a hard enough time posting as it is. I doubt I will not continue in this thread.

newblack
01-09-2008, 11:24 PM
I mean this with no disrespect, but you think you know what I'm trying to do before I have even had the chance to share. Most of these ideas come from advice people have given to me over the last few months. These ideas have helped me a lot. Do I need more of a reason for sharing them?
I have no idea what you mean. Seriously- ZERO idea.
I was responding to this:
It seems that, more often than not, my decisions are made arbitrarily. If I need a variable I create it. If I need a method I write it. If I determine a class is necessary it comes to fruition, but even here I'm not completely sure how I make the determination ... I just do and I feel that it's a problem. We don't have anything concrete to base our decisions off of. Instead we are given ideas of how to go about things. Ideas like generalizing, hiding your data, programming to interfaces, and so on. Are there decisions that can be made based on context?
You made a statement. You identified a problem of yours. I addressed this. How you ended up at qualifying your words as respectful- and further suggesting that you haven't "even had the chance to share" is completely incomprehensible.

MichaelxxOA
01-09-2008, 11:53 PM
How am I supposed to know that you're responding to one paragraph of the very first post when there are three pages of discussion?

Your response stood out to me because it seemed as if you were saying that the whole idea of what I'm getting at is to prove or find something when all I am trying to do is share. I have had enough conversations with you to know that this would be odd and so I didn't know if there was "more" behind it. Maybe knowing that will help you understand why I responded the way I did. I have nothing but respect for anything you have to say. I hope you know that. :)

I haven't had a chance to put these ideas down in a way which makes them worth reading. Like I said, I'm in the middle of a move.

peptobismol
01-11-2008, 01:05 AM
let's end this thread michaelxxoa. You had 3 pages to explain what you're talking about. We and perhaps you have no idea what the point of this thread is about.

Cota
01-11-2008, 01:37 AM
It will be Michael's choice to end the thread or not. If you feel he's not making a point you can understand, you can simply stop reading it.

This is the problem when someone tries to express themselves, those who cant understand try to dismiss their thoughts as "wrong" or "incomprehensible".

Its simple, his meanings may not be apparent, but allow it to grow and progress before you start jumping on him.

atomic
01-11-2008, 01:43 AM
My! Have you mellowed?

Cota
01-11-2008, 01:47 AM
I'm simply saying, allow him to try and work through his thought. It is related to Flash, so I dont see why people cant back off, try to understand, or even help him realize what he's getting it.

Seems some cant exist outside anything thought process they were taught when it comes to development. Free thinking got us where we are today, why stop it now?

atomic
01-11-2008, 02:03 AM
You have!

You were never that lenient towards me...

Have a nice evening!

Cota
01-11-2008, 02:14 AM
Thats reserved for another conversation.

newblack
01-11-2008, 07:08 PM
This is the problem when someone tries to express themselves, those who cant understand try to dismiss their thoughts as "wrong" or "incomprehensible". I did NOT label, much less dismiss, michael's thoughts as incomprehensible. The notion that you'd condemn me and jsebrech (whom I find to be the single most insightful contributor to AS[org]) to an inability to understand is offensive to say the least. The nature of a forum is post/reply, post/reply. I certainly wasn't complaining about Michael or what he has/had to say, so please do not lump me into peptobismol's category by association simply because I've contributed to this thread.

@Michael-->
I responded to your post. I took it to be the "subject line" of your point- and I think that it was... my responding to that should not detract from any point you have to make.

Cota
01-12-2008, 01:54 AM
@newblack - If I was referring to you or jsebrech, I would have pointed you two out directly. I was speaking in very general terms.

If you want to continue our little debate, we'll have to go private. This is Michael's thread, not ours.

bowljoman
01-16-2008, 07:38 AM
I think OOP is programmer oriented. As a beginner, it does feel good , while reading someone's code in an API that is unfamiliar, to be made aware of decisions, or even getting brief comments in the code stating Things like.
"//We could create an object to manage all the such and such, but data X is already on the stack in a parameter var.."

I learned hard in c++ direct show code, and its full of "we want this media type..." and "we don't want the thread to ..." "our".

Programming reminds me of being a little kid, and using the garden hose to make an imaginary river in the back yard dirt, digging a path for the water flow.

Whats important from a scupltor's point of view(me as a sculptor) is form and function. When decisions are made it is in regards to the perfect blend of these elements.

In the end though, what my older wiser brother has always told me, "More often, whats important is to make a decision, and move on".

Flash Gordon
01-16-2008, 08:10 AM
In the end though, what my older wiser brother has always told me, "More often, whats important is to make a decision, and move on".
I like that :)

nice post.

Cota
01-16-2008, 02:36 PM
bowljoman, I believe you may be the first person to read this thread, and actually get what Michael was trying to say.

bowljoman
01-17-2008, 08:11 AM
Thanks. guys!

soupphysics
02-08-2008, 11:45 AM
I want to make my job "less stressful" by removing a lot of the obscurity with which I make my decisions. I have found ways to do this and I'm hoping to further develop the idea.

Well when are you going to share those ways with us? :) I for one would like to get some ideas!

Whats the point? Please do not be offended by my response, but thats a pretty closed minded response.

This answer annoys me. You are the one who wrote "I think you're missing the point of what he's getting at.", so then it very logical to ask you what the point then is!

uncleunvoid
02-13-2008, 10:48 AM
see i was just about wondering if scripting forums could be bothered with a thread like this and here I am replying rather than opening up one myself.

I personally come from a graphics/art bachground where 1+1 most of the times isn't 2, so my approach to OOP that I been with for about 2 years now, having originally started with flash 4 ages, ages ago with a big director interstitial.

So these days I am getting my kicks out of creating ever so smaller objects, multipurposing things in order to have them ready and quickly put together for the next deadline that was yesterday. I still dont feel like a coder as my code still looks not like a proper coder's, as I am not too familiar with standards.
Standards are good, they have their place as in any communication, if you don't agree what words means what, you won't have a clue what the other is talking about(see any discussion between most designers and technicians, despite the presence of tech EVERYWHERE).

Yet at the same times those standards can hinder. Especially when you want to be innovative or (god help you) come up with new standards. This system is present everywhere. Thats why most things are similar to each other somehow and only a few are jawdropping and able to change your worldview.

Thats why I am working on a page builder that I can use for ANY project (theoretically) and at the same time ask myself, if I could rebuild the whole process with bits and bytes instead of strings and maybe save a lot of performance and/or weight(PLEASE dont comment on those ideas. i know you want to)

The concept I believe in is that in 98% of cases, a popular approach is valid, but in 2% of cases it's the utterly wrong approach doomed to fail from teh beginning. I might be giving the impression to speak from the point of being one of the 2% people, meaning indeed in most cases not being that popular and having to justify my opinion all the time.
I vividly remember having an interview with sony playstation and they wouldn't be able to fit me into one of there boxes designer or coder. They just kept asking if I am one or the other, my work seemed to assume both, but that again didnt seem to be possible for them.

Long story short, I am happy to give my five cents to this discussion and want to encourage everyone to send a few lines, maybe we find something, maybe we find ourselves a bit more. I am in contact with many people, yet in terms of flash scripting I only dive in and out of some forums because I only want to solve a problem but never to philosophize(still prefer to do that in a bar with a few beer somewhy)
Let's see if this forum might be an alternative format.

kalvin82
02-22-2008, 09:54 AM
before I start on my points, I shall state, what i feel the first post is saying,
so that if my focus is off, people will be able to ignore this post.

He wants to be able to make better decisions up front, before he goes into the production cycle of programing.

He has encountered situations where he has had to make more decisions on the fly then he would like and for some of these problems he has been unable to confirm conclusively if he has made the absolute best decision.

he has read extensively about the theory of programming, through materials on design patterns and other such materials such as "Code Complete", but feels that the is still a gap to be filled from what has been stated in these inspirational text and real world work.

If my understanding of the concerns are correct, then at least i can let the original poster know that he isnt alone, as I am going through the same thing :p

Planning cycle my views
For planning before production, I feel that understanding the duration of the lifecycle of the project and how firm the requirements are the key factors.

the longer the lifecycle of a project the more flexibility and engineering you need to build into the system.

how firm the requirements are determine how much effective planning you can actually do up front, and accessing how change is likely to occur.

It is unfortunate reality that we do not always have our requirements upfront. As such there have been times that i have had to just work with the knowledge I have, rather than try prying more concrete requirements from the vice like grip of some stakeholders.

decisions during production
If you are had planned well during the planning phase, there should not be too many unexpected surprises, but in the case of incomplete requirements, It is probable that you will need to make some unwelcome adjustments, to cater for them.

I have little advice on managing such changes, as I am still exploring this as well. except to consider the lifecycle of the project to gauge how much enginnering is required.

Regarding following Design Principles set down in Texts
Lastly regarding the inspirational programming texts that we have referred to, I feel the duration of the lifecycle of a project, is the factor that decides how closely we must follow the principles of design patterns.

From my understanding Design Patterns are targeted at managing further changes that occur after the project has been deployed, allowing the changes to be integrated in a more elegant manner.

This is definately important for projects that have long lifecycles or have modules that subject to high amount of change.

but for projects such as microsites, I feel that the "best" solution is sometimes an example of overengineering, as a microsites lifecycle is short, and the production time even shorter still.

Im sorry If my post is vague over some points, but It is because I too am learning how to cope with these issues.

Programming I find is both an art and a science, there are principles and values to follow, but they cannot be applied in all situations.