Why Beating Up a Child is a Bad Idea

16. February, 2009

Most people believe that beating a child is bad but they believe this for the wrong reasons. Apart from the obvious (harming their unconditional trust in the parent or, worse, harming them physically for life or even accidentally killing them), there are two reasons against it: First, it doesn’t work and second, it will send the wrong message.

When a parent beats a child, all other means have failed. “The child just won’t listen”. So the idea is to use pain to drive the message home. The first big problem with this approach is this: The child will try to avoid the pain more than the behavior which leads to the pain — if it even makes the connection; the pain comes from you, not from what it did some time ago. From the infants point of view, to avoid the pain, it is more effective to make sure you don’t notice the behavior anymore than to stop the behavior.

If it was the other way around, the child would have stopped the behavior already before the parent felt that violence was the only option left.

So in summary, beating a child will first train it to become a better liar, rather than change its behavior.

The second problem is the message you send by resorting to physical violence. Children are hormonally controlled into believing that anything the parent does is “correct”. That is why they naturally mimic (“copy”) the behavior of the parents — any behavior, even the traits that we don’t like about ourselves. Now, you’ve hit your child, what does it learn?

It has learned that hitting someone else is OK. Because if it wasn’t, then you wouldn’t do it. QED. It has also learned that pain is another way to get what it wants. The more often is is beaten, the lower the barrier will get. For the first beating, it will link the behavior to “last resort”. If it happens regularly, it will adjust accordingly.

So next time, you feel the urge to hit your child, ask yourself these questions:

  • Is that what I want to teach my child?
  • Is it possible that the child is copying my own behavior in this instance?

In the latter case, the message will be even worse: The child just did something you do and it got punished for it. How could it ever resolve a conflict that you, an adult, can’t?

So what can you do?

The most simple solution is to walk away for a few minutes. It will help you cool down, to get a clear head. No one can make good decisions in the heat of the moment and no one can force you to do it. Being a parent hasn’t suddenly turned you into Superman (and even Superman had years of training to become as calm as he is). Also, don’t underestimate the power of ignoring. Just make sure the child understands that you are walking away because it just did something wrong — and that you will be back. Guess what the child will be thinking while you’re away?

After getting some distance, first calm down. Then assess the situation. How bad is it after all? Can you let it slip? If not, decide for a new rule to set up. Consider how you want to implement the new rule.

Complete these thoughts and decisions before you return and explain them to your child. If you feel insecure about them, then don’t bother to even try to set them up because your child will notice that you’re not really behind the new rules. You would be sending the message “this is not that important” and not get the desired result. Be honest to yourself. If you’re not really behind it, then the whole issue probably wasn’t so important after all.

The Bad Old Times

13. February, 2009

If you ever need a convincing argument for someone who strongly believes that “in former times, everything was better”, try this: Ask them if they believe in the Greek Philosophy, the principles of logic, deduction and society on which todays wealth and freedom are built. If they do, let them know this:

“The Greeks considered it normal for any man to be drawn to the beauty of a boy—just as much if not more than to that of a woman.”

As with everything, the past is not better in every respect than today and vice versa. That said, we do learn from past mistakes and try to avoid them and more often than not, we succeed. This also is human nature.

Source: Pederasty in ancient Greece

Your Problems Are New? Think Again!

12. February, 2009

Most problems that we are contemplating today are the same as 2’000 years ago. Here is a guy who posts one or two of Seneca’s thought every week: Letters from a Stoic

On Blindly Following Advice

12. February, 2009

In his post “Thoughts on Developer Testing“,

“Unfortunately, you can’t write better software by blindly following dogma of ‘industry experts’.”

Just as “an eye for an eye” leaves everyone blind, staggering around in a changing environment with your eyes closed shut will not help you getting closer to any goal you might strive for.

A mind is like a parachute: It’s only working when it’s open.

Graph Layout in Java

11. February, 2009

If you need to layout a graph in Java, these might help:

  • yed Free version of a once commercial framework
  • prefuse.org very slick transitions; you will want to use Java 6
  • jung great demos, doesn’t look as slick as prefuse but might be more powerful.
  • gvf Just the basics, probably dead, too.
  • JGraph – commercial, thanks to David@jgraph.com.

There is also a collection of algorithms for graphs: JGraphT It uses JGraph as the default UI library but you can use the algorithms without that.

Being On The Losing End Can Help You Win

11. February, 2009

This one made me laugh: Damn the River

Why Good Developers Don’t Document

10. February, 2009

I don’t document because I know what I’m doing. Seriously. I sit down in front of the computer and beautiful code flows out of my fingertips. No idea how I do it. It’s like digesting for me. It just happens. For me, with my vast experience, my code is so obvious that I can’t think of any question someone might have (okay, let’s just say I need a bit of distance to come up with questions, say a year or so). For me, it’s as simple to understand as hello world. So why make things worse by adding unnecessary comments?

I do understand that other people see this differently but that doesn’t help. I’m not those other people and I simply can’t think what questions they may have. In my case, the solution was unit tests. I need them anyway (they make me more productive) and for the rest of the team, they serve as example how to use the code I write. This is much better than documentation because

1. a test is small, so the answer to your question lies in 10 lines of code. 10 lines of code can’t take long to understand.
2. it is always correct and up to date (unlike documentation which tends to rot)
3. after getting used to test things, you feel how it improves your output (in all ways); documentation, OTOH, is always a drag (“we have to do it … not again … oh man!”).

Great Resource For Bloggers

9. February, 2009

If you want to improve your skills as a blogger (or as a writer in general), this is a great resource: copyblogger.com

The Cost of Safety

6. February, 2009

Worried about your safety? The safety of your wife/daughter/son/house/car/whatever? If you did worry about something like that in the past, when considering options to make something more safe, did you consider the cost?

Paul Graham wrote a nice essay “Artists Ship” (after the remark by Steve Jobs). Please ignore his “only programmers love to work hard”. The rest of the argument is very convincing. When people talk about “improving” some situation (crime rate, child abuse, revenue streams), they often propose solutions but there is little to no discussion about the cost of said “solution”.

So we want to protect our children against molesters. Fair enough. Only in the discussion, you can’t argue with reason because it’s so emotional. People don’t know anything about the reasons why someone becomes a pedophile or how (and if at all) this can be treated. They want a “solution”, completely ignorant of the cost. It’s a fact that “better” solutions (which will catch more violators) will always harm more innocent people.

Let’s look at a related case. Make up your mind about this case: “Julie Amero, a 40-year-old substitute teacher from Connecticut is facing up to 40 years in prison for exposing her seventh grade class to a cascade of pornographic imagery.” (more). Guilty? Innocent? What’s “exposing” supposed to mean here? Did she show them intentionally? Such a simple case and so many questions …

Say I want to write a program that automatically searches the Internet for child pr0n and sends alerts to the authorities. I can’t. It’s not possible anymore in any western country because I could neither test my program nor use it: Even the download of child pr0n is illegal. It’s illegal before a human can see it. I wonder how all those web filters work … Maybe they build them in a country where child abuse is not illegal.

So you like to watch pr0n but don’t want to pay? The Internet is full of “free” ware. But downloading “good.jpg” might get you into jail, depending on what you might find in the image afterwards. Guilty? Innocent?

Most computers on the Internet are vulnerable to all kinds of attacks. It’s ridiculously simple to spread viruses and worms which effectively take over your computer. Who is guilty when a cracker puts illegal pictures on your PC? You, because you didn’t understand the technology? You, because it is too hard to catch the cracker? You, because the prosecution doesn’t understand the technology, either? You, because the jury can’t follow the explanations of the experts anymore?

On the other hand, a clever pervert might infect his computer deliberately, so he can always say “it was the virus!”. With todays paint software, how hard is it to replace the head of an adult with one of a child and reduce the cup size? How hard is it to prove that the picture is real? How about pencil drawings? You do know that most paint programs come with “artistic filters”.

Such topics tend to become witch hunts where anyone can potentially be as guilty as we want them to be. Justice isn’t blind to protect the successful criminal, she’s blind in order to protect the innocent against prejudice.

So next time, you ask for a new rule, think about the cost, first.

Btw. During the research for this article, I googled for “teacher england hacker child porn“. Condemn me.

Links (in the order in which I stumbled over them):

Distributed Software Development With Git

5. February, 2009

Real Men do it Themselves

There is stuff that changes the way you work. Then, there is stuff that changes the way you think.

When Donald E. Knuth wanted to write a series of books about The Art of Computer Programming, he found himself missing a program to convert his words into a beautiful book. To solve that problem, he invented TeX. When there were no nice fonts around, he added METAFONT. In a similar way, when Linus Torvalds found himself lacking a good version control system (VCS) after Bitkeeper decided to close access for OSS developers, he chose the only solution he had: He wrote his own.

And thus, Git was born and a lot of people living in abuse-protected web forums were in deep trouble. Even before them, the critics soared: What, another VCS?

Subversion vs. Git

Especially the people around Subversion were not so pleased and many people wondered why Linus chose to do his own thing instead of building on existing code. One of the reasons is that Subversion can be thought as a very elaborate bug fix for CVS. It didn’t try to reinvent the wheel.

It also inherits some legacy: You have to setup a central server if you want to do distributed development outside of your LAN. Certain operations are slow, like checkout and update. Agreed, they are faster than CVS but try these with Git. And it’s monolithic software unless you’re willing to use your C compiler. There are only very few ways to interact with the repository from a shell script, only a few hooks to do custom stuff (like sending email). If you just wanted to add a small feature, it would mean real programming work instead of whipping together a quick shell script.

I’m by no means a critic of Subversion; I’m using it every day and I’m happy with it. My point is that it’s confining me in a pretty small box, just a little bit larger than CVS and with less problems. That doesn’t make it larger, though. An example.

Oh, the Pain

You have some files which you want to take home to work on. So you copy them on an USB drive, take them home, edit them, bring them back. When you return to work, a co-worker has changed one of the files. He tells you after you copied all the files from your USB drive back onto your work PC (“Who has time to read all those warnings? Yes to All!”)

The next day, you’re smarter and check in the files into Subversion (SVN). There is no need for a central server and when you ignore the warnings from SVN, you can create the repository on a network drive. When the drive fails in an inopportune moment, your repository will be data trash, but there are certain risks one has to take.

You checkout a copy on your USB drive and take that home. Since working on the file from your USB stick is too slow, you copy everything on your home PC and edit it there. When copying the files back on the USB stick, you notice a lot of write-protected files in .svn directories. Oh well, time for “Yes to All!” again.

After returning to work, you synchronize your checkout with the SVN repository. Life is great. Unless you have Linux at home and were not so careful about Carriage Return/Line Feed conversion and you find the copy of your data on the USB drive is now currupt. But who is using Linux anyway?

The real trouble starts when you feel the need to carry the repository with you. Imagine you have a great idea, you have the USB drive with you, but you’re neither at work nor at home. If you have a computer closeby, you could work on the copy on the USB drive but at the cost of either getting out of sync with your home or work copy.

Subversion, like CVS, only supports a single, central repository unless you use tools like SVK. SVK depends on Perl, though, and it adds nice little … err … rather big cryptic code strings to the commit in messages.


Git, on the other hand, has been built on the “greenfield”. Torvalds could add all the features he wanted and avoid all the common mistakes inherited by the CVS legacy. From a 1000 feet, it’s a set of loosely coupled commands which work on an object database which allows to version objects. Git doesn’t care what an object is, it just versions it. This is pretty similar to SVN, maybe except that Git handles large files better. And that Git is faster for most operations.

The main difference between Git and SVN is that Git is decentralized. This means you can create as many repositories as you want and synchronize them. So in the example above, you can have one repository at work, one on your USB drive and one at home. You can work on all three of them independently and then use Git to figure out how to merge everything.

Remember the dreaded branches from CVS? SVN eased the pain considerably but with Git, everything is a branch to begin with.

To become happy with Git, there are two major steps you need to take. First, you must understand that there is no server. Forget about the idea of server. Git allows to synchronize different copies of a couple of files in different places without a server. To do this effectively, Git keeps some information in the .git directory. If you want do to this remotely, you can use Git as a server, too, but that is basically the same thing as using it locally. Except that the name of a different computer is involved.

The second step is that you don’t put more than one project into one Git repository. With CVS, we are used to use modules. With Subversion, you create subtrees with trunk and branch. With Git, you have one repository per project. Setting up a repository is so cheap, it really doesn’t make sense to have more than one project in it.

%d bloggers like this: