From Glen to Grand

Yesterday, we drove from Saint-George to Page, Arizona. The Pipe Springs National Monument happened to be on our way, so we made a stop. Turned out there wasn’t much to see. A 30-minute ranger-led tour made it worthwhile though. During the tour through the Winsor Castle, she told us about the Mormons who used to live there. The Fort manager, also head of their Mormon church, married 58 women, resulting in plenty of children to work the Fort. ...

September 6, 2011 · 1 min · Jef Claes

Rusty rocks

We started the day with a short drive to Zion National Park. On our way we came across some colossal rock formations, layered with different shades of red. Since the park is almost entirely car free, we took the shuttle bus along the scenic route. We got off at different stops, to take short hikes to the park’s natural treasures. The Emerald Pools were first up, followed by the Weeping Rock and a riverside walk to the Narrows, which are architected by the Virgin river. Wading in the river gave us some much needed refreshment after a long day of hiking. ...

September 4, 2011 · 1 min · Jef Claes

Sands of Nevada

Yesterday evening we spent the night in a town called Tonopah, which is literally in the middle of nowhere. Today we continued our trip to Zion (Utah), driving hundreds of miles through the Nevada desert, getting sunburned on the way. There was not a soul in sight, except for cattle crossing the road, who seemed to be waiting for us to pass to say hello. We just arrived at St. George, which is a launching point to Zion National Park. ...

September 3, 2011 · 1 min · Jef Claes

Yosemite skyscrapers

These skyscrapers are, other than the enormous mountains, the redwood sequoia on top of them. Some of these trees are the same height as a thirty story building, which is higher than the Statue Of Liberty. It’s almost impossible to capture these giants on camera. After a short hike between the sequoia, we drove off to Yosemite Valley to discover the Yosemity Falls. Although the falls must be more impressive in Winter, they were still worth visiting. ...

September 2, 2011 · 1 min · Jef Claes

If you're going to San Francisco

While I’m writing this, the girlfriend and I are on our way from San Francisco to Yosemite National Park. We have spent two full days visiting ‘Fog City’. During these two intensive days we were able to see everything we aimed for, maybe more. Financial District This part of town is definitely worth a visit. The multiplicity of skyscrapers merging into the San Francisco fog, is an impressive view. When the fog has gone, the shadows the buildings cast on each other are just as amazing. ...

August 31, 2011 · 2 min · Jef Claes

High Hopes

Last week, I resigned from my job at Ferranti Computer Systems. Three years ago, days after receiving my Graduate Diploma in Applied Computer Science, I had my first real-world working experience at Ferranti Computer Systems. The first project I was assigned to, was a project for the Antwerp fire department. Along with two other graduates and four seniors, I was thrown in at the deep end. I always had solid grades in school, and was fairly confident that I grasped the material I was taught. Was I misguided (!): it only took me a few days to realize that I knew nothing about building software. It immediately became clear that I had to start learning and probably would need to keep at it forever, if I ever wanted to get remotely good at this. ...

August 8, 2011 · 3 min · Jef Claes

Merge sorting in JavaScript

The latest addition to my [data structures and algorithms in JavaScript](https://github.com/JefClaes Data-structures-and-algorithms-in-JavaScript) is the merge sort algorithm. There are four main steps in the merge sort algorithm (from Wikipedia): If the list is of length 0 or 1, then it is already sorted. Otherwise: Divide the unsorted list into two sublists of about half the size. Sort each sublist recursively by re-applying the merge sort. Merge the two sublists back into one sorted list. I found it a lot easier to understand the algorithm by just looking at this diagram (also from Wikipedia). ...

July 26, 2011 · 2 min · Jef Claes

My js data structures and algorithms now on GitHub

If you have been reading my blog lately, you know that I’m implementing some data structures and algorithms in JavaScript. So far, I have blogged about simple sorting algorithms, the stack data structure and the queue data structure. This week I have also implemented a doubly linked list. I started writing a post about that last implementation, but I didn’t like where it was going, so instead of writing about it, I have pushed everything to a public Git repository. ...

July 23, 2011 · 1 min · Jef Claes

Overoptimizing my JavaScript stack implementation for fun

Davy Brion made a comment on my JavaScript stack/queue implementation on Twitter last night: Any reason why you don’t immediately set elements to [] at declaration in your stack/queue example? var elements; this.push = function(element) { if (typeof(elements) === 'undefined') { elements = []; } elements.push(element); } Yes, I made an overoptimization, and a bad one. In this implementation, you save a few bytes in memory if you initialize the stack, but don’t push elements. This might have made some sense 15 years ago, but today a few bytes are very negligible compared to the cost of evaluating the elements reference on every push call. ...

July 18, 2011 · 1 min · Jef Claes

Stacks and queues in JavaScript

The second assignment in my ‘implementing data structures and algorithms in JavaScript’ quest consists of two popular data structures: the stack and the queue. The stack A stack is a last in, first out (LIFO) abstract data type and data structure. A stack can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top. Implementing this turned out to be pretty easy. A native JavaScript array already exposes methods to push and pop elements. In the dataStructures namespace, I defined a stack object. The stack object contains a private array which is initialized as soon as the first element is pushed into the stack. The public push and pop functions expose the corresponding functions of the private array. The stackTop function returns the last element added to the stack, but doesn’t remove it from the internal array. ...

July 12, 2011 · 3 min · Jef Claes