Stock Trading Best Practices

Last modified: June 16, 2013

Below are some rules of thumb I personally consider when trading stocks.  They are rules that I like to follow, but not hard and fast rules.  This post isn’t any kind of trading advice – please consult a professional financial adviser for that.


The Friday Rule (new as of 6/17/2013):

1. Under most circumstances, avoid opening new positions on Friday, due to the traditionally low volume.  Positions may be closed though, as needed.


Opening Long Positions (buying):

1. Buy stocks that are making a short-term dip, but are in an up-trend.  Trade with the trend.

Why: You’ll be taking advantage of short-term under-pricing, and the stock will generally continue profitably in its trend.

2. Buy only when RSI(2) is < 10 (meaning the very near term RSI is oversold). From Connors strategy.

Why: If you’ve already decided to buy, then it is best to buy when the stock has sold off recently. Effectively you’ll be buying a dip.


(more to come…)


Opening Short Positions (selling short):

1. Buy stocks that are making a short-term peak, but are in a down-trend.  Trade with the trend.

 Why: You’ll be taking advantage of short-term over-pricing, and the stock will generally continue profitably in its trend.

2. Sell short in the morning, about 30 minutes after the opening bell.

Why: In an up-trend mornings are typically (but not always) accompanied by a rise in prices, while afternoons will typically sell off.  Selling short at the high of the day is the ideal time.

3. Never hold a short position over an earnings report.

Why: A surprise upside earnings report may result in a gap up, which is especially devastating to a short position.

4. Never open a new short position on Friday.

Why: Friday’s typically consist of a slight upward rally on light volume. Opening a short trade on Fridays can put you immediately in the red, requiring further retreat to get back to profitability.

5. Sell only when RSI(2) is > 90 (meaning the very near term RSI is overbought). From Connors strategy.

Why: If you’ve already decided to sell, then it is best to sell when the stock has rallied to a peak recently. Effectively you’ll be buying a peak.


(more to come…)



Leave a Comment

Andrew B. Bartels Joins the Ranks of Leading Executives

SCOTTSDALE, AZ, December 30, 2010 /Cambridge Who’s Who/ — Mr. Andrew B. Bartels, President and Chief Executive Officer of Spinnaker Capital Management, Inc. has been recognized by Cambridge Who’s Who for demonstrating dedication, leadership and excellence in finance.

Combining his talent in computer technology with his prior work experience in the banking industry, Mr. Bartels established Spinnaker Capital Management, Inc. to address the needs of special clients who wish to carefully manage their risk while profitably investing in today’s turbulent stock market. An investor himself, Mr. Bartels oversees all operations of his business, including an upcoming launch of the company’s proprietary market trading systems.

Having contributed his expertise to two previous venture startup companies, Mr. Bartels is the innovator and creative force behind three US patent applications. He has also previously appeared in industry magazines, as guest speaker at numerous conferences, and is an author of cyber security papers recently published by Cigre ( His inventions have found application in multiple settings, including the healthcare, financial services, electric utilities, and manufacturing industries.

Mr. Bartels attributes his success to undying persistence and determination. He received a diploma from Mountain View High School in 1988, and is a former member of the Institute of Electrical and Electronics Engineers.

For more information about Spinnaker Capital Management, Inc., please visit


About Cambridge Who’s Who

With over 400,000 members representing every major industry, Cambridge Who’s Who is a powerful networking resource that enables professionals to outshine their competition, in part through effective branding and marketing. Cambridge Who’s Who employs similar public relations techniques to those utilized by Fortune 500 companies and makes them cost-effective for members who seek to take advantage of its career enhancement and business advancement services. Cambridge is pleased to welcome its new Executive Director of Global Branding and Networking, Donald Trump Jr., who is eager to share his extensive experience in this arena with members.

Cambridge Who’s Who membership provides individuals with a valuable third party endorsement of their accomplishments and gives them the tools needed to brand themselves and their businesses effectively. In addition to publishing biographies in print and electronic form, it offers an online networking platform where members can establish new professional relationships.
For more information, please visit

# # #


Press Release Keywords:

scottsdale, andrew b. bartels, president, ceo, spinnaker capital management, finance, computer technology, banking industry, needs of special clients, carefully manage risk, profitably investing, today’s turbulent stock market, upcoming launch proprietary market trading systems

Link to original: []

Leave a Comment

Philosophy of Cannot, Will Not, and Will

[This is the third of a series of philosophy writings from Andrew B. Bartels.  The second article is located here]

December 6, 2010

Cannot, Will Not, and Will

Have you ever asked someone for a favor and had them reply that they cannot help you?  How do you feel about that response?  While possibly disappointing, often people are okay with that answer because doing the favor may very well be outside of the control of the person being asked.  Whether the reason is real or made up, it’s easy to excuse the situation and go elsewhere.

But what if the response isn’t “I cannot” but is instead “I will not”?  How do you feel then?  Why this kind of response is entirely another matter!  With this answer, the issue isn’t so much about the person’s ability or inability to help, but rather about their desire. It becomes personal and emotional.

Now let’s turn the situation around:  How do you answer when someone asks something from you?  If you say you will all of the time, you could have a problem saying “no.”  Saying “no” isn’t always easy.  If you truly don’t want to, how do you prefer to respond?  By far the easiest answer to give is “I cannot,” because it depersonalizes the response, even if it’s not entirely true.

For a task that is being declined, an “I will not” response allows for too much opportunity to question why.  Therefore many people intuitively fall back on a safer “I cannot” response.

Herein lays the problem: The social and interpersonal dynamics of these three responses encourage a default culture of helplessness – “I cannot.”  A helplessness mentality is prevalent today.  People far are more attracted to those who display a self-deprecating sense of humor, and who express themselves through humility.  Relationships built on this type of communication feel non-threatening and more personable. Humble behavior is almost a necessity in order to have positive social interaction with others.  It has become a survival mechanism.  Let us call this pattern of behavior the Moral Code of Helplessness.

Moral Code of Helplessness

To further define the Moral Code of Helplessness, let us also observe that:

  • No matter how great the spirit, the soul incarnates in a self-deprecating, understated form.  The natural bias of the humans and animals is shyness and helplessness. Babies are born helpless, and only through years of training do they eventually learn to fend for themselves.
  • The human social world is an inverted world:  Those who value their own helplessness are considered polite, trustworthy and noble, while those who correctly see their own great soul and fully acknowledge themselves are considered self-serving.
  • Due to the obvious social and survival benefits, it is common for humans to choose a path of helplessness through displays of ignorance and incompetence.

The Moral Code of Helplessness is a pattern that the human race forces upon itself.  It is in fact an inverted view of reality, and is in fact a self-defeating survival mechanism.

Charles Darwin was perhaps most famous for pointing out the harsh lesson of natural history, namely that survival belongs to the fittest.  Having some kind of competitive edge (and preferably many of them) is absolutely necessary to survival, whether it be knowledge, strength, speed, agility, stamina or something else.  Some examples:

  • The human race as a species thrives due to their knowledge, ingenuity and thinking ability, which are capabilities it possesses well above other species.
  • Land-based lizards in the Galapagos Islands survive because they have learned to hold their breath and slow their heartbeat while diving under water to eat the algae from rocks at the bottom of the sea bed. These lizards are the only of their species ones that survive in the Galapagos.  The ones that did not or could not make the dive died off long ago from starvation.  See:
  • Water bears, or phylum Tardigrada, have devised extreme survival skills. You can boil them, freeze them, or dehydrate them and they still live!  With their tougher than normal stamina, they survive some of the harshest natural conditions possible. See:

Despite any evolutionary dangers of helplessness, there are at least some short-term advantages for humans that follow a path of chosen ignorance and incompetence.  For example, man who says “I cannot” and demonstrates incompetence automatically receives everyone’s pity!  Everyone seems to sympathize with him, and friends rush to aid him in his journey and attend to his needs in any way possible.

In business, it’s a phenomenon that helpless, incompetent individuals are often placed in a position of authority and thus are supported by their more competent underlings. The often quoted Peter Principle illustrates the point when it states that “in a hierarchy, every employee tends to rise to their level of incompetence”.

Let us call the short term benefits from pity, the Power of Want.  There is a collective benefit to being helpless, in that those who choose incompetence as a way of life easily conspire together to exploit the benefits to the fullest measure possible.  Here are some examples of the Power of Want in action in groups of people:

  • It is something of a blue-collar fashion statement in the US and Europe to receive government assistance, whether it is in the form of welfare, a pension, social security, or some other care-giving scenario.  In today’s society, the masses love to receive social benefits.  In many countries people view it as a right!
  • Some who are without a job are quite happy to keep receiving social benefits indefinitely instead of putting forth the effort to get work, even if they would be more prosperous by returning to work as a productive part of the economy.
  • The Power of Want is prevalent in organized religion and is made even more powerful by it: All religions promote charity and extensive giving to those who are in want, making religion an effective tool for supplying those who say “I cannot”.  In fact, are not most religious organizations themselves funded by the giving of others?
  • To withhold pity from the needy is almost always considered unconscionable because we assume that we ourselves have our hand out to beg for something from someone else.  Indeed, today’s humans give little attention to being complete and whole persons in their own right.

Though well entrenched in society, the Moral Code of Helplessness is very short sighted.  Survival of the Fittest is a rule that requires a competitive edge. Those who say “I cannot” in effect regularly give their Will Power over to victimhood.  They cannot fend well for themselves and accomplish little in life, except where it can be borrowed from others.

One can imagine that sooner or later all of this borrowing eventually leads to a collapse as there become more and more helpless consumers, and fewer people who are motivated, self-empowered, building a competitive edge, and contributing productively to the species!

Moral Code of Productivity

To say “I will” is a commitment and involves real work.  But for some, it is just too much work, because it means actually being productive!  Let us then say that those who embrace “I will” as a dominant survival mechanism are following a Moral Code of Productivity.

By definition, the Moral Code of Productivity is driven by passion.  Those who follow it generally love their work.  They have an appreciation for what is possible, and are passionate enough about it to real take action to drive their passions forward.  These ones exercise their intention and will power for all manner of creativity and productivity.  Their action builds survival skills and they have an expanded range of life experiences.  These are the few who are truly living up to their soul’s potential!

We should be very thankful to those who say “I will” because their productivity very often supplies those who embrace the Moral Code of Helplessness.

Productive Slaves and “I Will Not”

It’s easy for the Moral Code of Helplessness to take too much advantage of the Moral Code of Productivity.  Those who say “I will” are often so passionate about their work that they have a hard time saying “I will not” when those in want become abusively needy or codependent.  In this respect, the one who demonstrates a masterful skill and says “I will,” though very talented, is a great fool!  Because of his talent and inability to say “no”, he becomes consigned as a servant and is ruled by those who “cannot”.  The needy trick him into doing work on their behalf because they know that “I will not” is contrary to his nature!  In this way the collective force of the Moral Code of Helplessness in the masses often overpowers the few who follow the Moral Code of Productivity.

It is a challenge to Fate to say “I will not,” as few humans have the ability to say it and actually mean it.  It is by its very nature a contrary stance to take, “I will not” can quickly translate to emotional confrontation and shame when met by the Moral Code of Helplessness.  The needy require pity for the Moral Code of Helplessness to work, and one who says “I will not” does not give pity.  The one who says “I will not” is judged to be rude and unworthy (shame).

He who says “I will not” makes a bold statement that he is self-empowered, which is a threat to anyone who wants to control or enslave him, including the needy.  Even so, the pressure created by the Power of Want can be so strong that it’s easier to follow the Moral Code of Productivity than suffer the shame of being contrary to the Moral Code of Helplessness.

Moral Codes and Advancing Technology

Humans have made a great deal of technological advances in the past 200 years.  Today it seems that things are advancing so quickly that consumers barely have time to purchase one technology before the next one is available!

The prevalence of the Moral Code of Helplessness in such a high tech environment is a serious concern for the survival of our species.  The actual “how to” knowledge of our technology is gradually being supplied by fewer and fewer people.  How many people on earth today actually know how a DVD player works, let alone how to build one?  Or how to fashion iron or steel into a useful tool?  Or how to do something as basic as plant and harvest crops?

A vast majority of people are consumers, not creators.  Whether they can tear their bloodshot eyes away from the TV long enough to acknowledge it or not, they have adopted the Moral Code of Helplessness in masses.  Their existence is colored by ignorance and incompetence when it comes to some of the basic necessities, let alone modern technology.

One may well ask, “Is this situation sustainable?” Can the human race continue to produce more and more complex (better?) technology from the minds of fewer and fewer people?  One can easily imagine the dilemma when the last remaining human who knows how to concoct snake bite medicine dies.  Where will we be the next time someone gets bitten by a snake?  The issue applies for any science or technology that is vital for human survival.

Historical Evidence

Humans have pursued great technological advancements for millenniums. Take for example the monuments at Stonehenge, the pyramids of Egypt and the Mayan pyramids.  Today we marvel at such amazing engineering feats!  How could people from so long ago calculate with such precision a location on earth that aligns perfectly with the rest of our solar system?  Where could humans possibly have gotten this knowledge?

These and other puzzling questions come from an assumption that humans did not have high technology in those days.  But they obviously did have forms of advanced technology, or else the remnants of such amazing structures would not exist!

So why didn’t our ancestors just keep building on top of previous expertise?  Could it be an important lesson to learn that their technology was not sustainable?  Could it be that ancient knowledge gradually came into the minds of fewer and fewer people, and that technology advanced to a level of complexity that it could no longer be passed on from generation to generation?

One can imagine that our race has been plunged into something like The Dark Ages again and again when technology became sufficiently advanced and the general population gave themselves over to a Moral Code of Helplessness.  This could have happened many times over, and we would not know it, except for the existence of old structures that testify to what once was achieved.

Are we doing this to ourselves again?

The Productive “I Will” and “I Will Not”

The social perspective of human society is inverted.  How so?  “Proper” social interactions encourage everyone to be as helpless and incompetent as possible, despite how fantastic they may actually be.  To further complicate matters, if someone does show their true greatness by being productive (I will), the needy (I cannot) among us find quick ways to either enslave the productive one into providing for them, or shame them for choosing not to (I will not).

Furthermore the needy (I cannot) are increasing in number, and because of the near-term benefits of having things automatically supplied to them, they are disinclined to lift a finger to increase their level of competence.  It’s just too much work for the masses, and laziness is an accepted norm.

Survival of the fittest is a harsh reality in the natural world, so what is to be said for the ongoing viability of the human species?  A couple of possible outcomes exist.  Either:

a)    Survival of the Fittest will be enforced through natural disaster, and those following the Moral Code of Helplessness will simply not survive, OR

b)    our technology will advance beyond our means to sustain it, leaving the needy masses to fend for themselves with survival skills that they do not have

Either outcome (or something like them) would be a devastating shock to our species!

In light of these possibilities, one must consider that our race would have a better chance for survival with a Moral Code of Productivity.  Yet it very is unlikely that change of this sort will take place in the short term, and potentially never.  Indeed, there exists a tether between all souls, such that no one individual can move too far in a given direction, without all others also moving at least somewhat in that direction.  Real progress on this planet is made one death at a time.

Despite its pace, progress can be made.  Progress starts with us as individuals deciding to be productive.  Here are some steps that will help:

  1. Begin applying productive habits.  A place to start is Stephen R. Covey’s book, The Seven Habits of Highly Effective People. All of the habits are beneficial, but the 7th habit, “Sharpen the Saw,” yields a particular benefit by making your productivity sustainable.
  2. Make it a habit to learning something new every day.  Pay careful attention to what is going into your mind (from TV, radio, books, etc.).  Take in as much non-fiction as possible and make learning a regular and fun part of your life.
  3. Train yourself.  Get a competitive edge. In fact, get several of them. It’s not possible to personally be an expert on everything, but take seriously the challenge to be an expert at something
  4. Be determined.  Drive yourself forward by educating yourself, if necessary.  The Moral Code of Productivity isn’t affected by the state of affairs in our public education system, or a lack of opportunity from being poor (as if you would have to have someone else teach you knowledge, or give you an opportunity).  Waiting for others to give you something is the Moral Code of Helplessness.  Drive yourself to be productive and find ways to learn new things.  Have the determination to seek out and find your competitive edge.  The opportunities are already out there, and it’s up to you pursue them!
  5. Encourage your friends and family to follow suit and develop their own area of expertise.
  6. Adopt an “I will not” response to your friends who do not want to transform themselves.  Be willing to enforce it. When you start becoming productive, they’ll first be jealous, and then they’ll want you to support them or aid them in some way.  Do not feed their bad habit. They may try to shame you, but do not give in.  You’ve put a lot of work into being productive and deserve to enjoy it yourself!  This isn’t to say that you can’t give charitably or do nice things for others.  Definitely do so. However, try to do it for the deserving, especially for those who are themselves following the Moral Code of Productivity.
  7. Lastly, speak up about your productivity.  It’s not improper.  If you’ve worked hard, you have results to be proud of.  It’s not necessary to be self-deprecating if you’ve truly accomplished good things. Some may resent you, but continue forward with the knowledge that this is just part of the Moral Code of Helplessness!

In the end, only the fittest survive. The natural world has a way of weeding out the helpless, ignorant and incompetent.

How well will you survive in life?  By following the Moral Code of Productivity, you not only help ensure your survival and live a more fulfilling life, but also help ensure survival of the human species!

Leave a Comment

The Whole Truth

[If you like this article on Truth, you might also like: On the Decay of the Art of Lying, by Mark Twain]

April 26, 2010

The Whole Truth

What is truth?  Ah, yes that is an age old question asked by many philosophers.  I can’t promise an earth shattering answer, but this article contains some of my observations.

Truth in General, not in Specific

A truthful statement is always at least partially incorrect.  Take for example the following statement:

“Apples are red.”

Most people will agree that this is a true statement.  But is it really?

The statement is true in that, red apples do exist.  But the truth in this statement becomes quickly limited when one considers the measure of truth from various angles:

  1. Not all apples are of a “red” variety.  Take for instance the case of Granny Smith apples, which are yellow-green in color.
  2. Even so-called “red” apples aren’t red all of the time.  The color of the “red” apple is most often yellow or green before the “red” apple as ripened!
  3. From the point of view of a color-blind person, a “red” apple may not be red at all.  So the observation that apples are red may in fact depend greatly on the capabilities of the observer.
  4. The type of apple in question must also be considered – in French, “pomme de terre” means literally “earth apple”, and it used to refer to the potato – which is often brown, not red.
  5. Speaking of brown apples, one must never forget the ever so fragrant “road apple”, which one might encounter in the company of horses.  These aren’t red either, although they are called “apple” by metaphor.

Using the simple example about red apples, one can see that the amount of truth in a statement might be appreciated best if one considers it to be a generalized statement.  “Apples are red” is by its very nature a vague and general statement about apples.  While it IS true, it does not apply to all apples all of the time, and might also not be true depending on how one defines and measures the color red.

I conjecture here that ANY truthful statement, regardless how specifically it may be stated, must at some level or in some way only be a general statement about the truth.  Put another way, there are always vagaries in any truthful statement. In fact, the only fruitful conclusion to reach is that all truthful statements are lies, or at least partially so.

Human Language and Truth

A reason why all truth statements have at least some untruth about them, is due to limitations of human languages.  All human languages express concepts in relative terminology.  It’s generally impossible to describe something without relating it to something else.  The simile and metaphor take center stage, with all descriptions essentially being a comparison of one object or concept to another.

Since some objects and concepts are similar to others in some ways, but are different from each other in other ways, there must, of necessity, always be a degree of untruth to any statement made.  Politicians and mass marketers are, philosophically, off the hook now:  It’s entirely likely that they really ARE doing the best that they can with the language that they have!  (Please hold your applause.)

Before closing this section on human language, I also would like to note that the Universe as we know it generally operates in patterns.  The pattern can be symbolic, a sequence of events, a shape, or a behavior.  Patterns are general in nature.  A given pattern may recur often in the universe but the details of the recurrence always are slightly different – a different time, a different location, a different set of circumstances, etc. – but the pattern still emerges.

The pattern itself is a lie when compared with any specific occurrence of the pattern.  Thus it is that the Universe lies to itself!  Is it any wonder then that human language MUST contain at least some untruth in every statement?

I note here that this thought of patterns manifesting in the Universe also takes us to the science of fractal geometry where natural patterns are shown to take on measurable geometric shape.  But alas, the subject of fractals is large, and will be saved for a future time…

Lies Are Mandatory at a Job Interview

Why do people dress up nicely for a job interview?  What would happen if someone arrived at a job interview wearing the normal clothing that they wear every day?  Would they get the job?  Absolutely not!

Here it is socially unacceptable to tell the truth about oneself during a job interview!  The interviewer is impressed by dressing up (the lie), not by dressing normally (the truth).  Literally one can make the case that one’s economic survival relies on lying!

But the lie only is accepted as valid up to a certain point.  If the lie can reasonably be couched as “believable fantasy” then it seems excusable, and in fact is encouraged and necessary.  However if the lie becomes too blatant, to a degree that one can no longer suspend one’s disbelief, then the lie becomes a vulgar outright lie and no one appreciates it any longer.  Think about that next time you’re preparing your resume!

Truth Makes Us Vulnerable – A First Date

What kind of image do you project on a first date?

For men, are you projecting yourself as the basically lazy, out of shape, all thumbs, brainless, slightly angry, womanizing character that you really are?  Or are you the witty, charming, cultured, well sculpted sophisticate that just drips with sheer sex appeal?

For women, are you wearing a push-up bra and perfume right next to your charming smile and bright attentive eyes?  Or are you showing off that bitchy, TV-watching she-wolf who relishes the thought of wearing sweats all day on Sundays?

Why do we lie to each other like that?  It’s a moral imperative for survival!

Socially, we humans have geared our environment around the convenient and believable fantasy.  On a first date, we want to see that lie, that fantasy!  Forget the truth – we WANT to be swept away by an inspired vision of an amazing life that is possible with this new person!

Also, to tell the truth, the dirty straight out truth, opens us up to criticism.  And if criticism ensues, it’s the worst kind of criticism because it hurts and there is nothing that can be done to cover it up – we are forced to acknowledge it.  On the contrary, if someone criticizes us about a facet of our personality that is mere fantasy, then it’s no big deal – it’s a just lie anyway, and we can take the criticism impersonally because we are not that person!

Our emotions play a huge part in to what degree we tell the truth.  The truth brings a vulnerability from which we have little or no good protection.  It is just more convenient to lie, or at the very least, to embellish the truth.

We don’t even like to tell ourselves the truth about ourselves!  It’s too painful!  It’s easy to see how people go around telling “the truth” about themselves and feeling good about it, when it’s all a lie.  They’ve literally lied to themselves in such a way that THEY BELIEVE IT.  Their lie now IS their truth.

It’s the person with a fearful emotional makeup that feels vulnerable with the truth.  At the time of this writing, this describes just about everyone on Planet Earth.

To my mind, the only solution to this dilemma is to emotionally mature ourselves.  Fear must be overcome before we can be truthful without feeling vulnerable.  A majority of the whole planet is running on “emotional empty” – a place of extreme vulnerability in the face of raw truthful fact.

In the end, truth becomes our ultimate moral issue.  Our moral imperative as a race is that the believable lie or fantasy promotes our survival the best, where as truth creates a vulnerable opening for criticism and rejection.  How else should we behave in order to survive, but to lie, lie, lie!

Oh what a tangled web we weave!

Lying with The Secret

(a.k.a. Intentionally Lying to Yourself is Morally Imperative)

In 2006, Rhonda Byrne published a documentary style movie called The Secret.  It was a big success among New Age thinkers and motivational speakers everywhere.  For those of you have not yet seen the movie, go see it.  It’s definitely thought provoking.

A core premise in the movie is that the type of thoughts that you have can dramatically affect your result.  Nothing new is here; it’s the concept of using positive thinking to improve your life outcomes, with perhaps a New Age twist.

But let’s dissect that idea bit.  Your thinking affects your outcome – so what kind of stories are you telling yourself?  What kind of fantasy goes through your head on a daily basis to explain and justify what is happening around you?  Are you always telling yourself the truth?  Likely not!

The Secret indicates that telling yourself a “good lie” will actually help you.  It works like this:  When the chips are down, if you mentally keep repeating “the truth” about how bad the situation is and how likely you are to fail, then you significantly improve the odds of bad things happening.  But if you tell yourself a “good lie” and fantasize about it to reinforce positive thinking about the situation, you set yourself up automatically to improve it.

I will for the moment leave any scientific proof of why this works, and to what degree in the capable hands of researchers who study such things.

For philosophy purposes though, one cannot miss the striking impact this phenomenon has on telling the truth.  If it’s possible to believe one’s own lies, and the content of one’s lies have a significant impact on one’s outcomes – then it’s important to survival to tell oneself GOOD lies!  The truth, then, is undesirable with respect to one’s moral imperative for survival!

Deep within in our makeup is a process of intention – a process of creating our future.  Intention works by telling a story about how one would like the future to be.  To the degree that the story diverges from actual reality, it is a lie in the present.  According to The Secret, one has to REALLY BELIEVE the lie in the present in order for it to be effective in the future.  Once the future becomes the present and divergence between the lie and present reality closes, one’s intention has come to be realized.  Thus it is that the process of intention and creating the future involves a great deal of believable lies about the present.

With lies playing such an important part of intention, one might hazard to wonder why it is that humans even bother to think about the truth in the first place!

Leave a Comment

Computer Programming Best Practices

April 11, 2010

This is a collection computer programming best practices.  I’ve developed these rules gradually through nearly 30 years of software engineering and coding practice, and I continue to refine them.

I am well aware that not everyone will agree with them.  After all, opinion runs strong within the software development community!  I publish them despite this because they truly ARE best practice.  Following them has produced some of the most effective, bug free, and efficient software of my career, and this is a substantial accomplishment.

My hope is that you’ll read them, learn from them, use them to improve your skills, and find them to be an invaluable reference for your next programming project.  They’ve certainly been an asset to my work, and I am eager to share them with folks who pursue excellence in their software development work.

Best Regards,

-Andrew B. Bartels

General Rules of Computer Programming:

Bartels’ First Rule of Computer Programming:  Start with a plan.  No code should be written until the programmer has (a) a good idea what the requirements are, and (b) a valid technical plan for how to efficiently implement a solution.

Bartels’ Second Rule of Computer Programming:  Be petite.  Code that isn’t written doesn’t have execution time, nor does it need to be debugged.


Rules of Software Architecture:

Bartels’ Rule of 3 for Software Architecture:  A well thought out class hierarchy is mandatory; an overly intellectualized class hierarchy becomes a real mess. Keep class structures simple, in general with no more than 3 layers of inheritance.  If you find yourself having to add a fourth layer, go back and re-think the class hierarchy because chances are there will be an advantage to simplify it.

Bartels’ Rule of 90% Code Reuse:  Only about 10% of your application’s code is actually unique in function to your business rules.  The other 90% should be implemented in a reusable code library that can be used in a different context by many other applications.  Re-examine your software design until at least 90% of it comes from generic code libraries.  If you do, you’ll find that you’re writing amazing software in only a fraction of the time!


Rules of Data Processing:

Bartels’ First Rule of Data Processing: Touch the data once and only ONCE.  This rule applies double for multithreaded applications.  This simple application model works best:  read the data, process it clear to the finish, then output the result.  Do not hand data off between various threads or code modules, or you’ll introduce unnecessary performance problems.

Bartels’ Second Rule of Data Processing:  Be I/O efficient.  Access only the data you actually need to get the job done, and only access it once (see First Rule of Data Processing).  If that’s not possible with your current data structure, re-organize the data so that it is possible.

Bartels’ Third Rule of Data Processing:  Be platform efficient:  Use native word and memory page sizes that are efficient for the computing platform your program will run on.  For example, some platforms process 32-bit quantities faster than 8-bit or 16-bit values (take Java, for instance).  As a programmer, be informed enough to know what the efficient sizes are for your platform and programming language of choice.


Rules of Data Storage:

Bartels’ First Rule of Data Storage:  Store data in the smallest native data unit available for the platform.  A boolean value should be stored as a bit, a small numeric value should be stored as a byte, etc.   This avoids unnecessary ‘data bloating’ in your database.

Bartels’ First Rule for XML:  Don’t use it.  Nope.  Just don’t do it!  Not even if you’ve been taught that it’s a good idea.  XML is terribly inefficient (see First Rule of Data Storage).  Any benefits that come from its ‘flexibility’ are handily outweighed by the extra unnecessary space it occupies and the unnecessary text parsing effort required to process it.

Bartels’ Second Rule for XML:  If you still feel that you need to use XML after reading the First Rule for XML, then think again!  For example you might be forced to use XML when it is an expected format for a third party interface that you cannot change – but even then, carefully consider the other alternatives.


Rules of Computing Performance:

Bartels’ First Rule for Computing Performance:  When speed is an issue, test and tune performance on the slowest computer you can find.  Doing so magnifies the areas that are causing the bottle neck, allowing you to more readily see and fix the problems.  Once you’re satisfied with performance on a slow computer, load your software on a fast one and watch it fly!

Bartels’ Second Rule for Computing Performance:  Standard code libraries (that come with C, C++, Java, etc) are almost never the most efficient.  When it absolutely HAS to be faster than anything else, it’s possible to increase performance by writing your own code (see Second Rule of Computer Programming and Rule of 90% Code Reuse).

Leave a Comment