Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

Thursday, 12 June 2008

Plasma Theming - Doesn't even compare with Vista

Yes, some people have been complaining that KDE4's Plasma looks like Windows Vista. Well, complain no longer. Liquidat has posted a gallery of KDE4 Plasma themes, and boy do they look good! As you can see, you're not even restricted to single colours for the theming!

KDE4 Rocks!

Monday, 2 June 2008

How to Solve the Third Question - Google Treasure Hunt 2008

This third question had me slightly confused. As I had no knowledge of network theory, it seemed at first too big a problem. But then, when I Googled the solution, I found that others felt the same way. And really, you don't need great network knowledge to solve this problem. All you need to solve the third problem in the Google Treasure Hunt 2008 is common sense and the ability to follow instructions.

Firstly, a bit about how network routing works.

Third Question:
  • 1- Start at node S
  • 2- First, add the current network node to the path. If D is the current network node the algorithm outputs the path and ends since the packet was just delivered to D. Otherwise advance to the next step.
  • 3- Iterate each routing table entry:
  • 4- D matches the Nth entry's network? Set the current node as the Nth entry's target gateway and Jump to step 2
  • 5- D does *not* match any of the routing table entries? Set the current node as the current default gateway and Jump to step 2
So what does this actually mean? Basically, given the starting node, look for the destination IP address in the three Routing Table Entries. If it's there, follow on to the IP address specified in that table entry. Otherwise, follow on to the default gateway. Repeat this process until you come to the destination node. It's that simple!

This doesn't even need a program to calculate it. I performed these operations by hand, and it only took about 10 minutes. I'm still waiting on the answer, but I'm fairly confident that it's correct. If you want a spoiler for the default question, click here. The next question's coming out June 3rd (tomorrow) so you'd better hurry if you want to answer this!

By the way, if you're puzzling over those "/24"s, check out Route summarization on Wikipedia.

The Treasure hunt has been a great opportunity so far for the geeks of the world to get creative with some problem solving. I've enjoyed it, as I'm sure many others have. Hopefully Google will continue to promote these "fun" activites, as they get the developer community active and give Google a good image in so far as community involvement goes. Thanks Google!

Update: My answer was correct! :D

Wednesday, 21 May 2008

Google Treasure Hunt - How to solve the second problem

Warning: spoilers contained within!
How to Solve the Second question in the Google Treasure Hunt 2008
(
question: 2 sums from 10202160872969032313.zip: line 4 in *BCD*.xml, line 2 in *def*.js)
Unlike the previous question (the robot on grid), I was able to solve the second question without too much difficulty. After about 20 minutes spent looking up bash manuals online, I came up with the following script:

#!/bin/bash
for file in $(find . -maxdepth 999 -path '*BCD*' -or -name '*BCD*' | grep ".xml")
do
tail +4 $file | head -1
done
echo "----"
for file in $(find . -maxdepth 999 -path '*def*' -or -name '*def*' | grep ".js")
do
tail +2 $file | head -1
done

This script basically uses the linux utility "find" coupled with "grep" to locate all files matching the pattern specified. Then, for each file, I piped the contents through "tail" and "head" to obtain the desired line, which is printed to the standard output.

The sharp-eyed among you might have noticed that this script doesn't actually calculate the sum of all the lines, or multiply these sums together. This is because I actually used the lazy-man's calculator, Google, to complete this part of the problem. Simply copy and paste the command line output from this script into Google, insert "+" symbols between each number, and multiply the two outputs using the same method.

I know this code is "spaghetti" code, but I'm too lazy to fix it up. Please post a comment if you're enough of a nerd to format this in intelligible code.

Now, to wait for the next one...... :)

Tuesday, 8 April 2008

Google AppEngine

What is Google AppEngine?
How to get a Google AppEngine Account
Google AppEngine Accounts giveaways
Free Google AppEngine Account

Account details: username and password for a Google AppEngine Account

Date and Time of Google AppEngine release account register

Do these words make you excited? They do for me. Here's why.

Google just launched a new service, Google AppEngine. Google App Engine lets you run your web applications on Google's infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it's ready to serve your users.
Here is the official announcement:

Today we’re announcing a preview release of Google App Engine, an application-hosting tool that developers can use to build scalable web apps on top of Google’s infrastructure. The goal is to make it easier for web developers to build and scale applications, instead of focusing on system administration and maintenance.

Leveraging Google App Engine, developers can:

  • Write code once and deploy. Provisioning and configuring multiple machines for web serving and data storage can be expensive and time consuming. Google App Engine makes it easier to deploy web applications by dynamically providing computing resources as they are needed. Developers write the code, and Google App Engine takes care of the rest.
  • Absorb spikes in traffic. When a web app surges in popularity, the sudden increase in traffic can be overwhelming for applications of all sizes, from startups to large companies that find themselves rearchitecting their databases and entire systems several times a year. With automatic replication and load balancing, Google App Engine makes it easier to scale from one user to one million by taking advantage of Bigtable and other components of Google’s scalable infrastructure.
  • Easily integrate with other Google services. It’s unnecessary and inefficient for developers to write components like authentication and e-mail from scratch for each new application. Developers using Google App Engine can make use of built-in components and Google’s broader library of APIs that provide plug-and-play functionality for simple but important features.
I'm still waiting - it's apparently not release time in America yet, so I've been put on the waiting list. I can't believe that 10K accounts have gone in such a short time, so I'll still hope that it's not release time yet!

Sunday, 9 March 2008

Microsoft Visual Studio 2008: First Impressions

Well, I tried out VS 9 today. Microsoft just released this new tool, with over 250 new features including inline SQL queries. But I didn't have a very good first impression: it crashed upon creating a WPF project! I'm running it on Vista, so there really shouldn't be any reason. Well, back to my comfortable MonoDevelop!