Posts

Showing posts from July, 2013

Languages and databases - a step back a day

Image
I've started to learn the Go language recently and to be frank I'm horrified. Horrified by the way the future of programming looks like and the NoSQL movement just making it worse. Languages - a step back If you haven't read any Fortran code yet, do it by any means. It's a language that was invented in 1957 when 'computers' were practically non existent. However, if you look at it more than 50 years later it's still readable and not really ugly - especially compared to some C++ code... Then we had Python, Ruby, Java, C# and all sorts of modern languages. In fact, we have a new language born almost every day (have you heard about Rust for instance?). The only issue with them is that the programming model hasn't really changed in the past 50 years. We write text files, line by line, instructing the computer what to do step after step. The processors didn't really change much either unfortunately. And the horrifying part? Google comes along,

The next big thing on the web – custom HTML elements

Image
If you are either a HTML component vendor or ever wanted to use someone else's HTML module, you already faces the same issue: components may not work together and even if they do, they put a lot of noise in your pure HTML structure. This is going to change very soon. Large component vendors like Kendo or Telerik are creating amazing HTML components that are, in theory, just plug and play: whatever framework you are working with it should be really easy to use those enhanced modules. However, even if they work as they are intended to, they change and litter the HTML DOM so any kind of debugging can be a bit of a pain. Noisy HTML The problem is that even if we start with a nice and clean HTML code that looks like this: <select id="size"> <option>S - 6 3/4"</option> <option>M - 7 1/4"</option> <option>L - 7 1/8"</option> <opti

Simulating crowds and animal swarms

Image
If you've ever looked at an ant farm I'm sure you were surprised by how organised they were. But the truth is they all follow a very simple logic which “magically” adds up to a large scale organised colony. How do they do that? Swarm behaviour is not really observable on one entity but very visible on the large scale. Interestingly it works with us, humans as well: we don't know how we board a train or plain but a simulated environment can predict very well will we move and how efficient the crowd movement will be. Boids Studying the crowd movement is not new by any means: Craig Reynolds in 1986 came up with three simple rules that can describe the large swarm movement quite accurately. He named the rules as “boids” after birds (it supposed to be the New York accent style bird?). The three rules are: - separation : the entities prefer to keep some distance from each other - alignment : try to go the same way as the group or the local flock-mates - cohesion : t

Ubuntu loses network connection after do-release-upgrade - Ignoring unknown interface eth0=eth0

Over the weekend I decided to upgrade one of my linux servers, running an Ubuntu desktop. The Ubuntu do-release-upgrade tool is pretty reliable, even over SSH the whole process completed without any errors (try that from Windows 2003 - 2008). The only issue is that after reboot the machine disappeared from the net. Had to hack into the console to have a look what's going on. Turns out my eth0 interface wasn't configured so didn't get any IP addresses: > ifup eth0  * Reconfiguring network interfaces... Ignoring unknown interface eth0=eth0. The fix was pretty easy, just had to edit /etc/network/interfaces files and try again: auto lo iface lo inet loopback # For DHCP only auto eth0 # Statis IP assignment iface eth0 inet static address 79.1.2.3 netmask 255.255.255.0 gateway 79.1.2.1 # Google's DNS - fast and reliable dns-nameservers 8.8.8.8 ifup eth0 was much friendlier this time, the box was back on the net again.