Sunday, April 10, 2005

Re: More on Mono

Firstly, seems like I struck a nerve. Seriously didn't mean to offend.

Everything you said is valid. No doubt. I was just trying to say that it really seems like things tend to become quite complicated. As you said UML is a recognized standard for communicating but it isn't required in every situation. UML is something that has come up with OOP. What about developers not using OOP? Correct me if I'm wrong, but most Linux/open source projects are still done in lower level, non-OO languages, primarily C. Many of these projects are quite huge and the ideas need to get across to many developers. How are they able to do it?

I have not downloaded or worked on any open source projects, even ones based on .NET or Java at places like sourceforge.net, but I wouldn't be surprised if there were no UML diagrams available with the source at these places. I suppose there are tools that will generate these diagrams automatically for you from source. VS .NET 2005 has this capability. I believe there are plug-ins for Eclipse also.

And what about Scripting. I've mentioned over a few posts about its gaining popularity. They are shedding their "toy" status and are being used in larger projects too. A lot of them are OO oriented, but not in the strict sense as in Java and .NET. So again, I wouldn't think UML is very popular in those communities.

I probably threw one too many things in the same boat by including Design Patterns in my dumb rant. I have'nt read the book you mentioned. I should, before saying more. I've primarily referred to this site. It seems to have most, if not all, the major ones listed. As an interesting point, I feel design patterns will be added into languages. For example, the Observer pattern is already a built in component of .NET with Delegates and Events. The next version will include a way to create a "static" class, wherein you can't create an instance of it - i.e. Singleton. If you think about it even getters/setters are in a way design patterns and they are built into .NET languages.

I'm digressing quite a bit, but this is just an example of what I'm talking about. I know I'm taking it out of context... I'm only talking small projects. But can't help but think that the trend is towards more complexity even though things like XP are trying to put up some resistance.

As an aside, dyou understand how open source projects work? How are so many people able to work on a project "unsupervised" as it were? Somehow it's just hard to imagine.

Personally I am very skeptical of Mono being used widely.

I'm assuming this is because of it being tied to .NET. Do you feel Linux guys will always reject it because of the "connection" to MS, even though it might be something useful?

Saturday, April 09, 2005

Re: More on Mono


One of the questions in the interview was about the development process behind Mono. He gives a really good answer about not being a great fan of UML and strict development processes. They are all great hackers and just want to do it because they are having fun... enjoying it. Strict dev practices etc... limit creativity and the "art" of programming.

What dyou think of his answer? I want to learn good practices about developing software because right now we all lack any substantial experience with it. But at the same time, I read about UML, design patterns, agile development, "some new hyped up buzzword" etc... and it all just seems so "messy" or tends to complicate matters. Same feeling I have with some Java developments. I've mentioned them before. It feels a lot of over engineering.


UML is a diagrammic notation to express Software design at various stages of development. You should learn UML because it is the de-facto method for communication between dev's. So if I show you a UML Class diagram you immediately know what inherits what and methods etc.. blah blah. As I mentioned various stages of developement exist for a particular piece of software. In the initial stage a Use Case diagram is made, then Analysis diagrams, then Design diags. All these help in development.

Now there are many methodologies for developing software. The various stages I mentioned were wrt the Waterfall process (or the Unified Dev Process), which I must admit is very boring. Too much documentation and managerial in nature. But understandably in a large organisation these things become important. Other methodologies include the Agile process. Agile process includes XP development practices which seem more Developer friendly. Many methodologies or processes use UML diagrams to express artifacts (or products) at various stages of development.

So firstly you should learn UML diagrams. Reading about various Development processes is also good. You will get an idea as to how many co's work. Dinesh could probably tell us a bit about his company. Which process you apply is a different matter.

And Design Patterns is a separate issue altogether. Which book for patterns or articles have you read?? Design Patterns was the first book to talk about patterns and is simply put a Bible. I have had the book since a while and even suggested to you guys to read the book. But to be frank I have not been able to understand too many patterns. We did try to apply a few in the Object Oriented Analysis and Design Module here at Ncb. Recently I read a sample from this book from Oreilly Head First Design Patterns. Read the sample chapter. The style of the book is very different, and I really loved it. Only after you read a few design patterns do you realise how beautiful solutions to generic problems can be !!

And complications in Java is another issue. I'll talk about Java some other time. I think you have mixed too many questions in one paragraph. Read about stuff to get an idea of things. UML and Design Pattens should be high on the priority list.


Also, any opinions about Mono? From his blog sometime back - "7 out of the 20 top-rated apps on gnomefiles.org are mono apps".


Even since coming here to Ncb I have harldy booted into Gentoo, and am not aware of whats going on in the Linux world. Probably Hrishi could shed more light on the popularity of Mono apps. Personally I am very skeptical of Mono being used widely.

Friday, April 08, 2005

More on Mono

Kinda obvious, but one of the great things about the programming world is that you interact, learn from, help and work with people from all over the world. Here's a video from Turkey interviewing Miguel De Icaza - the Mono dude (also GNOME founder). Can't understand half the things the interviewers are saying. I thought they were talking Turkish... turns out it was English.

Anyway, I really got a lot of respsect for Miguel. His blog gives you a good insight into his views - and not just programming related. He's like a really experienced open source hacker. Just feel like if you worked under him you would learn a lot. One of the questions in the interview was about the development process behind Mono. He gives a really good answer about not being a great fan of UML and strict development processes. They are all great hackers and just want to do it because they are having fun... enjoying it. Strict dev practices etc... limit creativity and the "art" of programming.

What dyou think of his answer? I want to learn good practices about developing software because right now we all lack any substantial experience with it. But at the same time, I read about UML, design patterns, agile development, "some new hyped up buzzword" etc... and it all just seems so "messy" or tends to complicate matters. Same feeling I have with some Java developments. I've mentioned them before. It feels a lot of over engineering. Granted this is coming from someone with little experience, but haven't you read an article which goes on about something and at the end of the 20th page you think, what the hell was that? Just seems so complicated for something which could have been done more simply.

Also, any opinions about Mono? From his blog sometime back - "7 out of the 20 top-rated apps on gnomefiles.org are mono apps". I was quite surprised/impressed. It looks like it's use has picked up.

Sunday, April 03, 2005

Google: Behind the scenes

Streaming vid (~1 hr): Behind the scenes at Google

One (more) thing which is impressive is they've built their services on top of commodity hardware... no super expensive machines. Just regular stuff with a lot of redundancy. Also, they have a ton of in built stuff - from a Google File System to some map/reduce algorithm which is infrastructure code to be fault tolerant and distribute the load among different machines (mentioned in the talk). They've recently started to share some of this.

Re: Databases Part 1

Waiting on part deux.

You'll have to wait for some more time... Very busy with the current module at Ncb as reaching the submission deadline.


A table can have a primary key.

When you say "can" dyou mean a primary key is NOT necessary? I thought it would be.


Right. A primary key is NOT necessary. But searching for a particular row will be more complicated as duplicates can be added to the table.


One thing that needs to be considered is where the error checking happen? Does it happen in the "business logic" layer or directly in the data layer? I would think a lot of times the database should ONLY be conserned with storing information.

I guess the question comes down to what responsibilities the database should take on. It seems the trend is to make more and more things happen in the data layer.


Basically databases are becoming more intelligent. So more Business logic is being pushed into the databases. It seems like mixing of responsibilities, but only specific business logic could be put into the db. Like you need to retrieve some data occasionally which spans across many tables and this is done very often. Rather than have loads of SQL in your business logic, just call a stored proc.

Another trend is distributed databases, which still have to mature well.

Error handling is possible in Stored procs. But I am not very sure how errors are sent to the host language. I think a simple SQLError could be returned by the db. We returned C-style status codes from the Stored procs.


Each trigger is associated with a TABLE on some event.

This is quite cool. I didn't know this was possible. You can basically keep a log/trace of everything that's going on in your database this way.


Care has to be taken that triggers are not written on 'events' of heavily used tables. Events could be insert, delete. Now if I have 500 inserts per sec on a table and I write a trigger on that event, its going to really load the server.


I'm interested in Stored Procedures just because I've read that they are beneficial to app performance. Is that really true?


Yes its true.

Now for some explanation.

When a simple query is submitted to a database, a few steps are carried out after which the result is returned. These include checking if the query is valid and tries to reference valid tables and columns. Then optimization of the query is done. Most queries in SQL are commutative and associative, so the order of the operations in the query can be changed without changing the meaning of the query as a whole. So the db does this based on the information it has about its tables and some heuristics as well. After this, the new SQL query tree is compiled and finally executed to return a result. Now as you have noticed, this is a very complicated and lengthy process. (and trust me, db's are really smart already wrt optimization!!)

Back to Java. There are three ways to execute a query in Java SQL - A Statement, a PreparedStatement and a Callable statement.

Now in a simple statement, the query is sent from the host language, then goes through all the steps of checking and optimization mentioned above.

A prepared statement is cached into the db for some time. So it does not have to go through all the optimizations steps each time. Probably only the new arguments have to be checked which should be faster.

A Callable statement is used to run a Stored Procedure. Now a stored procedure query resides IN the db. Only arguments are passed similar to a Prepared statement. So all optimization, compilation is already done.

I guess that should explain performance effects of various methods.

Also Stored procedures have other advantages like Mohn mentioned in his Hacking Websites blog.

< Excerpt Begin >
Be paranoid and ALWAYS validate data coming from the client. And as far as possible use Stored Procedures. Besides getting a performance boost (since they are compiled vs SQL statements that are interpreted), they use typed parameters
< Excerpt End >


What db are you working with? I've had basic experience with Access and SQL Server.


I used to work on Access before leaning what a 'real' db is supposed to do. We worked on SQL Server here at Ncb. Access does not do most of the things I blogged about. Just has tables with Primary and Foreign keys. Probably something more!!

I guess this blog introduced Stored procedures well enough. An example later..

Sunday, March 27, 2005

Dynamic Languages

Over at DevSource they have a piece on The State of the Scripting Universe. Boy, this scripting engine really is going full throtle. Everyone and his dad seems to have seen the light and gone over to scripting land. Somehow I'm still sitting in "static" darkness. We have discussed this a bit before. I guess it's the fact that I've only had very limited exposure to it... not having developed something "significant". Once you have that kind of experience under your belt it's better to compare it with C#/Java/C++.

I believe scripting in quite big in game development. A friend of mine works at a gaming company and all he does is scripting (some custom developed one) and he's in the design department! From what I understand, all games start out with the engine and you just customize that. The engine is sort of like the platform? And the scripting languages use that as an API? Maybe Dinesh can shed some light.

While on topic, Bruce Eckel had a post last month about productivity between static/dynamic languages. Productivity is one of the apparent key advantages of dynamic languages. In it he links to some dude who writes about Tests vs Type. Read his post to understand what that means.

Personally, I think the "Edit Types" block under "Explicit Typing" is way too big. To me it seems like spending time "editing types" is a way of testing. You bypass this step in "implicit typing". So I think the "editing types" part should come under tests. What dyou think?

Btw, searching for anything on the blog really sucks. I had to find the previous post link manually. Google isn't spidering/indexing the posts properly.

Saturday, March 26, 2005

Don't throw from finally

I found this very interesting. It's a .NET piece, but these things tend to cross over one-to-one into Java fairly often. This is a CLR feature, so dunno in this case if the JVM behavs the same way.

Btw, both in C++ and C# you have the option of setting an event handler for an unexpected exception.

In C++,
set_unexpected( my_event_handler );

In C#,
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler( MyEventHandler );

Is there something similar in Java?

JSP/Servlets compared to ASP.NET

I read up a little on JSP/Servlets + Rahul's post. They seem more similar to ASP.NET than plain ASP.

ASP was quite a mess really, because everything was on one page. You had a lot of "spagetti" code, no separtion of UI from code and it was interpreted, not compiled. It was recommended practice to create code, package it into COM components and then use these components from your ASP page. COM code was compiled so you got some performance inprovements. But it was a hassle and not very popular. The whole COM technology was messy - not dynamic with needing to reboot machines, registering/unregistering components etc...

Compared to Servlets, ASP tech was a joke. ASP.NET completely changed this, brought it on par and even surpassed it. With ASP.NET you get complete separation of UI and code. Basically, you get the MVC pattern for free (no need for external frameworks like Struts). You can integrate code within the same page as UI if you want, but it was kept for compatibility with ASP. To be able to "upgrade" old ASP pages to .NET. It is not recommended. VS.NET only supports "CodeBehind" wherein you have one page with UI and another code behind that page that is your logic. When you access an ASP.NET page it automatically combines these two pages into one "Page" class... similar to when you access a JSP page, it gets compiled into a Servlet.

I see that there is something new coming up called Java Server Faces. This is in direct reaction to ASP.NET server controls. Again their main motivation is to clearly separate code from presentation. Think about when you want to spit out a table with info from a database. You have to connect to the database, get a recordset, start a table, create a row, add first row of data, repeat, end table and then send it to the browser. Your presentation (the table) is intertwined with your code (connect to database, loop through records etc...). Server Controls in ASP.NET changed this. You just drop a DataGrid control in your page. In your "CodeBehind" page, connect to the database and bring back a DataSet. Then just bind this DataSet to the DataGrid. The DataGrid control will take care of outputting the table. Basically, you just pass it a collection of data and it takes care of handling the presentation. You can later set properties on it to change appearance etc... Everything about the DataGrid can be programatically accessed on the server side including a whole bunch of events. This is the essence of OOP. JSF seems to be doing something similar.

What I notice on the Java side is a plethora of different intimidating acronyms. JSP, Servlets, [Enterprise] Java Beans, Struts, Web Containers, Application Servers and now JSF. Obviously, Microsoft is known for integrating everything and Java is more community related with diff frameworks being "plugged" in (which is good in a way). I posted about this difference sometime back. But regardless, it seems like maybe the Java side tends to complicate matters a bit much? Maybe you don't need to use all these all the time? Maybe it's just for the super high end stuff - enterprise level? What dyou think?

Wednesday, March 16, 2005

GoogleX

Something for the OS X fans - GoogleX

Re: Eclipse Tutorials

Is Netbeans free? Or is there a free (community/personal) version? What about IntelliJ - It regularly gets voted top Java IDE.

Netbeans is free with source available. Netbeans is sponsored by Sun and is available under the Sun Public License a variant of the Mozilla Public License. Eclipse is available under the Commons Public License but according to their site, its going to be converted to the Eclipse Public License.

IntelliJ is not free either in source or usage. They do have a trial version!! IntelliJ actually uses a lot of open source libs. I haven't really used it to comment on its features.


Eclipse has been built up, not only as a (superb) IDE, but also as a platform for plug-ins.

Same is true for Netbeans. Both IDE's also have a platform concept over which the IDE is built. So I can create applications over their Platforms which contain generic libraries which are used within the IDE's. This can ease lots of stuff. Netbeans also has good Plug-In capabilities. But I do not know which IDE has a better platform and plug-in design.


What's impressed me most about Eclipse is that it is written entirely in Java. I haven't had any unreasonable performance problems at all. I've used it both on Windows and Linux and the experience is absolutely seamless.

Eclipse is not as pure Java as Netbeans. This may sound a bit funny at first. In Eclipse, the Standard Widget Toolkit is used for GUI. Now SWT is not standard Java. It is possible to embed C code within Java code. So what the Eclipse group did is created a new GUI framework called SWT in which direct calls are made to the underlying OS. This bypasses the JVM. This apparently has performance benefits. But now the user needs to install the SWT libraries which contain OS dependent library files like dll's. Netbeans on the other hand uses Swing. And to run swing, just the JVM is needed. This article should make things clearer.

Also both Ant and Junit are also seamlessly integreated into the Netbeans IDE.

Personally I am not sure why Eclipse seems more popular compared to Netbeans.

Servlets and JSP : An Introduction

I am going to give a short introduction to Servlets and Java Server Pages(JSP) which are used to create dynamic web pages using Java technology and are part of J2EE.

Both Servlets and JSP have to be run within a web-container. The web-server will start on a particular port on which pages are served. I recommend using Jakarta Tomcat as your web-server. Web-Containers are also embedded within application servers. Installation of Tomcat is very easy.

Both Servlets and JSP are basically simple Java class files. This is a simple servlet -

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorldServlet extends HttpServlet {

public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {

res.setContentType("text/html");
ServletOutputStream out = res.getOutputStream();
out.println(" < html >");
out.println(" < head > < title > Hello World < /title
> < / head >");
out.println(" < body >");
out.println(" < h1 > Hello World < /h1 > ");
out.println("Server time is " + System.currentTimeMillis());
out.println(" < /body > < /html > ");
}

public String getServletInfo() {
return "Create a page that says Hello World";
}
}

The code should be mostly self explanatory.

The HttpServlet contains two important methods, doGet and doPost. doGet is used to handle HTTP GET requests and doPost is used to handle HTTP POST requests. The path to invoke this Servlet will depend on the web-server used and settings made. When the url for this Servlet is requested, the doGet method is invoked.

Within the doGet method, the HttpRequest and HttpResponse are passed as params. So both can be checked. An output stream to the HttpResponse instance is opened and any html to be displayed to the user, is simply thrown to the output stream. As simple as that.

The second method getServletInfo is analogous to toString and will never be used that much.

As you'll notice the HelloWorldServlet is a simple java class file. So you can easily make your web-page dynamic. Like in this example, I simply print the Server time. If/Else loops can be added, Database connections opened, anything you can do within a normal class can be done here too. But this obviously leads to a mess, with UI, logic and everything else getting mixed up.

Basically the first time the url is requested, the Servlet class file is compiled. The next request onwards, the compiled class file is simply executed.

Also Servlets are a bit cumbersome to code. So JSP was introduced. This is a sample JSP page -

< html >
< head > < title > Hello World < /title > < / head >
< body >
< h1 > Hello World < /h1 >
Server time is < %= System.currentTimeMillis() >
< /body > < /html >

As in the servlet example, whenever this url is requested, the time of the server is shown within the response web-page. This code is written within a .jsp file and placed within the web-server. The web-container will automatically generate a Servlet for this JSP page and then serve requests. Lots of the boring stuff in Servlets is taken care of. But in essence, the Servlet generated for this Jsp page will be very similar to the above page.

The < %= "Java code here" > is used to embed java code within a Jsp page. There are additional tags, directives and methods for scripting. Both Servlets and Jsp also have advanced features for filters, custom tags, session management etc.

The best way to get the basics is to practice and read more examples. Download and install Tomcat. There are sample examples which explain a lot. Also you should get a whole bunch of tutorials at developerworks-java. This is one tutorial.

Wednesday, March 09, 2005

Attributes/Annotation usage

.NET introduced the concept of "Attributes". Java 1.5 came out with a similar concept called "Annotations". They take a while to fully understand. Examples always help and here's one that does a good job of explaining WHAT they accomplish.

It's interesting to see the evolution of languages and how newer features are just formalized notions of what you could do before that feature came to be. More often than not, it was just "hacking" a feature for something it was'nt really meant for. Classes (from Structs), Interfaces (from Abstract Base Classes with no implementation), Enums (from grouping named constants), Properties (from Getters/Setters), Events (from function pointers) and now Attributes/Annotations (from Marker Interfaces?) all fall into this category.

Sunday, March 06, 2005

Re: Databases Part 1

Finally responding on this great post. Waiting on part deux.

A table can have a primary key.

When you say "can" dyou mean a primary key is NOT necessary? I thought it would be.

Things get a bit messier in real life scenarios. Consider Age was one of the fields in the Employee table. Now Age could be modelled as an Integer data-type. An Integer can be negative, but Age can definitely not be. So such simple rules are enforced by using a CHECK's. The definition of the Table is called a Schema. This Schema is mentioned using the CREATE statement. PK's and FK's are mentioned along with the Field names and this is where CHECK's can be applied too. I'll not get into the syntax here. A simple line like CHECK ([AGE>0]) will enforce the integrity of the Age field.

One thing that needs to be considered is where the error checking happen? Does it happen in the "business logic" layer or directly in the data layer? I would think a lot of times the database should ONLY be conserned with storing information. All the validation should happen elsewhere. Wouldn't it be more convenient that way?

Why more convenient? Because your business logic layer interacts with both presentation and data layers. If something doesn't get validated it's easy to present the error to the user. I'm not sure how this would be handled with the database. What happens when the CHECK([AGE] > 0) fails?

I guess the question comes down to what responsibilities the database should take on. It seems the trend is to make more and more things happen in the data layer. The next version of SQL Server is being integrated with .NET. So you can apparently write stored procedures in the .NET languages rather than SQL. I believe Oracle has had this capability with Java for a while. Also, another big trend is SOA - Service Oriented Architecture. The idea is to make each layer completely separate with each providing services. You call those services instead of directly making SQL calls. I suppose these will be Web Services, so you can invite others to call them - not just your app.

Each trigger is associated with a TABLE on some event.

This is quite cool. I didn't know this was possible. You can basically keep a log/trace of everything that's going on in your database this way.

I'll post later on Stored Procedures, Prepared Statments and simple Queries. If you guys want some other info, I'll try. Was this blog too complex/easy?

I'm interested in Stored Procedures just because I've read that they are beneficial to app performance. Is that really true?

What db are you working with? I've had basic experience with Access and SQL Server.

Saturday, March 05, 2005

Eclipse On The Rise

By Charles Babcock of InformationWeek

IBM has had to walk a tightrope between open-source and
proprietary forces to make the Eclipse programmer's workbench a
success, Lee Nackman, chief technology officer in IBM's
Rational Software unit, told attendees at the EclipseCon
conference Thursday. By most measures, the high-wire act has
succeeded "beyond our wildest imaginings," Nackman said.

Eclipse, a Java workbench that can host many unrelated
development tools, has emerged as the prime alternative to
Microsoft's popular Visual Studio .Net set of integrated
programming tools. Nackman insisted the name Eclipse was aimed
at Microsoft, not Sun Microsystems, originator of the Java
programming language.

The name was selected in a January 2000 meeting at IBM's
Raleigh, N.C., facility, Nackman said. "E-business was hot. We
tried a lot of E-sounding names," but the Eclipse name stuck,
he said. IBM realized at the time that Microsoft was on its way
to establishing a dominant set of development tools with Visual
Studio. To challenge them, IBM and other Java vendors, such as
Symantec Corp. with Visual Cafe and Borland Software Corp. with
JBuilder, were going to have to stop "reinventing the same
things over and over again. We were not moving fast enough to
keep up with Microsoft," he said.

IBM turned the idea of a tools platform over to a subsidiary,
Object Technology International, in Ottawa, which used small
teams to develop new tools. IBM's own Visual Age toolset was
based on the Smalltalk language and "was getting increasingly
brittle." The new development environment would have to remain
flexible and allow dissimilar tools to plug into it and share
files.

In November 2001 IBM decided to let Eclipse go public as a
freely available open-source-code project.

Nackman said he and members of IBM's Visual Age and WebSphere
groups thought top management would resist such a move, but
they had seen earlier successes working with the Apache HTTP
server group, now the Apache Foundation, and Linux open-source
developers. "It turned out to be not much of a struggle,"
Nackman said.

Even so, for many months, many Java tool competitors refused to
sign up as Eclipse users or joined the project as "voyeurs,"
watching from the sidelines but not committing to its ongoing
development. The open-source project was launched with nine
vendor backers, including Borland, Rational Software,
TogetherSoft, and the new owner of the Java tool Visual CafŽ,
WebGain.

IBM remained the largest code and financial contributor to
Eclipse and collected feedback from market researcher Gartner
that indicated the outside world still thought of Eclipse as an
IBM-controlled project.

IBM knew Eclipse needed "conceptual integrity" or technical
leadership that kept it focused on its primary role as a
plug-in platform for diverse tools. At the same time, major
rivals were reluctant to invest in it when it was still under
apparent IBM control. And potential users were confused: "What
is Eclipse? An IBM thing or a weird open-source thing
controlled by radical hippies?" Nackman said.

IBM "wanted to get into a put-up-or-shut-up mode" with
Eclipse's titular supporters. The expansion of the Eclipse
board of directors March 1 at the "strategic developer" level
has brought in competing tool vendors BEA Systems, Scapa
Technologies, and Sybase. Borland, already a member, increased
its commitment to the strategic developer level, which carries
a $250,000 annual fee.

With competing Java vendors offering Eclipse-based versions of
their tools, "Eclipse has dramatically reduced fragmentation.
The tools have come together. The ecosystem is thriving,"
Nackman said. Eclipse.org, a URL that four years ago had to be
purchased from a girls' soccer team in Illinois, has become an
open-source project that's rapidly branching out into
data-management tools, Web tools, business-intelligence and
reporting software, and test-and-performance projects.

To expand on its success, Eclipse will have to maintain a
discipline of only permitting published programming interfaces
into the workbench system and not letting the multiplying
projects overlap too much. At EclipseCon, Nackman said he had
seen the "good-faith discussions" that were resolving those
issues. "People are coming in to this discussion asking what's
good for Eclipse."

Proprietary technology vendors such as BEA Systems, Borland,
and IBM can support Eclipse and still make products for sale,
he said, because they "will constantly be lifting the line,
constantly innovating above what Eclipse does."

Wednesday, March 02, 2005

The Emperor Penguin

Interview with the Emperor.

Re: More on C# and C++

The one time I picked up a C# book and read some fundamentals,.. I was really quite lost. I kept wondering where is all this in Java and is it really needed. The features did have merit but life was simpler without them.

Can you give some examples? I somehow feel C# maybe simpler because it has better abstractions - things like delegates, events, properties and attributes. Also, Java 1.5 has included many features from C#.

Is NUnit widely used? I think its similar to the JUnit library.

NUnit was a direct port of JUnit. Recent versions have made better use of .NET features like attributes, which have made it better. For example, in JUnit, you have some restrictions like you your test class has to extend "TestCase" and you HAVE to start your method names with "test". In NUnit, you just apply an attribute, ["TestCase"] to your class - no need to extend it, and similarly just apply an attribute ["Test"] to your method - no need to start it with "test".

NUnit is quite popular. But I fear Microsoft is going to have a negative affect on their growth. With Visual Studio 2005, they are introducing Visual Team System, which includes it own testing framework. I'm actually not sure if the Team System features are only for the high end version of Visual Studio or if they will be included in all. This is just another example of the difference in cultures between the Java and Microsoft camps.

JUnit was started by the community and has been accepted as an unofficial standard. Microsoft on the other hand, instead of embracing NUnit has gone and done their own thing. I'm sure their features will be great and it will integrate really well with Visual Studio providing for a great experience. But it just shows that they haven't really opened up to the .NET community.

Java is also a pretty huge framework. It is divided into Standard and Enterprise Editions, but are still very huge in themselves. Are .NET api's divided similarly? And the Java api's are bloating too. So there doesn't seem to be much of a diff there.

.NET has two versions - .NET framework (clients and servers) and .NET compact (mobile - similar to J2ME). I guess it's not going to matter a whole lot that .NET will keep getting bigger because Microsoft will just integrate it into the OS - That's what WinFX is all about. So no headache of downloading it. I found the idea of a linker for .NET quite interesting. Why wouldn't this work?

I just read something similar in a book recently - Class invariants. Never thought of this stuff before. Could Mohn post an example.

I had posted something on class invariants long back. This was during the period where we obsessed with assertions.

Re: Eclipse Tutorials

I use Netbeans by Sun. Lets see if I find something really attractive in Eclipse to switch. Btw one of my favorite features in Netbeans is Refractoring.

Is Netbeans free? Or is there a free (community/personal) version? What about IntelliJ - It regularly gets voted top Java IDE.

Eclipse has refactoring features. Microsoft has been quite late to the game on this one. Visual Studio 2005 will finally include it.

Eclipse has been built up, not only as a (superb) IDE, but also as a platform for plug-ins. I love how JUnit so easily plugs into the environment. It just makes it so much more convenient to write tests... It makes you want to. I haven't had a chance to explore other plug-ins, but I've seen a ton of them, including articles on building them.

What's impressed me most about Eclipse is that it is written entirely in Java. I haven't had any unreasonable performance problems at all. I've used it both on Windows and Linux and the experience is absolutely seamless.

What is software design?

Exerpt: "The following essays by Jack W. Reeves offer three perspectives on a single theme, namely that programming is fundamentally a design activity and that the only final and true representation of "the design" is the source code itself. This simple assertion gives rise to a rich discussion—one which Reeves explores fully in these three essays."

Good set of articles - all three. The first one was published over a decade ago when the hot new language was C++. The second one was published last month.

I can see where the author is coming from. For the most part I agree with his point that you can't have a clear separation between designing software and actually implementing it. It has to be an iterative process. Yes you do need to think about the design of the product. But there are SO many things that just don't come into play until you actually start implementing it. This is true even in the "proper" engineering disciplines. So many unforseen events can occur.

From what little experience I have had with the small projects I've worked on, I've experienced it. During the design phase, you're generally supposed to think of everything. But it doesn't work out that way. You need the implementation to back you up and to weed out potentialities you hadn't thought of. As he says, even builders create prototypes and test them out before starting on the real thing. With software, since it's so easy to replicate, you don't *really* need the prototype. You can start on the real thing, little by little.

His other point is that code is documentation. There has to be something said for self-documenting code. The intent of code is precise. The same can't be said of languages like English. There can be so many ways to interpret it. With code, there is only one meaning. Don't get me wrong, I think proper documentation is essential. And things like javadoc where your documentation is so close to the code has been pretty revolutionary. But there are still times where javadoc doesn't tell you what's going on *exactly*. Take one look at the implementation and it makes sense.

Tuesday, March 01, 2005

Eclipse Tutorials

Got a link to a whole bunch of tutorials on various Eclipse technologies. Btw Eclipse is an open-source IDE by IBM.

http://www.eclipsecon.org/tutorials.php

I use Netbeans by Sun. Lets see if I find something really attractive in Eclipse to switch. Btw one of my favorite features in Netbeans is Refractoring. Basically a change in some code is reflected in all dependent areas. From the netbeans site:

Refactoring
* Renaming of classes, methods, and fields
* Moving of classes
* Field encapsulation
* Changing of method parameters
* Finding usages of classes, methods, and fields