Peet Brits

Hmm, but that doesn’t make sense…

The Couch: A Look at Human Lifestyle

Posted by Peet Brits on January 7, 2009

Tempting Sofa

Tempting Sofa

I might not be posting anything anytime soon after this article as my studies started this week. (Whoohoo!) It already feels like I am behind! Now I quickly need to get this topic off my mind in order to focus. Focus comes from self-discipline, which is partly what this article is about. All right, enough advertising. Hope you enjoy my latest idea.

Introduction

Often one might notice people striving towards a goal, or living a healthy lifestyle, but as soon as they reach their aim, they abandon the good habits and relax in the comfort of it. For example, a person being fit and healthy in high school gets fat the moment they start earning their own money. Another person’s dream was to get married, and the moment they cross that milestone they start behaving in a very different manner towards their partner.

What happened? Why did it happen?

I call this idea The Couch.

How Does It Happen?

Path To Couch

Path To Couch

Consider that we are all walking along a path. This is the path of human life. We could reach two types of milestones on this journey: one of comfort and one of a challenge. Comfort represents life’s luxuries, such as your first income or a raise. Challenges represent problems, especially those seeming too big to overcome.

This is where the couch comes in. It tempts us to sit down and rest when we are not yet tired. If we fail to overcome these milestones, whether by relaxing in comfort or defeated by our challenges, we end up sitting down on the couch (hypothetically speaking). This poisonous state of rest is the danger zone that keeps us from progressing on the road of life.

Many people might still be aware of this and attempt to get up. They would try to move one, but many times all they end up doing is walking right around it and then sit back down again. Once they enter this cycle they rarely move on without a huge amount of effort or help from some external motivator.

What the Couch Is Not

The couch is not a bed. A bed is a well-determined state or rest. You sleep totally; maybe a little lazy over weekends, but then you get up and go through your regular daily activities.

With the couch, you are neither sleeping nor awake. You are in some undefined state in between. It is like watching too much television: it makes procrastination feels good. This state of neither good nor bad is the main reason for the lack of motivation to change our behaviour.

To give another example, this is probably why people find it so hard to stop smoking, even once they know it is bad for their health. It feels good and they do not see any immediate damage done by it, so there is no threat to make them change.

They Come In Different Sizes

There is not a single path passing along a single couch, rather many different paths representing different areas of our lives, and many types of couches appearing on all of them. There are smaller ones, which you can easily get up from if you tried. The medium sized ones require a lot of effort to get up from, and you have to keep yourself in check for a few months in order not to sit right back down again. The big couches are almost impossible to move away from without additional help.

The longer you sit on a couch the more hard-wired it becomes in your brain and the harder it gets to move on. Self-control is in my opinion the biggest challenge any human being could possibly face. One can enforce self-control by healthy habits and routines, but then you must be aware that it becomes easy to overindulge once we break away from these routine. Overindulgence is an enjoyable form of self-abuse, coming from excuses like “well I am on holiday”. Urges have consequences, and we should prepare ahead [1].

Observations and Tips

Before people reach the couch it would seem like they are living towards a goal, but because this goal is not concrete, not written down or well thought about, it quickly fades away over time. Enjoying every moment of life is important, but one must never do so without any concern for the future or in ignorance of the past.

Some people live in denial. I have personally heard people say that they hate something, but once the wheel of fortune turns in their favour they immediately become what they once despised. I think they actually envied it, hating not having it.

Do you think this is ironic? To be able to pretend is uniquely human [2]. No man can lie like the man lying to himself.

One thing that I learned over the last year is to stop thinking about what you should be doing, how long it is supposed to take, how nice it would be once it is done, and just do what you are supposed to be doing.  That is right, stop idle planning and JUST DO IT.

NOW!

Resources

  1. I read this tip in a 1Time airplane magazine.
  2. This is from an article in Scientific American, comparing human two-year-olds with monkeys.

Posted in Art of Living, Psychology | Tagged: , , , , , , , | Leave a Comment »

What makes time tick?

Posted by Peet Brits on December 13, 2008

[I wrote this article over a year ago, 16-Nov-2007 to be exact, and originally published it on my facebook account.  I decided to publish it again on this blog because I really like the message.]

Did you ever wonder why time passes so quickly when you are enjoying yourself?  Why does water never boil when you are staring at it?  More importantly, have you ever came to the end of a year and wonder what you did during the past year?  What happened to the time?

I noticed something interesting by comparing these last two years.  This past year went by at an amazing speed.  It still feels like yesterday when I started with my new job in March.  The previous year, on the other hand, felt like a decade.  This is not because I was bored; in fact, I probably had many more activities that year than this.

So, what is the difference?

Where did I miss out?

As I pondered over these questions, I thought of all the things I did over these two years.  What I noticed was that two years ago I had a certain event that was a highlight of every week.  My whole week would build up towards that certain activity.  This year, however, the time just seemed to pass by.  Sure, I still had fun activities every week, like my rock climbing, but somehow each moment simply dragged on into the next.

This year I also spent most of the time wondering what happened to my time.  I noticed that I spend many more hours at work and in traffic.  This is something that I plan to change in the near future.  I no longer see the point in working overtime.  It is a fact that I am far less original and inventive when overworked and tired, but that is a completely different topic altogether.

What is the point of this?

Why would I even write this if it feels like I have no time to begin with?

I am still putting together all the pieces, but it seems like one must make time count.  In a world where everyone believes time is money, I must stop and quote what I heard from a certain Jean Symons: “Love is time”.  Find what you love in life and dedicate your time to it.  I believe you will surely reap the rewards.

Quotes

Time is free, but it’s priceless. You can’t
own it, but you can use it. You can’t keep
it, but you can spend it. Once you’ve lost it
you can never get it back.
Harvey MacKay

Time is an illusion. Lunchtime doubly so.
Douglas Adams  (I couldn’t resist…)

Dost thou love life? Then do not squander time, for that’s the stuff life is made of.
Benjamin Franklin

My history is like a long dark tunnel with a few lighthouses of significant events on the way.
The Textures of Silence, (my own translation)
(Thus, if you do not add the significance of passion, love, or any other strong emotion into these moments, your whole life falls into a series of events simply flowing into one another.  Then, when you look back on a year, all you see is a dark tunnel).

Posted in Art of Living | Tagged: , , , | 1 Comment »

C# 4.0

Posted by Peet Brits on November 26, 2008

Anyone seen the new C# 4.0 features? (Examples can be found from the C# October 2008 CTP page).

Well done on (still) copying Python (and other related dynamic languages) into your so-called statically typed language.

You guys make me proud.

Posted in Code (Programming) | Tagged: , , | 1 Comment »

Programmers: far more than typists

Posted by Peet Brits on November 26, 2008

typing

typing

I recently read a post by Jeff Atwood where he states that programmers are typists first and programmers second. This is something that I could never agree with.

I am a Software Developer. I should be part of the whole development cycle. That means, among other things, I design, write, test and maintain my own and other people’s code. The initial coding is possibly not more than 20% of the full cycle. In fact, according to this post by Peter Hallam, it is no more than 5%! How then can we possibly be typists first and programmers second?

A programmer is not a cog in the machine; he invents the cogs and arranges them in the machine. He is not a factory element; he is the one building the factory. Sure, there are different roles and requirements, but this is what developing software is all about.

Yes, I agree that typing is one of the fundamental requirements for programming, but a programmer is so much more.

To agree with Jeff, if you do not know how to type, it is not really that hard to learn. Get yourself a typing tutor and invest some time in practicing. However, the day programmers become nothing more than mere typists is the day I leave IT.

Posted in IT Industry | Tagged: , , , | Leave a Comment »

True Sceptic, or Noisy Idiot?

Posted by Peet Brits on November 18, 2008

blogging

blogging

More and more sceptical websites seems to be appearing all over the internet. This in itself is a good thing, but how many of them are truly sceptical?

It is easy to take on a topic that is black and white, right or wrong. One must be willing to question public opinion and do a lot of research, but in the end, there usually is an absolute answer.

The biggest challenge lies in grey areas: there where there seems to be no absolute right or wrong answer and even if there is, it is rather hard to prove. This is the true test of character.

The reason for raising this issue is that most people, when faced with an uncertain challenge, fall back to personal beliefs and convictions. I have seen many of these websites, filled with fallacies and mockery. Sometimes it is fine to use mockery with an abundance of evidence, but still, since mockery is an attack of the person rather than an attack of the argument, it is something of which most scientifically minded people should never make themselves guilty.

To all those people who like hearing the sound of their own voice: just because your opinion differs from that of the public does not suddenly make you sceptics. I think it is best that I do not provide links to any of these pages.

As an example I will point to Brian Dunning, from skeptoid.com, who did a podcast with the topic Who kills more, religion or atheism. Most people would rather choose to avoid this topic, and those who do talk about it usually do so out of anger for the other side. I must say that his opinion is the best answer I have ever heard on this topic. Listen to (or read) it, and make up your own mind.

I am not against scepticism, sometimes I just get frustrated…

Posted in Philosophy | Tagged: , , , | Leave a Comment »

LINQ Quiz

Posted by Peet Brits on November 1, 2008

Just for fun, I made a little quiz following my previous LINQ article.

Question 1

What is the difference in effect of the following code sections? Note that “Failed” is a nullable bit, so we will label the states as red, green and yellow (null).


// Option A
where (filter.Failed.HasValue && doc.Failed.HasValue ? filter.Failed == doc.Failed : true)
    // && (...) -- more filters here

// Option B
where (filter.Failed.HasValue ? filter.Failed == doc.Failed : true)
    // && (...) -- more filters here

Question 2

What would happen if all the queries ended with “false”?

where (... ? ... : false) && (... ? ... : false)

Question 3

Keeping both performance and readability in mind, what is the difference between grouping all the queries together (see option A), against having each in a separate section (see option B)?


// Option A
docs = from doc in docs
    where (filter.Failed.HasValue ? filter.Failed == doc.Failed : true)
        // && (...) -- more filters here
        select doc;

// Option B
if (filter.Failed.HasValue)
    docs = from doc in docs
        where filter.Failed == doc.Failed
        select doc;
// more filter blocks here

Posted in Code (Programming), Quiz | Tagged: , | 2 Comments »

LINQ: Breaking Your Logic

Posted by Peet Brits on October 18, 2008

LINQ is one of the great new technologies in .NET. As opposed to the frustrations of raw text in XML, I absolutely love how it is strongly typed. I am not going to spend any time discussing its use and features, as there is enough of that on the internet. Instead I will discuss some unexpected behaviours that I recently uncovered.

Without wasting the reader’s time, let me jump straight to the problem. Here is a sample of the filter I would like to apply:

var docs = from doc in db.GetTable()
    where doc.Name == interfaceName
    && (filter.Failed.HasValue && doc.Failed.HasValue &&
        filter.Failed.Value == doc.Failed.Value)
    orderby doc.Name
    select doc;

Background: “Failed” is a Nullable bit value both in the code and in the database. I only want to compare and filter if a values has been provided.

This seems like a perfectly acceptable piece of code. The expected C# behaviour for “&&” is that when the first section fails, the following section will not even be evaluated, and therefore it must surely work.

So I thought.

On executing the statement I got the exception “Nullable object must have a value”, originating from line 4 above. I remembered that LINQ translates its logical items to a form of expression tree, so it would seem that all values are always evaluated, regardless of the expected C# behaviour. We need to get rid of “Failed.HasValue”.

No problem, update the filter:


var docs = from doc in db.GetTable()
    where doc.Name == interfaceName
    && (filter.Failed.HasValue && doc.Failed.HasValue &&
        filter.Failed == doc.Failed)
    orderby doc.Name
    select doc;

No exception, the query runs through. Only one problem, my result set is empty.

So I evaluate my code again. The first problem is that the query section “filter.Failed == doc.Failed” on line 4 is always evaluated, regardless of whether the first two statements are false.

If that is not enough there is a second problem, regarding what happens when filtering. Once again, take a look at line 4. As it is always evaluated, it would seem that when the filter condition is “null” it evaluates to “null == doc.Failed”, where “doc.Failed” can be true, false, or DBNull.Value. This is clearly not right.

Where to from here? Writing C# functions inside the match is not the answer, as you need to implement translations supported by SQL for the specific section.

The quick and dirty answer is as follows:

// Why not use var?  Because the return type keeps on changing.
IQueryable docs = from doc in db.GetTable()
    where doc.Name == interfaceName
    select doc;

if (filter.Failed.HasValue)
    docs = from doc in docs
        where filter.Failed == doc.Failed
        select doc;

// more filter blocks here

// Finally, remember to sort.
docs = from doc in docs
    orderby doc.Name
    select doc;

This works fine, but as one might have more than one item to filter on this process might result in a lot of code that needs to be duplicated all over the place. The statement “doc.Failed.HasValue” is also not evaluated, but that is something that can be safely ignored.

On the Microsoft webpage at http://msdn.microsoft.com/en-us/library/bb882535.aspx they give the following advice for handling null values (thanks Marius for providing the link):


// When the parent item might be null,
// the "?:" syntax is not converted to query trees.
(p == null ? null : p.CategoryID)

// When comparing nullable DB values to non-nullable objects,
// box it in a nullable container.
o.EmployeeID equals (int?)e.EmployeeID

That being said, the final product looks as follows:


IQueryable docs = from doc in db.GetTable()
    where doc.Name == interfaceName
    select doc;

if (filter != null)
{
    docs = from doc in docs
        where (filter.Failed.HasValue ? filter.Failed == doc.Failed : true)
        // && (...) -- more filters here
        select doc;
}

// Finally, remember to sort.
docs = from doc in docs
    orderby doc.Name
    select doc;

[Edit: Just for fun I created a follow-up quiz for this article.]

Posted in Code (Programming) | Tagged: , , , | 1 Comment »

Limiting Your Struggles

Posted by Peet Brits on October 5, 2008

All of us have days where our frustrations and struggles completely break our spirits. It is days like that when I begin to wonder why I did not rather become something like a Latin dance instructor. Whatever job you have, there is always some cause of frustration, and in this article I will be taking a closer look to a possible cause of this irritation.

Adding Up

Let me divide it into two sides. The first side we will label “A” and call it struggling. Struggling is something that you do that wastes time, and it becomes frustrating because the more time you spend on it the more you get the feeling that you are not getting anywhere. The frustration is magnified as it usually is something that should just work. An example would be a broken computer software installer. You need to get it working, but you cannot find out why it will not do so. The effect is usually increased by lack of knowledge and tediousness of the process.

On the other side, which we will label “B”, we have challenges. A challenge is something (usually) difficult that you need to overcome, but you are to some extend in control of what is happening and understand and see the progress. An example would be a mathematician solving a mathematical challenge. Usually, as with “A”, it is also something that you need to get done, but is sometimes also done out of sheer enjoyment.

A challenge might seem like a struggle, but it is not. The difference is that when you solve a challenge you feel good about it, but even when you eventually complete the struggle you will still want to throw your PC out of the window because of how stupid it all is.

Now we have two sides of a scale, measured by time and energy invested. The amount that side “B”, the challenges, outweighs side “A”, the struggles, is the amount of job satisfaction that the person perceives. On the other hand, when the first side “A”, the struggles, outweighs side “B”, the challenges, then it will lead to major frustrations, boredom, or even motivation to start looking for a new job.

Balancing Out

It is interesting that these two sides are very much the same. The only real difference is how it is perceived. Further, because different people have different interests, one person’s struggle is sometimes another person’s challenge. To use my example from earlier, the very mathematical problem that is a wonderful challenge for a logical person with mathematical interests will at the same time be an absolute frustration for someone else with no mathematical sense or interest.

As this is not an ideal world we sometimes need to do other people’s unfinished jobs. We need patience for this, but always remember to balance it off with something challenging or fun to maintain a healthy balance. Yes, force yourself to do so. When you notice the warning signs, immediately stop what you are doing for a while, before it is too late.

Posted in Art of Living | Tagged: , , , , | Leave a Comment »

Evolution?

Posted by Peet Brits on September 7, 2008

Evolution

Evolution

After seeing yet another sample of the countless arguments coming from creationists versus evolutionists, I feel I have to make a statement of my own.

I would like to start with something that my soon-to-be brother-in-law told me the other day:  “A group of people did not want to believe in God so they took some scientific evidence and started evolutionISM.  Then another group of people made the mistake of trying to counter it with the other extreme, starting creationISM.  They are both wrong.”

He has a degree in Zoology and speaks strongly against ISMs, claiming they are almost a sect of their own.  The above idea has spiralled onward and we are led to believe that we must side with either one of the two extremes: All we know has evolved in one way or another and thus God cannot exist, or there is a God which created the earth in no more than a calendar week.  Is this not a false dichotomy?

But the bible says…

When I started this weblog I wanted to avoid any religious matters, but as this is exactly what the creationists are doing I feel I need to speak their own language to really bring my point through to them.

That said; let me proceed with an example from the bible, at the point when the Israelites just got settled into their new home.  They looked at all the surrounding nations, and when they saw they all had kings they wanted one of their own.  Through the prophets the reply came that it is better not to have a single human ruler, but the people were stubborn.  You will notice that a more democratic system was proposed.  Today I believe most of us will agree that a democracy is better than a monarchy.

Now put yourself in the shoes of God.  If the idea of a more democratic human system (under the guidance of one God) was too much for them to handle, how much more difficult would it have been to touch other topics, like anti-slavery, or claiming that the earth is not flat, or going into all the details of how our world really was formed.  Is it not more likely that he said only what was needed to be said at the time?

So what about me?

Personally I do not have enough knowledge about the topic to make any real claims, but the sceptic inside of me would like to remind the reader of a very popular historic event when the people realised that the earth was round.  A group of hard-headed people with too much authority went as far as threatening to kill.  They even had a few nice scriptures to go along with it, just to soften the hearts of the people.

Is it not sad to realise that we might be repeating history?

Judging by some of the arguments I have heard lately it would seem that creationists do not argue for the sake of science, but rather because they feel threatened in their belief system.  There will always be people arguing for and against religion, but we must never allow this to stand in the way of new scientific discoveries.

I have been picking mostly on Creationists, but there are a lot of hateful comments coming from the other side of the fence as well.  Grow up people; this is really not helping anything!

So, is the earth 6,000 years old or not?  Does God exist?  That is not the point of this article.  I just want people to stop with all the silly arguments.  As mentioned before, the idea of God and evolution is not mutually exclusive.  I hope this will make people feel less emotionally threatened and more open for new possibilities.

Bringing it all together

Sometimes we are presented with extremes or loaded statements, fooling us into believing that we have a choice when we are really being fed spoons of lies.  So I will ask two things of you: do not blindly reject traditions just because you do not like them, as most of them were started for a reason, but at the same time do not blindly follow anything without questioning it in some way or another.

Posted in Philosophy | 2 Comments »

Who’s the Boss?

Posted by Peet Brits on August 30, 2008

[Article related not just to the IT industry, but most companies in general]

The Big Boss

The Big Boss

In some companies there seem to be continual strive between employees, managers, and even clients.  Everyone has got their own opinion.  To a certain degree they are all right, but only one can have the last say.

If your company makes the client your boss, then you will always be trailing behind in the wake of complaints, non-important things and sometimes other badly thought out ideas.

You want to lead to market!

Note that I am not saying that the client should be ignored.  He is after all responsible for the cash flow.  A policy stating that “the client is always right” is absolutely required, but always in context.  Value the client’s opinion.  Treat them as if they are the be all and end all.  Just do not forget who the real “big boss” is behind the scenes.

Strive for excellence

The purpose of any respectable company is to make the life of the client better and easier, even if that means changing the way the client does things.

Usually this type of change will not be welcomed by management, due to time, money and other restraints, but if the product your company has to offer really is that great then it is worth at least trying to pursue an ideal.  Now if something is not broken, do not fix it, but a lot of times the reason for keeping things the same is because that is the way it has been done for so many years and everybody is just too lazy to touch the topic.

A lot of times people only care about what they gain today.  They do not always have the foresight to realise that a bit of effort will in fact make life more efficient, meaning more time and money in their pockets over the long run.

IF NOT

If you compromise on quality, eventually things are going to break.  The client is going to blame the product.  The company could try to defend itself with words like “but you asked for it to be like this”, but that will just anger the client.  Whatever comes from this, the company is getting bad publicity.  Since the company has to continue the “client is always right” mentality they now have to promise a fix which will just end up as a bad “hack” and make matters worse for future upgrades.

Example

Client: “Do it like this.”
Certain employees striving for excellence: “This is not a good idea because…”
Manager: “Be quiet.  You are not paid to think about this, just make it work!”

YOU ARE CHOPPING OFF THEIR HANDS!!!

So stop blaming or laying down the employees if things go bad in the future.  You can throw all your fancy management processes out of the window.

You brought it upon yourself.

Posted in IT Industry | Leave a Comment »