Sunday, December 30, 2007

Battle of Wesnoth

Been on the lookout for a free turn based strategy game and chanced upon the Battle of Wesnoth. Despite it being an open source game (meaning, you get the source), it was incredibly polished akin to any of the other turn based strategy game (Alpha Centauri), be it the background score or the graphics or the tutorials.

The game itself is set in a period similar to the D&D or nethack era. For the film buffs, if you have read or seen the Lord of the Rings, you would probably be able to relate to the clans that populate the game world.

The game play, as with any turn based strategy game requires background information on each of the units that you own, their strengths and weaknesses and a lot of planning (a kin to chess, but with a lot more parameters) where factors like day - night cycles are taken into account (e.g, humans fight well during the day, but the orcs are better during the night).

It is encouraged to keep your older units as they gain experience and become more valuable as compared to an RTS (Real-Time Strategy) game where you will be constantly manufacturing new units and would not care about your older units as the newer one are more advanced (due to technological breakthroughs).

Overall, I am pretty impressed with this OSS game and would definitely recommend you give it a try.

Friday, November 23, 2007

Call me an old timer
With new fangled ASP.NET, high end IDEs, wizards and code generators, the learning curve is high compared to the older times where a simple web based application can be created in a matter of minutes with PHP and MySQL.

VS2005 takes web development to a new paradigm, where you follow the model of a regular GUI application development. You add event handers to the various 'controls' in your ASP.NET project. It is usually not very visible on what happens then. Some times, your validation logic that you had attached executes on the client side, and sometimes on the sever side based on the browser capabilities. This results in complication.

At-least this is what I gather on my first attempt to learn ASP.NET. This is in addition to evaluating Ruby on rails, PHP, Perl from which I will be deciding on one to suite my needs.

How I wish for the older days where a plain old server side script just simply executed on only the, well, server!

Friday, November 09, 2007

Going forward...

Happy Diwali to anyone who has managed to reach this site!

With this being a long weekend, by next novel that I recently read was NEXT by Michael Crichton, based on the new advances that are being made in the world of genetic engineering and the implications of their effects in the social world. Good read which changes the perspective of the darker side of generic engineering in the ever changing world.

Tuesday, September 04, 2007

The time machine
Managed to get a copy of the King Solomon's Mines by Henry Rider Haggard. The book was originally published at 1855, more than 150 years since I am reading it. I'm sure that it would transport me back in time revealing how people lived and the problems that they faced.

Of course, you can get the text in an electronic form from the Project Gutenberg for free, but I prefer the traditional form of reading where you can 'shutdown' any time and 'restore' in a jiffy.

The other book that I have in reserve is The Journey to the Center of the Earth by Jules Verne (1864).

There are so many classics that you can get access to for free if you do not mind staring at your display or PDA. But don't miss them out.

Monday, August 27, 2007

MaxMileage

Been some time since I've posted. Had been busy reading the final volume of the Harry Potter series which I managed to acquire on the day of the release at the Central Railway station.

Putting things aside, I had also managed to learn a little bit of DotNet programming and created a simple project @ SourceForge. With my interest in fuel economy, I had created a simple application to keep track of your progress and view the data as charts. It's not a complete application yet! I know a few hundred similar apps exists, but this I felt was more apt for my needs and I get a chance to program too.

Thursday, July 26, 2007

XEmacs - Still resisting the dark side

The other day, I had been contemplating changing to a fancier text editor.

Though I do little programming now, I still find a need for a programmer's editor as I will be frequently writing simple scripts or processing csv files created by Microsoft Excel or log files.

The other editor that I am familiar with is JEdit, which I had used for a brief period and have even contributed a macro. It had a good GUI, syntax highlighting for numerous programming languages and scripts, searching capability, plugin support, extensibility and so on. But, the one point it faltered was on the memory usage side. Just opening the editor took away a good 40MB of my scarce RAM. I guess it needed the memory to display those fancy icons and GUI controls.

XEmacs in comparison, ends up using less than 10MB and is way faster too.

Some indispensable commands

Over the course of time, I have started relying on a few commands, so useful that I use them almost daily. Your editor may have similar capabilities or you can hack them up on your own.

Smart Macros

XEmacs supports recording temporary macros. One technique that I use is, if I need to process a line, I record the activity. But in addition, I also record the key strokes that I use to get to the next line. This allows me to run the macro multiple times without manually placing the cursor on the next line.

The commands that I use for recording macros in XEmacs are start-kbd-macro and end-kbd-macro.

This technique in conjunction with XEmacs to add an universal-argument (repeat count) allows me to process text files in a jiffy.

Regular Expressions

Regular expressions are the most useful feature used to search and replace text. Two features that I use most are keep-lines and flush-lines. Both take a regular expression and keeps or filters out matching lines in the buffer or a selected region. This is particularly useful when you are processing CSV files or logs to quickly glean out useful text and remove the unwanted.

Most of the editors that sport good UIs may support some of the capability, but loose out on one of the most needed capability: The ability to quickly start and use less RAM. And that's why I still stick with (X)Emacs.

Wednesday, June 27, 2007

XEmacs init.el

It's been almost eleven years since when I was introduced to GNU EMACS. It came in as a DOS based editor which failed to load files that were over 640k. This was followed by DPMI support which provided flaky support to open files larger than than and unreliable under Windows 3.1. I then migrated to GNU EMACS on win32 and finally settled down with XEmacs on XP.

Over the years, my (X)EMACS config file has and still undergoing changes and here is the latest configuration that I maintain.

Note: I am not a lisp hacker, but have basically accumulated a list of handy configuration options and snippets that were indispensable during the course of my programming career.


;;
;; Shoban's XEmacs init.el
;;

;; ----------------------------------------------------------------------
;; load paths

;(pushnew "~/.xemacs/xemacs-packages/dmacro" load-path :test 'equal)
(pushnew "~/.xemacs/xemacs-packages" load-path :test 'equal)

(setq Info-directory-list
'("c:/Program Files/XEmacs/XEmacs-21.4.13/info/"))

;; ----------------------------------------------------------------------
;; Default frame size

(set-frame-height (selected-frame) 40)
(set-frame-width (selected-frame) 90)
(set-frame-position (selected-frame) 5 5)

;; ----------------------------------------------------------------------
;; remove of the unused toolbar icons

(set-specifier default-toolbar-visible-p nil)
(set-specifier bottom-toolbar-visible-p nil)
(set-specifier left-toolbar-visible-p nil)
(set-specifier right-toolbar-visible-p nil)
(set-specifier top-toolbar-visible-p nil)

;; ----------------------------------------------------------------------
;; Font lock mode

(require 'font-lock)

(set-face-font 'default "Courier New:Regular:10")
(set-face-font 'font-lock-keyword-face "Courier New:Bold:10")
(set-face-font 'font-lock-type-face "Courier New:Bold:10")

;; ----------------------------------------------------------------------
;; Color themes

;(require 'color-theme)
;(color-theme-deep-blue)

;; ----------------------------------------------------------------------
;; Set source code indenting rules

(defun my-c-mode-hook()
(c-set-style "stroustrup")
(c-set-offset 'case-label '+) ; The case labels will be indented
(c-set-offset 'inline-open '0) ; C++ - no indent for access specifiers
(setq indent-tabs-mode nil)
(setq tab-width 4) ; tabs are 4 spaces wide
(setq c-basic-offset 4) ; Indentation set to 4 spaces
(c-toggle-hungry-state t) ; Backspacing deletes all spaces before
(define-key c-mode-base-map "\C-m" 'c-context-line-break)
)

(add-hook 'c-mode-common-hook 'my-c-mode-hook)

;(setq cperl-indent-level 4)

;; ----------------------------------------------------------------------
;; Load VB mode

(autoload 'visual-basic-mode "visual-basic-mode" "Visual Basic mode." t)
(setq auto-mode-alist (append '(("\\.\\(frm\\|bas\\|cls\\|ctl\\)$" .
visual-basic-mode)) auto-mode-alist))
(add-hook 'visual-basic-mode-hook 'turn-on-font-lock)

;(autoload 'vb-mode "vb-mode" "Visual Basic Editing Mode" t)
;(setq auto-mode-alist
; (append '(("\\.\\(cls\\|bas\\|frm\\|ctl\\|vbs\\|mst\\)\\'" . vb-mode))
; auto-mode-alist))
;(add-hook 'vb-mode-hook 'turn-on-font-lock)

;; ----------------------------------------------------------------------
;; C# mode

(autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t)
(setq auto-mode-alist
(append '(("\\.cs$" . csharp-mode)) auto-mode-alist))


;; ----------------------------------------------------------------------
;; dmacro

;(require 'dmacro)

;(dmacro-load "~/dmacro/shoban.dm")

;(setq auto-dmacro-alist (cons '("\\.h$" . dot-h) auto-dmacro-alist))
;(setq auto-dmacro-alist (cons '("\\.h[px][px]$" . dot-h) auto-dmacro-alist))
;(setq auto-dmacro-alist (cons '("\\.c$" . masthead) auto-dmacro-alist))
;(setq auto-dmacro-alist (cons '("\\.c[px][px]$" . masthead) auto-dmacro-alist))

;; ----------------------------------------------------------------------
;; EMACS Code browser

;(ecb-activate) ; Comment out this line if you do not need ECB loaded

;; ----------------------------------------------------------------------
;; Abbrevs

(setq abbrev-file-name "~/.xemacs/.abbrevs") ;; definitions from...
(quietly-read-abbrev-file)
(abbrev-mode 1)

;; ----------------------------------------------------------------------
;; Spell check

(setq-default ispell-program-name "e:\\utils\\Aspell\\aspell.exe")

;; ----------------------------------------------------------------------
;; Misc commands

;(clearcase-install)

(line-number-mode 1)

(require 'generic-extras)

;(savehist-load)

(require 'saveplace)
(setq-default save-place t)

(iswitchb-default-keybindings)

(require 'redo)

(require 'func-menu)
(add-hook 'find-file-hooks 'fume-add-menubar-entry)

(paren-set-mode 'paren)

;; ----------------------------------------------------------------------
;; Calendar - week

(require 'calendar)

(defun calendar-week-number (date)
"Return the week number for DATE.
The week starts on MONDAY."
(let* ((year (extract-calendar-year date))
(day-number (calendar-day-number date))
(day-of-week-first-day (calendar-day-of-week (list 1 1 year)))
(adjust))
(when (eq 0 day-of-week-first-day)
(setq day-of-week-first-day 7))
(setq adjust (% (- 9 day-of-week-first-day) 8))
(if (<>

(if (eq (console-type) 'mswindows)
(set-default-file-coding-system (get-coding-system 'undecided-dos))
)

Monday, June 11, 2007

del.icio.us

A social bookmarking site which popularized tagging, where you assign keywords against bookmarks so that you can later retrieve them by the same keywords you are searching for. A dynamic bookmarking site where I maintain most of my favorite URLs
Hypermilers...

One of my earlier post glanced upon the techniques to achieve better fuel economy while driving. And I chanced to stumble upon an article that has expert advise and a group obsessed with saving fuel.

Some of their techniques match mine, but most seems specific to highway driving and/or driving a hybrid. But with a little effort, these can be applied to city-driving too and you may be able to reap some benefits while driving through the traffic laden routes at Chennai!

A point to note: Safety comes first, fuel economy next.

In the mean time, I am trying to layout a traffic simulation application, where you can try out different kinds on signals (the regular contdown style, more intelligent ones that can sense the traffic buildup) and to find the right timing and location to ensure your car / bike keeps running. Will post the architecture / design of this system when it is done...

Friday, June 01, 2007

Helmet and seat-belt mandated at TN

Today morning, I was pleasantly surprised to see most bikers (along with pillion riders) traveling with their helmets on as TN geared itself from the 1st of June to make it mandatory to wear helmets for bikers and seat belts (for the front seat passengers) for car commuters.

The FM radio RJs had been conducting on-the-road commentaries, catching helmet-less riders seeking justification on why they had not yet acquired one (the helmet) yet. The shamed few who got caught eventually were presented with a helmet.

One the way (near Tirumangalam), I couldn't help notice people flocking near put-up helmet shops on the sidewalks, trying to acquire the license to ride a bike!

Let's hope the momentum carries on...

Wednesday, April 25, 2007

Of Hollywood, frameworks, APIs and inversion of control

I recently chanced to learn about a pattern called the 'Inversion of Control'. This is primarily used to abstract out the creational part of dependent components from a class is question. In simple terms, a class need not create dependent objects. This independence of the creational logic allows such classes to be more loosely coupled to dependent objects, thus resulting in easy replacement of the dependent objects during run-time. This technique is used by unit-tests to isolate a particular class from its dependencies so that the class / object in question can be tested alone.

We usually resort to using creational patterns like the singleton or the factories to decouple the creator from the logic of creation. What we essentially do is, we just add one more level of indirection to the actual creation logic. Earlier, we used to manually use new to create an object. With the singleton, our class uses the singleton, which in turn hosts the construction logic. In essence, the dependency is still there, separate by an additional layer of code.

If we truly wanted to remove the dependency, then delegate the dependency logic to the parent or the caller. A way to do this is simply pass the object to depend upon via the constructor or via a setter. The parent or the caller now has the responsibility to create the dependent object and associate it to our object in question during run-time. This technique is useful where unit-tests can instate our class and pass on mock dependent objects to test the class / component in question in isolation.

To sum up, the control for creation is inverted, from the class in question to the parent or caller.

Of frameworks and API then?

One key differentiator between a framework and an API is, your class or object or application calls the API when needed (e.g Win32 API, STL, Bost++ etc). You have the control. Frameworks work the other way round. The framework is the application and your code fills in the missing pieces. The framework calls your routines. The framework has the control to call your code when it needs (OWL, MFC etc). The framework has the control. Moving the control from your class to an external entity is called the inversion of control.

What of Hollywood?

"Don't call us; we'll call you" - the standard line most of the promising artists would have heard, and the same applies to software too, where inversion of control is marked as a synonym to the Hollywood principle.

Is it good then?

With the promising trend on unit testing and its benefits, it definitely looks like inversion of control is a good investment when developing your code so that your developers can develop unit-tests to quickly tests your classes.

Friday, March 23, 2007

Learnings on software development

http://www.taylor.se/reddit.html and Digg posted an article on the learnings from ten years of software development.

May I add:

2. The difficult part of software development is communication

Primarily, this boils down to both verbal and written communication. Both are used at different combinations at different scenarios. When you are discussing features or effort or schedule with your customer, it makes sense if these are written as it allows you to archive the information and refer to it at a later point of time. Who knows, six months down the lane, it would be you who would be scrambling down your e-mail chain trying to figure out why a feature has to be implemented the way it is.

Even if you have a verbal discussion, it is a good idea to follow up with the minutes or a gist along with a set of action items.

On the other hand, when it comes to appraisals, evaluation or goal setting sessions, it is primarily verbal communication followed with the action items.

3. Learn to say no

Timeliness is also an important factor. One of the fundamental mistakes that I did during my early stint of project management was accepting insane deadlines. Event if you did and later find getting it done an impossibility, let the customer or client know early on that you are having problems. Your clients will be more understanding if they get to know the problems early against the last minute and will be able to make amendments like dropping a few lower priority features or diverting more resources to move some activities off the critical path. The best advice is to simply so no in the first place or ask for re-prioritization.

9. It all comes down to working software

To create workable software, it does not merely take technical skills to accomplish the objective. You are also required to have adequate domain knowledge to understand and query your customers to make decisions.

Take the time to learn about the domain, the application and how your customer envision to use your application.

Few other things that I found useful:

# Get your team's buy-in

When you make up a schedule, before sharing the milestones with your customer, ensure that your team buys in the schedule.

# Share a common goal

When working with multiple functions (like QA, testing, development and so on), ensure that the common goal is communicated and all are in adherence to them. For example, the delivery goal will be to ensure the product is shipped with the promised features on time and matches the quality requirements. Teams should focus on amicably resolving issues rather than create problems and make things difficult within.

In addition, as already indicated, the team will have to ensure that the features that are developed will actually benefit and is usable by the customer. That would require the domain skills to play in.

Monday, March 19, 2007

Just googling about!

It was search at first, and followed be web-mail with extra-ordinary storage. Then came the google blogger and now picasa, to show your photography skills online. So, checkout what I have now...

Monday, March 05, 2007

Dot Net development the free way

There is a new trend catching up... More mainstream application targeted towards the x86-architecture tend to move towards the Dot Net platform as compared to Java since a few years back. With majority of the users holding their roots to Windows, Dot Net seems to be better in terms of performance as well as integration with the OS.

That's why I decided to learn Dot Net programming. With learning to programming using the Dot Net framework, comes the question of getting a compiler, editor or an IDE.

Microsoft has provided the framework SDK for free for anyone to install. But unfortunately this comes along with command-line tools like the raw compiler or the console based debugger. Agreed, Visual Studio 2005 is there. But, it does not justify the cost to just learn a new programming model.

The alternatives?

A few exists. SharpDevelop, an open source IDE is available for those who are interested in a true blue open sourced IDE. But it has many kinks the last time I checked. Being an OSS product, it is under constant development. So I decided to lay it to rest for some time until the product is mature and / or has most of the features I require.

In the mean time, Microsoft has also announced Visual Studio Express 2005 which is available for download here. It is technically free, but requires you to register with Passport and MS may collect some information on the usage of the tool to enhance the user experience in future editions.

Read here for a comparison of SharpDevelop and VS Express. Both match each other feature wise, where SharpDevelop seems to have an edge on simplifying programming (like plug-in support, language conversion etc) where as VS leans towards database support and integration.

VS Express

I chose to install the C# version (separate downloadables are available for ASP.NET, J#, VB.NET and event C++.NET). You can choose to include the MSDN documentation, SQL Server Express Edition and the Dot Net 2 Runtime if not already installed.

After a couple of hours of downloading, I had the development environment set up on my laptop and was able to develop simple applications.

A nice benefit of using VS Express is, you also get a few 3rd party controls that you can start using in your applications. Those include a spreadsheet control, a ribbon-bar control like those you see in Office 2007, a charting control and more. There are commercial products which are given away for free with VS Express. Indeed, a great way to start development!

Going forward...

So, what am I going to do with VS Express? I have a few ideas to implement, starting with:

A simple mileage calculator - which would help you record your vehicle's performance and draw charts on how your monthly burn rate. It would relay on a simple serializable data model or standard CSV format which will eventually be migrated to SQL Server express as the data becomes huge.

A kid's CBT framework - I used to find GCompris (http://www.ofset.org/gcompris) useful when I am in the Linux environment. Unfortunately, lack of documentation to create new activities that are relevant to my kid's current educational needs is not available. Further, I have to learn GTK programming.

I heard and read that Dot Net has very good GDI+ support which would allow creating a simple framework that can be controlled by editing simple XML scripts rather than get into the build and release cycle of normal programming. That would help in releasing a simple test module quickly during the exam cycle or a small game to satisfy my kid's needs.

Microsoft has recently provided the XNA Game development framework for Visual Studio Express users. It is a DotNet wrapper for game development that can deploy games for Windows XP as well as the XBox 360 using the same codebase.

UML modeler - There are no good free tools that does diagrams well as compared to Rational (IBM) Rose. I had tried out ArgoUML (http://argouml.tigris.org/) which is plagued with UI issues and Umbrello (http://uml.sourceforge.net), the KDE based modeler that does not have a lot of support for some of the diagrams. I had always been fascinated with Visio and other diagramming tools and would be implementing a framework based on that to allow for UML and the Rational Unified Process.

A traffic simulator - I am always unhappy the way the traffic signals operate. Most of the time, I see the signals taking too long or short on some roads at Chennai. The signals at Anna Salai proclaim that they use synchronizing technology, but I still fail to see any difference. The movement you start from an intersection, and reach the next, the red shows up. Based on the estimated speed on the lane, shouldn't the next signal switch to green when we arrive? A simulator could simulate traffic patterns on all major roads so as to find the optimal wait time before it changes to green.

Expect to see the sources at SourceForge soon!

Conclusion

Overall, a great way to program DotNet application. But don’t expect to use the same from work as you would be expected to purchase the full blown VS 2005 and you would not not want to send your sources or at least portions of it to Microsoft as part of their data-collection activity.

Friday, February 16, 2007

Beyond STL

The Standard Template Library has made its way into the standards, being shipped as an indispensable object oriented core low-level library. Known to most C++ developers fondly as the STL, it provides standard object oriented reusable components that allow developers to focus on the problem in hand rather than think in terms of storing, retrieving and sorting data-structures.

The most common classes that you might have encountered would be the string, the vector and the list. There is more than just these in STL and plenty of books and articles have been devoted to the innards of STL and how to use them effectively.

STL liberates the developers from constructing custom linked lists and hash tables by using templates thereby aiding them in focusing at more higher level goals of the software.

My aim in the article is to focus at the next level of software development. Though not focused at topics like architecture and design patterns, we will be looking at a public domain C++ library, partially built on STL. The library is called Boost++.

Boost++ (http://www.boost.org)

Boost++ is a C++ library that contains within itself, a set of useful components that makes common developer tasks much easier. Boost++ is public domain. It means that it can be used in both commercial and non-commercial projects without need to submit the sources or display copyright information in your application .

Boost complements the STL by providing utility classes to aid the developers to bridge the gap to the next level of software components. These utility classes are organized into various categories like ‘text manipulation’, ‘math’, ‘memory management’ etc.

Though it is not possible to do justice to this library in just a few pages of text, I will focus on just a few useful classes that I’ve used and leave the rest to the inquisitive explorer.

Memory Management: Smart Pointers

With the birth of new object oriented programming languages like C#, Java and Python, the focus has mainly been to free the developers from pointer nuances and custom memory management. C++ still lacks garbage collection and reference counting by giving more control to the developers. However, more control means more responsibility and failing to handle such power may leave you with a few dangling pointers and leaked memory chunks.

Consider the code snippet:


void foo()
{
char *ptr = new int;
if(some_cond)
{
*ptr = 10;
// do something with ptr

return; // Oops! I failed to free ptr
}

delete [] ptr;
}


Not limited to just conditional branches, the same result could be obtained with code that throws exceptions. These kinds of code crops in unnoticed and become difficult to detect. After all, to err is human…

Boost++ solves this problem by providing type-safe classes to do the memory de-allocation for you.

Agreed that there are a few components like Microsoft’s ATL auto_ptr and others. However, most components that I’ve found tightly embrace their parent architecture, which makes it less portable. Boost on the other hand is not build for any specific architecture. Boost is a set of components that can be applied to any kind of architecture. Currently, Boost supports Microsoft’s Visual C++ (6 and 7), GCC, Borland’s C++ tools and more.

Boost++ comes with not just one memory management class, but five to suite the developers needs.

Here is a sample code that uses Boost++


void foo()
{
boost::scoped_ptr ptr(new int);

if(some_cond)
{
*ptr = 10;
// do something with ptr

return;
}
}


Simple eh? Not only does this improves the readability of the code, but also prevents unintentional errors from cropping up.

String and text processing:

Using regular expressions to validate input data

With any GUI application, developers are faced with writing lots of validation logic to validate data typed by the users. Typically, this would consists of a lot of calls to ‘strchr’ and ‘strtok’ to see if the data entered by the user falls into a specific pattern and to extract the data typed by the user excluding the white-spaces.

A easier way to see if the data conforms with a specific pattern is to use regular expressions. Any developer using an advanced editor or search tools will be familiar with regular expressions.


bool validate(const string& data)
{
// pattern for a data (dd/mm/yyyy)
static boost::regex regex("[0-9]{2}/[0-9]{2}/[0-9]{4}");

if(regex_match(data, regex))
return true;

return false;
}


The code snippet above checks to see if the data entered by the user conforms to the pattern of the ‘dd/mm/yyyy’ format. The same can be done for credit-card numbers, phone numbers and more.

Well, that's not over yet. A slew of more features and capabilities provided by Boost++ awaits future reviews...

As the popular saying goes, Boost++ is the secret of (my|our) energy!

Saturday, February 10, 2007

Yahoo! Pipes – News nuggets served piping hot

A news feed aggregator recently released by Yahoo is not just an aggregator. It allows users to configure your various news feeds, consolidate them, filter them by specific keywords, cull out redundant news items and present a single feed. Not much? They provide basic building blocks to perform all these operations and allow users to program by plug in the blocks very much like Lego in a graphical manner! Check out http://pipes.yahoo.com to create your own.

Yahoo Pipes is named after the Unix Pipes where the output of one application is 'piped' to another application for further processing.

A simple consolidator for a few sites that I frequent is here

Tuesday, February 06, 2007

Space sims / shooters and true 3D

Recently, I had a craving for space sims and shooters and a tendency to blast off a few aliens. As the system I own is no gaming rig, I look for older games that are cheaper or requirements and on the purse as well. Nowadays, most publishers are keener in releasing games that fall into the FPS or MMORPG categories.

After rummaging through the bargain bins at Landmark, I acquired Freelancer, a space shooter from Microsoft. You play a freelancer who takes odd jobs, make money so that you can retrofit your ship or weapons. One key differentiator of Freelancer is its open-endedness. Though the game features a central theme and a plot, the player is free to do whatever he / she chooses, like accepting odd jobs that are randomly generated, thus enhancing the playability.

An oddity of Freelancer and most space shooters are, though the action takes place in deep space, all items and objects of interest are located in the same plane.

Compare this to Homeworld, a 3D RTS (real-time strategy) game, and you are in a completely different league altogether. All the three axis’s are put to full use and the freedom disorients you. This one as most RTS goes gives you a fleet to manage over and during the course of an epic battle, you instruct your fleet to perform various maneuvers like attacking, refueling or salvaging in true 3D.

It looks like the market for space sims seems to be down the past few years, with no new major titles being released. The current game on the download queue (hint: BSNL has upped it’s bandwidth to 2MBPS shared) is the grand-daddy of all space shooters, Decent Freespace 2. The game was finally open-sourced giving access to all the code-base for you to tweak and enhance.

Wednesday, January 31, 2007

Is the future the web OS?

With more capable and feature complete browsers, it becomes easy to develop newer things that were never imagined before. To the extent of building an operating system using Flash or AJAX.

Quite a few have cropped up recently. Check out http://en.wikipedia.org/wiki/Web_desktop for a list of in-development WebOSes.

So, what do I get out of a web OS?

Location independence, information is stored in a central location can can be accessed over the web from anywhere.

This is very much down the drain if you own a portable device or computer as you have all the info you need. But, there are instances where you may not be allowed to carry your portables, where as you might have access to the Internet where you can quickly pull out
the information you need.

This could be an advantage as well as a dis-advantage, the latter being, a single point of failure render non-availability / loss / leakage of your documents. But, some OSes do allow you to save your data locally as well.

Platform independence, indifference to the browsers host. It does not matter anymore if you are running Linux or Windows or the OSX. You are also freed from the nuances specific to the operating systems.

Swing did this for Java, but comes with a huge baggage (not much according to current standards) of installing the run-time on all machines to run your application.

The downside is, you have to learn to use a new OS that implements the most common features of all operating systems and introduce a few quirks or features that is unique.

Desktop persistence, where your desktop looks the same irrespective of the machine you access them from. It is the same from where you left off...

Some OSes even come out with an SDK to let the community develop new applications.

So what do web OSes in general lack:

Performance - or lack thereof. Most of implemented on top of scripting languages and are suited for business applications. Do not expect to see full fledged image editors or 3D games out of these.

Security - Some one else is managing your data. A slip would end up in loosing some or all of your data.

Reliance on connectivity - Downtime would deny access to your data.

Application range - The other day, I was looking for an application that draws the sky-chart based on your locale. Can you find such an application for a WebOS? Most of the application are
stripped down to the bare essentials as it would prove too costly to download each app over the net every time.

So, if you are looking for performance, security, alternative applications and would probably be disconnected from the net, then the WebOS is not for you. On the other hand, if you are on the move, do not have a portable device or restrict to the less esoteric features of an application, it may come in handy.

http://en.wikipedia.org/wiki/Web_operating_system provides a brief overview of what a Web OS is.

Tuesday, January 30, 2007

Paradigm shift while driving...

While the preference for most while going for a car is towards performance and economy, most stop after their purchase and do not follow up in honing their skills to practice safe and economical driving...

Most reviews of automobiles state the raw power and how fast the vehicle can go. Granted, a speed of 175+kmph is high for Indian roads, I do not see anyone doing this during their normal day-to-day ride which would represent more than 98% of us, commuters.

The recent Ford Fiesta Max Marathon drive had helped in changing the way people drive their cars. This is a different race, not focused on speed and time, but on economy and mileage.

A few do's and dont's that worked out for me:

  • Plan to use the brakes less. Fuel is spent in keeping the vehicle running. Brakes reduces the efficiency by introducing friction and thus limiting the speed.

    Which means that you start planning ahead to avoid the brake.

    You then tend to leave ample space between your and the vehicle in front.

    You also start driving slower so that in case the vehicle in front slows down, you will be able to slowdown gradually. Hopefully, if the vehicle picks up by the time you reach it, you save the fuel consumed by braking.

    You would also tend to maintain the speed constant

    Keep a brake-avoidance count and try to break your high score.

    Note: Not using the brake does not literally mean you should not use it at all. Remember, safety comes first before economy.

  • Do not press the clutch while driving - The clutch disengages the engine from the wheel. So, if you press the clutch fully or partially, the power generated from the engine is not fully utilized by the wheels and is wasted.

  • Do not accelerate while changing gears - As stated above, the clutch will disengage the engine during the gear change. Pressing the accelerator makes the engine go faster, but the power that is generated is not utilized.

  • Maintain correct tire pressure - Ensure that your tires have adequate pressure. Fill in during the mornings and evenings. Afternoons tend to show higher readings.
It is irrelevant how fast you can go. If makes more sense to see how long you have gone and contributed to a more environmentally friendlier place to live.

Go the distance!