Featured demo – The Seeker

Today’s demo is a special one. It’s titled “The Seeker” by Still the demogroup.

It’s special because it’s the most thought provoking demo I’ve seen in a long time. First, some administration: Download the demo. It’s about 9.67 MB and 4 minutes in length.

I understand that to run the demos on your computer, you usually need a high-end graphics card and the latest card drivers. You also need to download the demos, which in some cases, can be pretty large.

So I’m delighted to tell you that there are online video hosts for it! I’m actually quite surprised myself. Now you can forget about pesky computer settings and just watch the video for it. Here are two links:

Capped.TV is a video host specifically for demos, and I only just found out about it. Still, running the demo on your computer is the best way to get the full experience.

About the thought provoking part, while you’re watching the demo, ask yourself these questions:

  • what is the ribbon seeking?
  • what does the black substance wrapping the ribbon represent?
  • do you identify with the ribbon, that is, you’re seeking something too?

And the music is awesome. Full of longing and suspense and triumph. You should watch the demo even if it’s only for the music.

Mind Trap – Locked in stasis

[This is a continuation of the story in part 1 and part 2]

Ryan heard grinding stone behind him. He turned and walked towards the noise. A man-sized opening had appeared beside the left statue. Ryan jumped quickly past the statues, and peered into the opening.

It was dark. The inner walls appeared to be impeccably smooth. And there were steps leading downwards.

More stairs?” Ryan stuttered. Then he realised it’s considerably colder, and the cold seemed to coming from down there.

He was about to take out the flashlight when he had a better idea. Ryan bounded back into the large room, and took one of the burning torches from its bracket. Then he came back in front of the opening. Taking a deep breath, he held out the torch for illumination and walked down the steps.

It was almost suffocating. Every step Ryan took plunged him deeper into icy cold air. His hands clutched the torch handle, the warmth from the flame enveloped him in a small protective bubble.

Ryan lifted his head at the sound of his shoes crunching snow. He had reached the bottom of the stairs, and entered a large circular cavern. The light from the torch barely filled the cavern, and ambient glow reflected off the icy walls.

A frozen lake filled the centre of the cavern, thin layers of snow in patches across the surface. Long icicles hung precariously above, almost threatening to fall and break the lake surface. A path circled the lake to the left, ending at the foot of what appeared to be another flight of steps on the far side of the lake.

Ryan started walking.

His breath came out in misty clouds and his legs jiggled every few steps from shivering uncontrollably. His hands wrapped tightly around the torch as his life depended on it. The torch flame was the only thing keeping the cold at bay.

“It’s on you if he dies.”
“I know what I’m doing.”

Ryan was halfway around the lake when he heard a crackling sound to his right. Turning slightly, he saw a jagged split in the air, hovering in the centre of the lake, spilling forth blue light. Then it disappeared as a huge icicle crashed through it, and exploded into pieces as it hit the frozen surface.

A growl sounded in the air, somehow thickening the cold even more. It was also brighter; the lake had started to glow with an orange light. Then the lake surface exploded, and Ryan crouched down to shield himself from the flying ice and stinging water.

The air immediately felt warmer. Ryan opened his eyes and saw a fearsome creature standing close to the edge of the lake near him. It had a lion in front, a goat in the middle, and a dragon at the back, flames bursting out of the serpents mouth in short spurts. It was also looking directly at Ryan.

“A chimera?”

The chimera stepped forward. Ryan backed up a little. Sensing something about to happen, Ryan sprinted towards the exit. Which was lucky, because the chimera breathed a stream of fire where Ryan was a second ago.

Realising its prey escaping, the chimera bounded after Ryan. Ryan slid and fell to the floor. The chimera jumped at him, lion’s mouth open wide, and Ryan thrust the only weapon he had in his hands out, shutting his eyes to avoid seeing his inevitable death.

When it didn’t come after a few seconds, he opened his eyes. The chimera was frozen midair. Ryan’s torch was inside the chimera’s mouth, its flames feebly flickering inside.

Ryan was wondering what happened when a sense of deja vu overcame him. A memory of him solving the puzzle in the large room with 3 statues. A memory of him standing before a lion statue. And pressing the lion’s tongue.

The chimera shimmered and then vanished. Ryan held out the torch a few moments more. Then he picked himself up and ran for the stairs at the exit.

Author’s notes

No puzzles this time. I couldn’t come up with anything good, and I didn’t want to leave Ryan stranded. So I’ve decided to just continue with the story. The original plan had 5 episodes, so there’s 2 more (this is the third).

I’m not sure if anyone noticed, but in the last puzzle episode, there was this hint:
935
9351246780

If you matched the number with the position of alphabets, 935 becomes “ice”. “i” is the 9th letter, “c” is the 3rd and “e” is the 5th. The plaque in episode 2 had this hint, so there’s “ice” at the top of the plaque, and a drawing of fire just below it. Sort of a hint of the chimera to come, the ice lake trapping the fiery beast below.

Then there’s the 3 statues of lion, goat and dragon in episode 2. Linking the solution from before into this episode was a stroke of luck. I was struggling about how Ryan could defeat the chimera…

Flights of fantasy and realms of reality

Imagination is more important than knowledge
- Albert Einstein

During a stint some time back, I casually asked a co-worker what he thought of “Charmed”, the television series. I had to explain the concept of magic and witches to him. In the end, he said he’d much rather watch or read fictional stories based on real life, like law or police work. I couldn’t get through to him about the joys of simply asking “What if?”.

“What if you could fly?”
“What if you could stop time?”
“What if you could move objects with your mind?”

What if.

I’m going to give 2 extremely broad generalisations. Here are my observations. Asians (or maybe just Chinese) in general, are less daring to try new things. The general advice is to be realistic, more down-to-earth. Once in a while, a small spark of innovation occurs, possibly out of sheer luck, and progress is made. This probably don’t match the Asia today.

The Western world seems more willing to reach for the sky, indeed, for outer space. Leaps of faith, jumps in industrial progress and quantum bounds in science and technology.

Like I said, those are very broad generalisations. I admit that I’m a little sheltered here in Singapore, so the situation east and west of my longitude may not be as what I perceive them to be. So here’s what I do know. The education system in my country consistently churns out good students, even outperforming American students.

The thing is, parents here are, shall we say, extremely concerned about their children’s education and future. I’m actually appalled at the activities a typical 8 year old goes through. Aside from school, there’s extra tuition and lessons for English, math, Chinese, science, ballet, swimming, music and even brain development courses (I think it’s Montesorri or something). Where’s the time for fun? I’m not sure what happens in your country, but that’s what’s happening here in Singapore.

Yet we don’t have Nobel prize winners. I read in another report (can’t find the reference) an observation. The Asian countries have, on average, better students. But the Western countries, particularly America, have on occasion, brilliant students. The really bad and the really good live near each other, like some cosmic balance act.

Where am I going with this? I believe the key is imagination. My countrymen may be better at math and science on average, but the Americans landed on the moon.

So, now, finally, bringing it back to something relevant. Programming is an act of creation, of imagination. Maintaining existing code requires you to imagine yourself in the shoes of the programmers who wrote that. Writing new code requires you to imagine how the finished program is going to look like.

If you keep sticking to what’s done before, then that’s what you’ll get. More of the same. But if you indulge in your flights of fantasy, of imagining the possibilities, of trying something else, then maybe, just maybe, you’ll get something different, something awesome.

Are you ready to leave your realm of reality?

Are we becoming simpler?

Genki Takiuchi is worried about the consequences if CAPTCHAs are broken.

Our activities on the Internet is [sic] too simple to recognize ourselves as human beings. There are only click, click, click many clicks and sometimes typings. Needless to say about clicks, nowadays, even typings are easy to be imitated [sic] by using algorithms of a sort of Markov-chain.

The Markov chain algorithm mentioned refers to a process where a word is looked up in a database of words. The next word following this current word is determined by probabilities based on the language used (the common one being English). And so on and so forth, until a complete sentence is formed, which may not make sense to a human, but computers can’t really tell the difference. Then again, lorem ipsum‘s don’t make much sense too…

Imagine the irony of creating artificial intelligence complex enough to pass the Turing test, yet we are simplifying our behaviour to the point where we’re indistinguishable from infant bots.

What exactly happens during the clicking and flitting from site to site? It appears to be something commonly attributed to (though not confined to) an age group known as Generation Y (born roughly between 1980 to 1994). If you belong to this group, I’d love to hear your thoughts on this.

Because Takiuchi is concerned. So am I.

Create database user or store as table record?

Recently, someone posted a database user question on the Dream In Code forums. The gist of the question was, if you had to maintain a number of users for a web application, and each user needs an ID to log in, what’s the preferred method of doing it?

2 options were given. The first was to create an individual database ID for each user. The second was that all users use the same user ID to log in.

What I had in mind was, the database connection string. If individual database IDs were created, then when each user log in, unique connection strings are used to connect to the database. From what I know, this doesn’t scale very well, since the database throttles at a certain number of connections.

So the individual database ID case was no good. Having all users using the same ID would work. But there’s no personalisation, or you need some work to separate each user. Unless personalisation wasn’t an issue. Then there wouldn’t be any need to log in. I was a bit perplexed with the second option…

So I suggested that user IDs be stored in a database table. A database user ID is created specifically for online user log in’s. Every user has a unique ID to log in, and when logging in, the special database ID is used to form the connection string. Then the ID-password pair is used to verify against a table storing the user IDs.

Passwords would be hashed and stored in the database table. When a user logs in, the given password is hashed and compared with the one stored in the table.

This way, there’s only one unique connection string, and if I understand it correctly, it can be cached and reused, for better responsiveness.

I’ve dealt with both cases. In my work, there’s a department who handles the database. My applications are open only to internal users, and someone decided that user IDs must be controlled at the database side. And so each user has their own database ID. When logging in, the authentication process is handled by the database.

Basically I pass in a user ID and password. If a connection goes through, the user ID and password are valid.

This is sometimes infuriating, because my users are a fluid group. Some existing staff leave, or some new staff joins, and I have to ask the database department to update the list of IDs. The infuriating part is when a user asks me how to use the application and after some questioning, discover that she’s a new staff. Help desk support sometimes require me to question some of my assumptions…

The thing is, even though that department is handling the user IDs, I still have to keep a list of the IDs in a database table. The reason? User access. Certain users have rights to certain pages. The only way to control that is at the application level, not the database level.

On the other hand, I also maintain web applications where the user IDs are held in a database table. Maintaining the user list is as simple as an insert or a delete statement. There’s really only one database connection ID. This allowed me to easily scale the applications in terms of users.

I imagine the huge web sites such as the social media sites store users in a database table. I think creating thousands of database IDs is inefficient. Maybe I’m wrong. What do you think?