• Category Archives
  • Instruction
  • 14 Posts

Cross-platform GUI programming using D and Gtk+

I’ve recently been playing with D and realized it’s an awesome language capable of any task. I’ve also had a few ideas for native applications that i want to realize so i decided to explore the feasibility of building these using D.

Using D presents a little problem though, there is no standard GUI library! Don’t worry there are many third party GUI libraries available, one of these is GTK+ and luckily there are D bindings available to make using this library easy. Well, i say ‘easy’ (in inverted commas) because the installation and usage of these bindings is not very well documented, hence, this post. The actual procedure for installing and using them is actually quite easy once you know what to do, so lets start. I’ve separated the following instructions into Windows and Linux sections.

Implementing dynamic, read-only object properties in PHP

I was recently working on a PHP project where i needed (or would of liked) an object to have publicly available properties which were read-only. Unfortunately PHP doesn’t support this and the usual way of implementing something similar was to have private properties and standard getter methods. The trouble with getter methods is that sometimes they seem a little like overkill, especially if you’re only accessing a name or an age, etc. Do you really need a method call to return a simple string or number that is always the same? Plus, in my opinion, they are harder to read than properties, although it could be argued only slightly.

How to sort collections of custom types in C#

I’ve recently created a program which sorts collections of custom types quite extensively and i thought i’d share the standard method of doing this. When i first started designing my program, i honestly thought it would be quite a pain sorting these collections but i was pleasantly surprised, as usual by the .NET framework, that there are built in shortcuts.

JavaScript – The Good Parts

This is a Google Tech Talk which everyone who’s using Javascript should watch. In this video Douglas Crockford explains the good and bad sides to Javascript and highlights very good tips for Javascript development.

JavaScript is a language with more than its share of bad parts. It went from non-existence to global adoption in an alarmingly short period of time. It never had an interval in the lab when it could be tried out and polished. JavaScript has some extraordinarily good parts. In JavaScript there is a beautiful, highly expressive language that is buried under a steaming pile of good intentions and blunders. The best nature of JavaScript was so effectively hidden that for many years the prevailing opinion of JavaScript was that it was an unsightly, incompetent abomination. This session will expose the goodness in JavaScript, an outstanding dynamic programming language. Within the language is an elegant subset that is vastly superior to the language as a whole, being more reliable, readable and maintainable.

Douglas Crockford