denkfest.ch

9. September, 2011

Yesterday, I attended denkfest.ch, “Four days of science, critical thinking & intelligent entertainment.”

The first event was a discussion about “skeptic blogging” where seven bloggers talked about what they do, where they get their ideas from and how they handle feedback.

For example, if you blog about a controversial topic like religion, you will get some heated feedback. The stance of the bloggers was that you won’t sway the die-hard believers. But a lot more people are just curious or want a second opinion. For those, “independent” blogs are a great help. I quote that because no one of us is really independent and that is something we all need to keep in mind.

There is a part of your brain which filters anything coming in through the senses long before the facts reach the consciousness. It’s easy to forget this since it’s so handy normally. Without it, it would be impossible to concentrate on something. While reading this text, you would have to listen to what the people next to you are talking about, how the seat below you feels like, or the clothes on your skin, what the air smells like and not to forget all those words on this page that you don’t want to read all at the same time – your eyes see all of them all the time, but the filtering makes sure that you can understand them one at a time.

In the Q&A session, someone said that the Internet became one of the most important tools in the Arabic world today. As many of you probably know, there were huge advances in science in Arabia while the Christians suppressed any free thought (6th to 15th century). Without those people,  astronomy, mathematics and chemistry wouldn’t be what they are today. We’d use Roman numerals instead of Arabic ones. Astrology would try to avoid launching probes to the moon lest we found “something”.

But religious fundamentalism led to a ban on thinking in the Arabic world. There was a comment that religion led to a lot of wars. That isn’t true. Greed and power lead to war, religion is just a handy tool in this context to rally emotions. Saying “we kill them because they are assholes/heretics/infidels” always gets better reception than saying “we kill them because they are more wealthy.” The latter is like saying “We’re too dumb to make a living, so let’s make someone else miserable, too.”

As Vince Ebert puts it, “if the Islamists were true to their belief, they’d attacked the Twin Towers not in air planes but with a battering ram.”

There was also some talk about what is religion and what is science.

I think religion is what you know for sure while science is what you know not. I tried to make this clear in a comment I gave in the Q&A session. When there is a light switch on the wall, the religious person tends to believe that it works while the scientist tries to come up with an experiment that proves that it doesn’t. While a religious person might flip the switch to “prove” that it works, a scientist will install sensors near the lamp and the switch to see if the time between flipping the switch and the reaction is always the same – someone else could operate the real switch. Or they’ll follow the wiring. They might influence the voltage on the wires to see if it’s the same on both ends to make sure this wire actually goes to the light bulb.

This might sound ridiculous but the problem with experiments is that they are only “true” as long as someone can’t prove them wrong. Einstein isn’t right, it’s just that so far no one could falsify his theory and since a lot of smart people tried, it’s probably a good theory in the sense that it’s resilient. Astrology wasn’t ever tried. No astrologer took a million people, followed them for years, noting down interesting events in their lives to see if there is a correlation to celestial “bodies” like the “houses” into which we are born. They always take each person individually, see “oh, here I was right, so my theory works” and they’re happy. If their theory fails, they don’t ask how they could conduct an experiment to verify anything, they just think “oh, well, outlier.”

Another good point by Lars Fischer: Most scientific publications are hard to understand. So if you don’t understand something, it’s probably scientific because the frauds try hard to make their lies easy to grasp.

Florian Freistetter has another summary of the event in his blog.


Push Button Builds

8. September, 2011

A few days ago, kingargyle posted about “Push Button Builds.” The idea is that building a software should be as simple as triggering a light switch.

A good example are Maven (mvn install) or most automake builds (configure && make && make install). They usually just work and if they fail, they give you some context to work from.

A good negative example are Eclipse PDE builds: Often there is no build script. If there is a build script, it will fail with an obscure error message in an Ant script that was recursively called by about 100 other Ant scripts. Each Eclipse project uses PDE but each build has different prerequisites (which you must know). If the build uses p2 repositories, there is no way of telling whether two subsequent builds will produce the same result. Some projects try really hard to help newcomers to build their stuff with a recipe that needs 100+ easy steps. In four words: It’s a mess.

Or a surefire way to attract only the most dedicated committers because everyone else will be utterly demotivated very quickly (and you don’t want those, do you? 😉

So like Dave Carver, I would like to spread the idea. Make builds more simple. Here is an example and following Dave’s advice, I’m going to make the build script even more simple.

Why a script and not, say, a web site with instructions? Several reasons:

  1. A script will make you more dedicated. It’s easy to be sloppy with a README. With a script, at least the syntax will be right.
  2. When a README fails, you won’t really know what to do next. With a script, you have a very precise starting point for a bug report: “The setup script failed in line 15” vs. “Install with Maven … and which version?”
  3. Scripts can prepare the environment. Since you don’t want to make anyone angry, create a new directory and put everything in there. Download what you need, unpack it, configure it. If you can’t do it with a script, why should a newcomer fare better?
  4. Can’t download something? You can always print an error message with exact instructions: Go to website … download xxx, version yyy … put it here. In a script, you can say ‘echo “Put download into $build_dir”‘ Try that in a README.
  5. You can prove that a script works. Good luck trying that with a README.
  6. You can run scripts on a CI server to make sure they work.
  7. A script always needs an interpreter. Bash scripts run on Mac and Linux. What about Windows users? Well, 100% of the Windows users build OSS software from .msi files. The tiny rest has three options: a) Read the bash script, b) install Cygwin/MinGW, c) install Linux.

Eventually Windows Will Have Voice Recognition

8. September, 2011

At least for a couple of days until children start to run through the cube farms screaming at the top of their lungs: “Format C: Yes!”


Disabled Sharing

7. September, 2011

Until the German law has decided how to handle the illegal data transfer to sites like Facebook and Co., I’ve disabled the sharing options in my blog.

For those interested: German laws say that companies must not collect data about someone unless said data is necessary for a business transaction. Since you have no business with Facebook (Facebook’s business is selling your data to advertising companies), give your data (like that you visited my blog and liked it) to Facebook is illegal.

It would even be illegal if I asked for you permission before showing a like / +1 button since you have no way of knowing what happens with your data.

While this might seem excessive, it’s a law that has its roots from German’s past where the Nazi time where such data could kill you (for example if they suspected you to help Jews, listen to foreign radio, etc). Uncontrolled data collection gives someone uncontrolled power and there really is no telling how such data could be abused by a smart criminal.

People already lose jobs or don’t get them in the first place depending on the Facebook profile. Just imagine what could happen if someone who hates you, say your ex, gets a list of all your friends and starts to tell them the “truth” about you. Or if some overeager official who suspects you to be a criminal asks Facebook for all your data which includes a list of most web sites that you visited in the past 90 days.


No Software Can Be Better Than Its Worst Error Message

7. September, 2011

Kudos for this simple but oh so true proverb go to Stephan Herrmann.

Thank you.


Human-Readable File Sizes

6. September, 2011

Every now and then, you need to show a number to a human. In some cases, those numbers can range from very small to huge. File sizes are an example.

Here is a very short code sample how to get a nice file size for human consumption: How to convert byte size into human readable format in java?

Best of all: It’s four lines of code but it can handle SI and non-SI units.


Final Java Questions

3. September, 2011

Recently, I read a blog post which talked how “stupid” today’s developers are. As an example, “the interviewed candidates claims that they are very good at core java and saying that we can’t add/remove elements to an ArrayList which is declared as final.” (Are Frameworks Making Developers Dumb?)

Funny, right? But it got me thinking.

How important is it really that someone knows this? With over 60K points on stackoverflow, I’m one of the most knowledgeable software developers in the world but there was a moment, when my brain stumbled over the question. I rarely use final in my code. So how much value does this information have? How often do I need this every day? Once per week? Month? Year? How much damage can the wrong answer cause?

While I agree that sound knowledge helps a lot, I see team mates struggle much less. They don’t know as much as I do but there is a demotivating effect here: If you know too much, every simple question triggers a flood of thoughts: What can go wrong? Didn’t we encounter this already? What’s the best solution?

Sometimes, there are two “best” solutions and missing any further input, I can get stuck in a deadlock. Which way to go?

Or the solution to a problem triggers a new problem which in turn triggers a third. Suddenly, I’m caught in a maelstrom of dread which overwhelms me: Every possible way out just causes more trouble.

So for me, knowledge isn’t everything. Some people are “just” decent developers but that should not stop you to hire them. Here are some other, valuable factors:

  • How easily do they give up?
  • How well do they play as a team? That doesn’t mean everyone has to be a “team player” (whatever that might be). But strengths and weaknesses of each individual should compensate each other. One guys likes to talk a lot, let him handle customers. The other guy likes to work alone, give him the hard tasks that need a lot of time and concentration.
Most of all, make sure that every member of the team understands that a weak spot doesn’t make someone less valuable. It just makes them less valuable for certain tasks. If you can distribute the tasks just right, the team will be much stronger than one made up from the best developers in the world.

Restoring a Corrupted Workspace in Eclipse

2. September, 2011

When Eclipse is starting to act weird or completely refuses to start, the .metadata probably got corrupted. Now what? You could delete the .metadata directory and waste a couple of hours to restore the IDE to a useful state.

Here are some tips to speed up the process a lot:

  1. If Eclipse still works, export your preferences.
  2. Try to start Eclipse with -clean. That flushes some caches which might have become corrupted.
  3. Start Eclipse, wait for all builds and background activity to stop and then kill it using your OS’ tools. When Eclipse restarts, it will notice it has crashed and do some more cleanup / distrust more caches.
  4. Install the Bulk Import plugin to save list of projects and their state.
  5. Instead of deleting .metadata/, rename it.
  6. Restore the folder “.metadata/.plugins/org.eclipse.core.runtime/.settings” from the backup. This is basically the same as the preferences. Kudos to Tomas Kramar for figuring that one out.
  7. Restart Eclipse. You should get an empty workspace but all your preferences should be there.
  8. Use the buttons in the toolbar to restore all your projects.

Another useful plugin is the “save UI state” which saves the workspace layout and open editors after every change (based on the code here).

With a way to preserve your preferences, saving the project state the workspace layout, you should be able to quickly restore the IDE.

Related articles:

  • Eclipse Dance Steps – “Sometime Eclipse fails to work as expected. The following ‘dances’, in increasing order of desperation, may help. Remember to maintain a fixed grin throughout and try not to tread on your own toes.”

Finally: M$ Improves File Operations

1. September, 2011

Good things need time. Even if they hurt you every day. File operations (copy, move, delete) on Windows are such a pain.

The damn thing takes half an hour to found out how many files to delete and then deletes them in a couple of seconds. Or the old joke “How long will it take?” Or copying two folders with the same name over each other (computer experts call that “merging”).

Well, M$ listened (they always do – they just rarely care) and after only … calculating … 29 years, they’re going to fix it! Yay ^_^

PS: Linux does it this way since a couple of years. Not sure about Mac. So another thing that M$ reluctantly “invented” after everyone else had it for years.


SCO vs Linux: Game Over

31. August, 2011

Finally: 10th Circuit Affirms in All Respects – Novell, Not SCO, Owns the Copyrights, etc., by pj

Of course, this is SCO … I might be a little surprised if they didn’t try to appeal to the US Supreme Court 😉

SCO or how to waste millions of dollars for naught.