Thursday, July 28, 2005

Quote of the Day

When everything fails, try Patience.

The Function Pointer Tutorials

This tutorial focuses on not just Function pointers, but also on Callbacks, Functors in both C and C++. Also at the end of the tutorial there is a list of useful external links which provide additional information on this topic and also on related topics.

Wednesday, July 27, 2005

NoodleGlue - Bridging the divide between C++ and Java

What does it do ?
NoodleGlue is a system which generates the source code necessary to create Java "wrapper" files which mirror your C++ classes. The NoodleGlue generator applications create several types of source file, both Java and C++, which must be compiled along with your application. At runtime your application will use a runtime library which will be automatically loaded whenever you use one of the bridged classes.

Main Features
* Far quicker and more reliable than manually writing painful JNI code. Using NoodleGlue can save months of laborious and error prone coding - we do the tedious work for you.
* Much more complete and flexible than alternative wrapping technologies such as SWIG, and much more applicable to legacy code than GCJ.
* Almost all compatible features of C++ can be mirrored in Java, including templates, enums etc.
* References to Java objects may be passed to C++ code which can treat them exactly like a native C++ object (calling methods etc)
* C++ classes may be subclassed in Java, and used in C++ with complete flexibility - for instance a Java class may override a method of a C++ class, and the new object can be passed as a parameter to C++ code, which will use the overriding Java method.
* The inheritance hierarchy is maintained - even multiple inheritance of pure abstract classes in C++ is translated into multiple interface declarations in Java.
* Extremely low execution overhead - in most cases the code generated is much more efficient than hand generated code. There is virtually no overhead imposed upon objects above the unavoidable JNI code required when traversing from one language to the other.
* With C++ code that uses reference counting rather than manual deletion of objects (or can be adapted to do so) almost all memory management is automatic.
* Custom translation modules allow optimisations for very efficient bridging and caching of complex types.
* Optional automatic recognition of Java patterns such as "get" and "set" methods, which allows automatic enhancement of the code by adding support for Java conventions such as Property Change events etc.
* "HyperWrapping" allows additional methods to be added to the Java proxies without subclassing, and with no overhead.


An overview of NoodleGlue by Tree is also available in the July issue of CUJ.

Tuesday, July 26, 2005

Quote of the Day

As you climb the ladder of success, be sure it is leaning against the right building.

[C++] Does anybody know what a sequence point is?

Sequence Points and Expression Evaluation
Every C++ programmer should know it. However, when this question is asked even experiecned programmers with many years of hands-on experience concede they have no idea.

This article sheds some light on the secret and explain what they are and why it is important to be aware of them.

Compile-Time Computations in C++

Compile-Time Computations in C++: Novel Template Programming Techniques
A nice article on Compile-Time computations in C++ by Angelika Langer (the author of Standard C++ IOStreams and Locales - Avanced Programmer's Guide and Reference).

C++ Expression Templates: An Introduction to the Principles of Expresson Templates
This article starts off with examples of Compile-Time Computation and then moves on to Expression templates.

Friday, July 22, 2005

Quote of the Day

Being defeated is often a temporary condition, giving up is what makes it permanent.

Functional Gap vs. Bug

Today a couple of us were talking about the product we develop, and the topic of Functional Gap and Bugs was raised. A friend of mine, Santosh, gave a quick witty (but valid) remark in this regard.

It goes something like...
"Funtional gap is something which we dont promise exists but client expects.
A bug is something which we promise does not exist but the client finds it."



Wednesday, July 20, 2005

Software Engineers Aren't Doing Enough To Really Create Error-Free Software @ JDJ

The article talks about problems that occured due to a software bug, the cost of finding & fixing them. Also contains some good quotes by Edsger Dijkstra.

"Testing can only prove the presence of bugs, not their absence."

"If debugging is the process of removing bugs, then programming must be the process of putting them in."


Testing therefore is not the verification that a program works, but a search for whatever bugs can be found within the time and scope constraints of its execution. In an odd way the whole process of testing sort of vindicates the fact that programming creates malfunctioning code that needs checking and rechecking before it can be shipped.

Monday, July 18, 2005

Wanna Learn Java?

Some of the books, I found useful during the period I learnt Java (J2SE) are
  • Core Java 2 - Volume I Fundamentals
  • Core Java 2 - Volume II Advanced Features
  • Better, Faster, Lighter Java
  • Java Language Specification
For J2EE, I found the following books useful.

  • Professional Java Server Programming
  • Expert One-on-One J2EE Design and Development
  • Expert One-on-One J2EE Development w/o EJB
  • Hibernate in Action
  • JSF in Action
  • Spring in Action

I also found the Head First Series -> Head First Java book to be a decent buy. Though the approach is completely different from other technical books, I found it interesting and funny to read through the book. I also liked the other Head First Design Patterns for the same reason.

Head First Design Patterns: Though the book deals with less number of patterns than the GoF Design Patterns book, for the same reason (the presentation), it's an interesting read.

I heard the other books in the series, "Head First EJB" and "Head First JSP & Servlets" are also good (I haven't read them yet).

Note: I will provide the Amazon links to all the mentioned books later during the day.

Continuous Integration

The article written by Martin Fowler talks about reliable build process, automated build scripts, unit testing, and self testing code.

Cruise Control from ThoughWorks is a open source tool that can be used for automating continuous integration.

Quote of the Day

Do a kindness once and it will be seen as favor, do it twice and it becomes a duty.

Saturday, July 16, 2005

Groovy

Another language to look at which contains features of Python, Smalltalk, and Ruby.

From the site:
Groovy is an agile dynamic language for the Java 2 Platform that has many of the features that people like so much in languages like Python, Ruby and Smalltalk, making them available to Java developers using a Java-like syntax.

Groovy is designed to help you get things done on the Java 2 Platform in a quick, concise and fun way — Groovy brings the power of a scripting language directly into the Java 2 Platform. For example:

  • Shell scripting using Groovy allows the full power of the Java Platform to be brought to bear to the task at hand.
  • Groovy can be used (and indeed is already being used) as a replacement for Java for small and medium sized applications to execute on the Java 2 Platform.
  • Groovy can be used as an embedded language for dynamic business rules or extension points utilizing the agility of Groovy and saving the cost of redeploying applications for each change of rule (especially when the rules are stored in a database).
  • Groovy makes writing test cases for unit tests very easy.

As well as being a powerful language for scripting Java objects, Groovy can be used as an alternative compiler to javac to generate standard Java bytecode to be used by any Java project.

Quote of the Day

Happiness is nothing more than health and poor money.

Thursday, July 14, 2005

Ruby Home Page

Ruby Home Page

Another interesting scripting language that is Object Oriented. Have to try it sometime.

Dive Into Python

Dive Into Python

A nice book on the Python language and it's available for free download. The tutorial in the Python manual that comes along with the installation is also a good place to start.

Guess What? It's AFLAX after AJAX

When I am getting used to hearing the newly coined moniker AJAX, these guys come up with another - AFLAX and guess what? Flash replaces JavaScript.

Not only have these folks come up with the moniker, but also with a product that could be used to develop applications on top of this technology.

The website also compares AFLAX with AJAX.


AJAX: Asynchronous JavaScript and Xml

  • Build dynamic, rich internet applications
  • Uses JavaScript and XML
  • Connected via XML web services
  • Relatively complex programming model
  • Deploys to Dynamic HTML


AFLAX: Asynchronous Flash® and Xml

  • Build dynamic, rich internet applications
  • Use advanced development languages (C#, VB.NET, Java*)
  • User interfaces and vector graphics using XAML
  • Connected via XML web services
  • Simple programming model
  • Deploy directly to Flash®, the world’s most ubiquitous platform

* Java - sometime in 2005

"The major difference is straight-forward: use advanced programming languages with the associated tools (i.e. Visual Studio.NET) and deploy the same application to any browser, any platform, and nearly any device with a consistent look, feel, and experience."

An hour or so ago, I wrote about AJAX, Smart Clients, and about Mircosoft's new initiative Atlas, and now this seems to be much more promising than those. As a developer one has hell a lot of choices in this world.

I better stop here and go back to bed.

Microsoft Atlas

Some have started claiming that Microsoft pioneered AJAX when Outlook Web Access was introduced way back in 1998. Now Microsoft is working on Atlas, a web based framework. More info at http://weblogs.asp.net/scottgu/archive/2005/06/28/416185.aspx

AJAX - What is that?

AJAX - Asynchronous JavaScript + XML (Wikipedia defintion) is a new term coined to represent an old technique. People have used the combination of JavaScript and XML for quite some time now, since late 90's.

The term itself has become quite popular in the web development arena. The growing popurality of AJAX became visible mainly with the advent of Google's GMail, Maps, Suggest.

Server-side UI frameworks like Sun's JavaServer Faces (JSF), a component framework, can have a AJAX based front-end (JSF-AJAX). They also have examples which are JSF based implementations of auto-complete, and progress bar.

Google Code has a open source project AJAX based XSLT called AjaXSLT.

"AJAXSLT is an implementation of XSL-T in JavaScript, intended for use in fat web pages, which are nowadays referred to as AJAX applications. Because XSL-T uses XPath, it is also an implementation of XPath that can be used independently of XSL-T."

OTOH, a section of the web developer community is moving away from client-side scripting (using JavaScript) to server-side frameworks like JSF, Tapestry.

Considering the amount of hardware resource available on the client-side, and the results seen from using GMail, I believe (in general) AJAX is the way to go...

Google Code - Open Source projects

Google Code - Open source projects are mainly developed on top of the Linux platform.
core dumper, perf tools are nice tools to have if you are a C++ developer. They could come in handy during single/multi-threaded application/library development.

Folks interested in data structures & algorithms can look at or even participate in the Sparse Hashtable project.

Python folks, no need to worry as Google is filled with a lot of Python-loving (crazy) people. There is Goofy/Functional which brings functional programming aspects to Python. I have plans to become one of you soon.

There are a few more projects I haven't looked into...

Fresh Start....

This is my second attempt to create a blog of my own. The first one lasted for a day after which I forgot about it for so long, now I don't even remember what I named it. So today, I thought I will start a new one not about myself but about the technologies I work on or read about.

Let's see for how long this one lasts.