Thursday, July 28, 2005
The Function Pointer Tutorials
Wednesday, July 27, 2005
NoodleGlue - Bridging the divide between C++ and Java
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
[C++] Does anybody know what a sequence point is?
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++
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
Functional Gap vs. Bug
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
"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?
- Core Java 2 - Volume I Fundamentals
- Core Java 2 - Volume II Advanced Features
- Better, Faster, Lighter Java
- Java Language Specification
- 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
Cruise Control from ThoughWorks is a open source tool that can be used for automating continuous integration.
Quote of the Day
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.
Thursday, July 14, 2005
Ruby Home Page
Another interesting scripting language that is Object Oriented. Have to try it sometime.
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
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
| AFLAX: Asynchronous Flash® and Xml
|
"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
AJAX - What is that?
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
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....
Let's see for how long this one lasts.