31. July, 2012
When I reach to the edge of the universe
I do so knowing that along some paths of cosmic discovery
There are times when, at least for now,
One must be content to love the questions themselves
— Neil deGrasse Tyson
Symphony of Science is a YouTube channel where they mix awe-inspiring images with vocalized texts. It’s a bit hard to explain but easy to understand. Watch this:
27. July, 2012
If you develop web apps, you have encountered java.lang.OutOfMemoryError: PermGen.
Nikita Salnikov-tarnovski wrote an excellent article where these come from and how to solve them: Busting PermGen Myths
25. July, 2012
When I read “Britain’s share of the global music market is higher than ever” (source) and “We can only realise this potential if we have a strong domestic copyright”, I can’t help but wonder: Isn’t the industry so successful because they have the today’s laws?
21. July, 2012
(Second part of three; first part is here)
Software has bugs – there simply is no way to avoid them. If you can’t avoid them, maybe you can handle them efficiently? Yes, you can:
As you can see, the cost of fixing bugs rises as time passes. Why is that?
There are many reasons:
- When you find a bug a couple of minutes after you created it, you probably still have all the information in your head that is necessary to understand and fix it.
- If you just created the bug, no code depends on it. As soon as you start writing unit tests and more code, fixing becomes more expensive because you start to have dependencies.
- People might have gotten used to the bug and developed workarounds. If you fix the bug, this will have an impact on them.
- A bug found in production is likely to be reported by a customer. Customers can’t see inside of your software, so extra effort will have to be spent to determine what the actual problem is. Google for “how to report bugs“
- When a bug is discovered at the customer, it might trigger meetings and scapegoat hunting. Think of it this way: A 1 hour 8 person meeting costs about $1’000. And no bug was ever fixed in a meeting.
- Some bugs escalate to the top-level management. Imagine for a moment what it would mean for you if their CEO called your CEO to complain about a problem you caused.
- Bugs might break expensive things, harm or even kill people or start World War 3.
This also explains why unit testing is so much more efficient to QA testing for many kinds of bugs: It simply catches them before they spread their bad influence.
So fix your bugs early, OK?
20. July, 2012
When a project is young and dashing, mistakes are made. The PDE build process is such a mistake. If you ever tried to build Eclipse (or at least some of the older parts), then you know that this is brittle and the error messages are more like mysterious ramblings of an angry deity than helpful.
Enter stage CBI. From the FAQ:
The CBI build of the Eclipse platform is intended to produce the same output as the PDE build, and thus facilitate packaging without noticeable change. The noticeable difference the CBI build of the platform makes is ease of use to build the platform. For example, the prototype has consistently demonstrated that a newcomer without prior experience can build the Eclipse platform with under 30 minutes of effort on a machine with a supported JDK & Maven.
What can I say?
19. July, 2012
If you want to see what’s possible in today’s browsers, go to Chrome Experiments.
16. July, 2012
Hello and welcome to a new series of blogs called “Designing DSLs” or DDSL for short. If you have used or designed a DSL before, then you’ll know that there are a couple of pitfalls. This blog series aims to provide tips how to build “great” DSLs – whatever that might be ;-)
What are the most common pitfalls for designers of DSLs?
- The DSL is too broad
- The DSL is too limited
- The syntax has weird quirks (a.k.a. backwards compatibility syndrome)
Why is it so hard to design a great DSL? They should be simple, right?
Well, as Einstein (“Everything should be made as simple as possible, but no simpler“) and Blaise Pascal (“I would have written a shorter letter, but I did not have the time.“) already knew, it’s always easy to make something complicated – simplicity is hard.
On top of that, every mathematical system is either incomplete or inconsistent. And let’s not forget that each DSL is a model, too. And as you might know, all models are wrong but some are useful.
Should we abandon all hope? No. Just always remember that a good DSL is hard work.
First, a general tip: Look at existing examples. There are thousands of examples out there; use them. Knowing several programming languages yourself is a big bonus (everyone should know more than two languages).
“Wait a minute,” I hear you ask, “these are real programming languages!” So? A lot of brainpower went into designing them (or working around shortcomings), which makes them a great source of inspiration. Bonus: A lot of people know these languages which gives you a larger audience to discuss ideas (as opposed to the 3-4 people who will use your DSL in the beginning).