When you think of Java, you immediately think about server-side code. It's got a bad rap on the client and I don't feel like that perception will change much... not on a large enough scale.
The java community itself has to blame for the mess on the client side. They are doing some stuff on this front but will take time. Java's UI API, Swing is a bit slow. What really caused a mess for java on the desktop is dev's making UI designs. Many crappy, user -'UN'friendly apps were made. I suppose for larger complex UI's designers should be brought in.
If you guys have no real work; have a look at a few of the better Java desktop applications here.
Java has done a commendable job in keeping itself platform independent, but the costs seem to be quite high. There is this lowest common denominator rule it has to follow.
Another valid point. Java's strengths are it's weaknesses and I suppose same for the other languages/platforms.
It's really cool how each of us stuck out for our own lang. These discussions would have been slightly boring if all of us had been on the same side.
p.s. the same side would obviously be Java :)
Saturday, July 03, 2004
Friday, July 02, 2004
Generics v Templates
Comparing .NET Generics and C++ Templates
Good article essentially covering our discussion several months ago. As we had understood, because .NET does the specialization at run-time there is the need for "Constraints". What terminology does Java use?
Good article essentially covering our discussion several months ago. As we had understood, because .NET does the specialization at run-time there is the need for "Constraints". What terminology does Java use?
Re: The C++ Source (C++ future)
Personally I feel managed code will be adopted even more in the future and at a later stage C++ will loose its hold on desktop applications. This will happen sooner in Windows especially after Longhorn. On linux this should take much more time, simply because of mistrust of Java, Sun.
On the Windows front, it's as good as done. As you say, with Longhorn the whole platform is going managed. It will be backward compatible with Win32, so it's not like your C/C++ apps won't work. It will be deprecated. This has already started with .NET. Java introduced managed code long back (and Smalltalk long before that), but only with Microsoft getting into the game will it have a major impact. They control the direction developers take on the client.
Linux on the other hand is a completely different story. I don't think managed code will be successful on non-windows platforms. Linux devs don't trust anything that is not open source. As of now, there isn't (not that I know of) a completely independent open source managed code platform. Mono is heavily associated with .NET and we all know how much the oss community loves Microsoft. C/C++ should rule here for a while.
Another question is much on dev on Win will be done using Java?
I don't see it as having much success on the desktop even with improvements they've made. When you think of Java, you immediately think about server-side code. It's got a bad rap on the client and I don't feel like that perception will change much... not on a large enough scale. If you are developing a Windows app, it wouldn't make sense NOT to choose .NET. You get performance and can access the full capabilities of Win32 if you need to.
Java has done a commendable job in keeping itself platform independent, but the costs seem to be quite high. There is this lowest common denominator rule it has to follow. All functionality has to be the same everywhere. Each platform has some capability unique to it. Java, if not prevents, discourages you from using that. So this is another big debate... Platform independence and lowest denominator or platform specific features.
Frankly, I can see why managed code is becoming such an ally to developers, but I think the most important thing to consider is the fact that there are millions and millions of lines of code in C++ already, where does that go?
This is an important point. Legacy code will always be there. Even when we move on to the next great thing and leave Java/.NET in the dust. I'm sure there's still old Fortran code hanging in some mainframe somewhere that needs to be maintained. But I don't see any new software being developed using Fortran.
I share the same feeling with you regarding C++. It's a wonderful language and will be around for a long time. I just feel like for custom apps it will eventually be displaced. I'm not talking about big applications like Office/Mozilla, system code or OS's. And I don't expect games to move over to the managed world anytime soon either (Although Vertigo manged to port Quake II to .NET and even added new features using Win Forms). I'm talking about apps IT departments develop. The complexity, when compared to .NET/Java is just too high.
They are actually reconsidering the C++ Standard and I think in the next update the Boost library will be included, lets see how far they go to actually "compete" with the others (Java et al), if at all.
I don't ever think that C++ will ever have a monolithic library akin to the Java API or the .NET framework. Having such frameworks makes it super convenient to develop applications cause you'll find more or less everything but the kitchen sink - collections, graphics, networking, threads, UI, etc... But the disadvantage is that you need your clients to have that framework installed. This goes against c++'s "culture". Even the STL (at this stage) is mostly about collections and algorithms. These are something almost all, even the most basic of applications, need. I dunno what their future plans are for extending the standard library, but I doubt it would involve anything that isn't generic.
What dyou feel?
On the Windows front, it's as good as done. As you say, with Longhorn the whole platform is going managed. It will be backward compatible with Win32, so it's not like your C/C++ apps won't work. It will be deprecated. This has already started with .NET. Java introduced managed code long back (and Smalltalk long before that), but only with Microsoft getting into the game will it have a major impact. They control the direction developers take on the client.
Linux on the other hand is a completely different story. I don't think managed code will be successful on non-windows platforms. Linux devs don't trust anything that is not open source. As of now, there isn't (not that I know of) a completely independent open source managed code platform. Mono is heavily associated with .NET and we all know how much the oss community loves Microsoft. C/C++ should rule here for a while.
Another question is much on dev on Win will be done using Java?
I don't see it as having much success on the desktop even with improvements they've made. When you think of Java, you immediately think about server-side code. It's got a bad rap on the client and I don't feel like that perception will change much... not on a large enough scale. If you are developing a Windows app, it wouldn't make sense NOT to choose .NET. You get performance and can access the full capabilities of Win32 if you need to.
Java has done a commendable job in keeping itself platform independent, but the costs seem to be quite high. There is this lowest common denominator rule it has to follow. All functionality has to be the same everywhere. Each platform has some capability unique to it. Java, if not prevents, discourages you from using that. So this is another big debate... Platform independence and lowest denominator or platform specific features.
Frankly, I can see why managed code is becoming such an ally to developers, but I think the most important thing to consider is the fact that there are millions and millions of lines of code in C++ already, where does that go?
This is an important point. Legacy code will always be there. Even when we move on to the next great thing and leave Java/.NET in the dust. I'm sure there's still old Fortran code hanging in some mainframe somewhere that needs to be maintained. But I don't see any new software being developed using Fortran.
I share the same feeling with you regarding C++. It's a wonderful language and will be around for a long time. I just feel like for custom apps it will eventually be displaced. I'm not talking about big applications like Office/Mozilla, system code or OS's. And I don't expect games to move over to the managed world anytime soon either (Although Vertigo manged to port Quake II to .NET and even added new features using Win Forms). I'm talking about apps IT departments develop. The complexity, when compared to .NET/Java is just too high.
They are actually reconsidering the C++ Standard and I think in the next update the Boost library will be included, lets see how far they go to actually "compete" with the others (Java et al), if at all.
I don't ever think that C++ will ever have a monolithic library akin to the Java API or the .NET framework. Having such frameworks makes it super convenient to develop applications cause you'll find more or less everything but the kitchen sink - collections, graphics, networking, threads, UI, etc... But the disadvantage is that you need your clients to have that framework installed. This goes against c++'s "culture". Even the STL (at this stage) is mostly about collections and algorithms. These are something almost all, even the most basic of applications, need. I dunno what their future plans are for extending the standard library, but I doubt it would involve anything that isn't generic.
What dyou feel?
Tuesday, June 29, 2004
Re: The C++ Source (C++ future)
Frankly, I can see why managed code is becoming such an ally to developers, but I think the most important thing to consider is the fact that there are millions and millions of lines of code in C++ already, where does that go?
As far as I can tell, I do see an eventual shift from C++ to managed code, but call me old fashioned I just love C++. But I, like most other people, want to do things in better ways than possible now, so the only question to answer is whether managed code will be better (now or in the near future), once that happens, no one's going to just want to stick to C++ because of tradition or because I love it.
As long as it proves to be a worthy successor, Managed Code is going to pave the new paths. But this will take time and no, I don't see C++ completely phasing out in the immediate future.
They are actually reconsidering the C++ Standard and I think in the next update the Boost library will be included, lets see how far they go to actually "compete" with the others (Java et al), if at all.
Dinesh.
As far as I can tell, I do see an eventual shift from C++ to managed code, but call me old fashioned I just love C++. But I, like most other people, want to do things in better ways than possible now, so the only question to answer is whether managed code will be better (now or in the near future), once that happens, no one's going to just want to stick to C++ because of tradition or because I love it.
As long as it proves to be a worthy successor, Managed Code is going to pave the new paths. But this will take time and no, I don't see C++ completely phasing out in the immediate future.
They are actually reconsidering the C++ Standard and I think in the next update the Boost library will be included, lets see how far they go to actually "compete" with the others (Java et al), if at all.
Dinesh.
Re The C++ Source (C++ future)
I know this question has been debated many many times before, but what do you feel about the future of C++? With the emergence of managed code in the form of Java and .NET, where productivity is noticably higher, do you think C++ is falling behind for desktop application development? This is it's forte, but is it still relevant? I doubt anyone uses it anymore for web applications. Atleast on Windows, Microsoft seems to be giving less attention to MFC and is encouranging all developers to move to .NET. You already have Java in the Unix world.
What makes this debate interesting is our varying background. Mohnish and I do have a managed code bias so it is very important to know what Dinesh and Hrishi feel.
Personally I feel managed code will be adopted even more in the future and at a later stage C++ will loose its hold on desktop applications. This will happen sooner in Windows especially after Longhorn. On linux this should take much more time, simply because of mistrust of Java, Sun.
Another question is much on dev on Win will be done using Java? Java 5.0 (formerly Java 1.5) is now in beta and has many new features and enhancements as shown here. Speed is claimed to have been increased drastically. More importantly "Many areas of the rich desktop client have been enhanced including an updated, more modern, cross-platform look and feel." So the ugly and slow java apps might be a bit less uglier and more faster. I cannot claim that Java will hurt .NET on Windows, but as Mohn pointed out, Java is being taught in lots of universities. Those guys might become comfortable with Java. So as we all are resilient to change, some dev on Windows might be done in Java. Also a lot of API's are being added to Java which will make it an alternative to .NET. Otherwise I suppose most C++ devs like Dinesh will jump on to .NET unless they really need platform independence which for desktop apps doesn't seem to be the biggest driver.
Ps: have yu guys seen maestro? The Nasa space rover simulation app.
What makes this debate interesting is our varying background. Mohnish and I do have a managed code bias so it is very important to know what Dinesh and Hrishi feel.
Personally I feel managed code will be adopted even more in the future and at a later stage C++ will loose its hold on desktop applications. This will happen sooner in Windows especially after Longhorn. On linux this should take much more time, simply because of mistrust of Java, Sun.
Another question is much on dev on Win will be done using Java? Java 5.0 (formerly Java 1.5) is now in beta and has many new features and enhancements as shown here. Speed is claimed to have been increased drastically. More importantly "Many areas of the rich desktop client have been enhanced including an updated, more modern, cross-platform look and feel." So the ugly and slow java apps might be a bit less uglier and more faster. I cannot claim that Java will hurt .NET on Windows, but as Mohn pointed out, Java is being taught in lots of universities. Those guys might become comfortable with Java. So as we all are resilient to change, some dev on Windows might be done in Java. Also a lot of API's are being added to Java which will make it an alternative to .NET. Otherwise I suppose most C++ devs like Dinesh will jump on to .NET unless they really need platform independence which for desktop apps doesn't seem to be the biggest driver.
Ps: have yu guys seen maestro? The Nasa space rover simulation app.
Monday, June 28, 2004
Re: Tales from the server side
Those were some good 'enterprise' jokes.
Especially liked EJB persistence and The conspiracy.
Framework Lock-In occurs in the Java world when 'other's make API's for something lacking in the general Java API. There are also instances of API's being created which compete with standard Java API's.
Does such a situation ever occur in .NET?
Especially liked EJB persistence and The conspiracy.
Framework Lock-In occurs in the Java world when 'other's make API's for something lacking in the general Java API. There are also instances of API's being created which compete with standard Java API's.
Does such a situation ever occur in .NET?
Security: The root of the problem
A very nice article on software security issues over at Queue magazine.
This again leads to my previous post regarding the relevance of C++ as we move forward. One of the reasons most Universites (atleast in the US) are moving to Java, is that you are by default sheilded from memory management, which is the root of most security problems. There is a benefit from having a safety net below you. The less expected of the programmer, the better :-)
This again leads to my previous post regarding the relevance of C++ as we move forward. One of the reasons most Universites (atleast in the US) are moving to Java, is that you are by default sheilded from memory management, which is the root of most security problems. There is a benefit from having a safety net below you. The less expected of the programmer, the better :-)
The C++ Source
Artima has started a site devoted to c++ entitled The C++ Source. Here's an intro. All the big guns seem to be in on it - Check out the advisory board.
I know this question has been debated many many times before, but what do you feel about the future of C++? With the emergence of managed code in the form of Java and .NET, where productivity is noticably higher, do you think C++ is falling behind for desktop application development? This is it's forte, but is it still relevant? I doubt anyone uses it anymore for web applications. Atleast on Windows, Microsoft seems to be giving less attention to MFC and is encouranging all developers to move to .NET. You already have Java in the Unix world.
I know this question has been debated many many times before, but what do you feel about the future of C++? With the emergence of managed code in the form of Java and .NET, where productivity is noticably higher, do you think C++ is falling behind for desktop application development? This is it's forte, but is it still relevant? I doubt anyone uses it anymore for web applications. Atleast on Windows, Microsoft seems to be giving less attention to MFC and is encouranging all developers to move to .NET. You already have Java in the Unix world.
Tales from the server side
Been a while since we've had some activity here. Time we get it going again.
http://www.theserverside.com/cartoons/TalesFromTheServerSide.tss
http://www.theserverside.com/cartoons/TalesFromTheServerSide.tss
Saturday, June 12, 2004
Re: N-queens solution
I still haven't read Dinesh's 'Optimum' solution completely and am assuming i understood what i read. But another idea came to my mind. I don't know how much performance gain can be achieved if any at all. You be the judge.
The idea is to use Reflection.
Reflection allows Classes to be thought of as objects and it is possible to create instances of classes and use those to invoke methods etc of the Class. (just a intro for completeness). As mohn put it,(i think) Reflection is using meta-data of the Classes.
I am not sure if Reflection is possible in C++.
In Dinesh's 'Optimum' solution,
File ChessBoard.cpp, method void Search(int xpos), iteration is done at each step by these lines
ChessBoard* chess = new ChessBoard ( currSol,order);
chess->Search(g+1);
I guess creating 'new' instances for every row each time, is very costly. Hey.. Reflection is definitely costlier than 'new'. But could be used here.
If N instances of ChessBoard are created and stored in a List, these can be used for the solutions.
A new method, say flush(), to clear the state of the ChessBoard could be created.
Now instead of multiple 'new', the instances are created only once. Then Method objects can be created and invoked(). For each row, the Method of the element of the List can be called and after a search, all the List elements are 'flush()'ed for a new search...
The idea is to use Reflection.
Reflection allows Classes to be thought of as objects and it is possible to create instances of classes and use those to invoke methods etc of the Class. (just a intro for completeness). As mohn put it,(i think) Reflection is using meta-data of the Classes.
I am not sure if Reflection is possible in C++.
In Dinesh's 'Optimum' solution,
File ChessBoard.cpp, method void Search(int xpos), iteration is done at each step by these lines
ChessBoard* chess = new ChessBoard ( currSol,order);
chess->Search(g+1);
I guess creating 'new' instances for every row each time, is very costly. Hey.. Reflection is definitely costlier than 'new'. But could be used here.
If N instances of ChessBoard are created and stored in a List, these can be used for the solutions.
A new method, say flush(), to clear the state of the ChessBoard could be created.
Now instead of multiple 'new', the instances are created only once. Then Method objects can be created and invoked(). For each row, the Method of the element of the List can be called and after a search, all the List elements are 'flush()'ed for a new search...
Thursday, June 10, 2004
Re: N-queens solution
Explanation of N-queens
I will assume the 4-queens problem for sake of simplicity. 4-queens has 2 solutions.
The Optimal Solution (without notDuplicate() and other functions)
The objective of the program is to generate the positions on a 4x4 chess board such that when queens are placed on those postions, they do not attack each other.
The mobility of the queen sets the rules by which the other queens can be placed on the board.
This is how my program goes. The main() enters a loop to go through the first row of the chess board. So in the first iteration of the loop list< Solution > holds a single point (0,0) and this is used to construct the first chessBoard object,through a pointer "chess". The constructor for ChessBoard takes "candidate Solution list" and size of the board (in this case 4x4, hence n=4). Next, in the loop chess->Search() is exceuted. Search() represents the main algorithm which does most of the work in the program. Search() takes an argument which is the row number where the child has to be searched. If you notice, in this version, I'm feeding forward, as in, since my first point is (0,0), I search for a child in row 1.
Now I'll break down Search() for initial point of (0,0). The first step in Search() is to check whether the list currSol's size equals the size of of n. This case is possible only when a solution is found and hence here an "if" statement checks for that and on being true, Search() prints the Solution, increments the no. of solutions found and then returns.
Now if the size is not equal to n, that means the list still has to grow to find a solution. Hence the next step is to Map the chess board, i.e. to setup the unsafe positions on the board. This is achieved by the function setAttForEach(). For (0,0), the resultant board layout is:
Print currSol
Position on board is: 0 , 0
Print Board
1 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
Now once the board has been setup, the main loop of the Search() function starts. xpos sets which row has to be searched to find a new safe position. The loop starts iterating through through that row (namely row 1) and the "if" statement checks whether the board position is safe or not. This is the critical part, If a safe position is found, first the new Point is appended to the currSol list and after that a new object of ChessBoard is created giving currSol to the new object's constructor and then chess->Search(g+1) is called, i.e Search() is called on the new object - for the next row (namely row 2).
Now again Search() executes for the new object, first checking if solution is found (which fails) and then Mapping the board of the new object according to it's currSol, which has the Points (0,0) and (1,2), the board now has the following setup:
Print currSol
Position on board is: 0 , 0
Position on board is: 1 , 2
Print Board
1 0 0 0
0 0 1 0
0 0 0 0
0 1 0 0
As you can notice when Search() goes through row 2, it finds no 1's hence the search on this object returns. Returns to where? Returns to the first object's Search(). See Search(), there is a "delete chess", hence the first object (the one with (0,0))deletes the new object (the one with (0,0) & (1,2)), and then does a currSol.pop_back(), which means that (1,2) is removed from the first object's currSol (remember we had pushed it in before creating new object, hence we pop it back out, since there is not solution to be found from that). The next line (setAttForEach) is redundant and is not needed, hence you can delete it. Now the first object's currSol has only (0,0) and it continues with the loop, i.e. it continues to search through row 1. It now finds (1,3) to be a probable child and in this way the search continues for all possible safe positions in row 1. But 4-queens doesn't have any solutions with (0,0), so this object search finally returns back to main(), where again the object is deleted and the main's loop continues, so now a new ChessBoard is created for the initial point of (0,1). This does find a solution:
Print currSol
Position on board is: 0 , 1
Position on board is: 1 , 3
Position on board is: 2 , 0
Position on board is: 3 , 2
Solutions: 1
And the second solution found is
Print currSol
Position on board is: 0 , 2
Position on board is: 1 , 0
Position on board is: 2 , 3
Position on board is: 3 , 1
Solutions: 2
Actually these also are similar, these two are basically what you call reflections of each other (try swapping the x,y values in first and re-order, you get the second solution). So the First is the "Unique" solution.
So this was the explanation, hope it made sense to you'll. This may not be the most efficient way to solve this problem, but my aim was to brush up with c++, which I achieved. So all in all, I'm pretty happy with the product!
Dinesh.
I will assume the 4-queens problem for sake of simplicity. 4-queens has 2 solutions.
The Optimal Solution (without notDuplicate() and other functions)
The objective of the program is to generate the positions on a 4x4 chess board such that when queens are placed on those postions, they do not attack each other.
The mobility of the queen sets the rules by which the other queens can be placed on the board.
This is how my program goes. The main() enters a loop to go through the first row of the chess board. So in the first iteration of the loop list< Solution > holds a single point (0,0) and this is used to construct the first chessBoard object,through a pointer "chess". The constructor for ChessBoard takes "candidate Solution list" and size of the board (in this case 4x4, hence n=4). Next, in the loop chess->Search() is exceuted. Search() represents the main algorithm which does most of the work in the program. Search() takes an argument which is the row number where the child has to be searched. If you notice, in this version, I'm feeding forward, as in, since my first point is (0,0), I search for a child in row 1.
Now I'll break down Search() for initial point of (0,0). The first step in Search() is to check whether the list currSol's size equals the size of of n. This case is possible only when a solution is found and hence here an "if" statement checks for that and on being true, Search() prints the Solution, increments the no. of solutions found and then returns.
Now if the size is not equal to n, that means the list still has to grow to find a solution. Hence the next step is to Map the chess board, i.e. to setup the unsafe positions on the board. This is achieved by the function setAttForEach(). For (0,0), the resultant board layout is:
Print currSol
Position on board is: 0 , 0
Print Board
1 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
Now once the board has been setup, the main loop of the Search() function starts. xpos sets which row has to be searched to find a new safe position. The loop starts iterating through through that row (namely row 1) and the "if" statement checks whether the board position is safe or not. This is the critical part, If a safe position is found, first the new Point is appended to the currSol list and after that a new object of ChessBoard is created giving currSol to the new object's constructor and then chess->Search(g+1) is called, i.e Search() is called on the new object - for the next row (namely row 2).
Now again Search() executes for the new object, first checking if solution is found (which fails) and then Mapping the board of the new object according to it's currSol, which has the Points (0,0) and (1,2), the board now has the following setup:
Print currSol
Position on board is: 0 , 0
Position on board is: 1 , 2
Print Board
1 0 0 0
0 0 1 0
0 0 0 0
0 1 0 0
As you can notice when Search() goes through row 2, it finds no 1's hence the search on this object returns. Returns to where? Returns to the first object's Search(). See Search(), there is a "delete chess", hence the first object (the one with (0,0))deletes the new object (the one with (0,0) & (1,2)), and then does a currSol.pop_back(), which means that (1,2) is removed from the first object's currSol (remember we had pushed it in before creating new object, hence we pop it back out, since there is not solution to be found from that). The next line (setAttForEach) is redundant and is not needed, hence you can delete it. Now the first object's currSol has only (0,0) and it continues with the loop, i.e. it continues to search through row 1. It now finds (1,3) to be a probable child and in this way the search continues for all possible safe positions in row 1. But 4-queens doesn't have any solutions with (0,0), so this object search finally returns back to main(), where again the object is deleted and the main's loop continues, so now a new ChessBoard is created for the initial point of (0,1). This does find a solution:
Print currSol
Position on board is: 0 , 1
Position on board is: 1 , 3
Position on board is: 2 , 0
Position on board is: 3 , 2
Solutions: 1
And the second solution found is
Print currSol
Position on board is: 0 , 2
Position on board is: 1 , 0
Position on board is: 2 , 3
Position on board is: 3 , 1
Solutions: 2
Actually these also are similar, these two are basically what you call reflections of each other (try swapping the x,y values in first and re-order, you get the second solution). So the First is the "Unique" solution.
So this was the explanation, hope it made sense to you'll. This may not be the most efficient way to solve this problem, but my aim was to brush up with c++, which I achieved. So all in all, I'm pretty happy with the product!
Dinesh.
Wednesday, June 09, 2004
Re: N-queens solution
Ok, my favourite part when I was doing this was when I tried to make my own version of the standard library function mem_fun_ref_t. You'll will know it as mem_fun_ref, which is basically an adapter for the first!
Now what I was trying to do was to get for_each() working in this way,
for_each(currSol.begin(),currSol.end(),setatt)
But it would let me, saying that address of setatt couldn't be taken. Then I tried
for_each(currSol.begin(),currSol.end(),mem_fun_ref, (&ChessBoard::setatt))
This was really bad, cause as I later found out, my whole idea of what the adapters mem_fun and mem_fun_ref did was wrong.
Mohnish, this is especially for you, man try reading the source for stl_function.h !! You'll learn an awful lot about the way things work! try stl_algorithm.h too! But it's not for the faint-hearted!! :):) I thought I knew exactly what it did, but I was a bit wrong! It was time well spent trying to read it!!
I tried making my own version of mem_fun_ref, but there were problems and I wasn't able to get it right, yet!!
If you guys want I'll post explanations of mem_fun & mem_fun_ref! Tell me if you want it! Atleast I'll try, I'm still figuring out :)
Dinesh.
Now what I was trying to do was to get for_each() working in this way,
for_each(currSol.begin(),currSol.end(),setatt)
But it would let me, saying that address of setatt couldn't be taken. Then I tried
for_each(currSol.begin(),currSol.end(),mem_fun_ref, (&ChessBoard::setatt))
This was really bad, cause as I later found out, my whole idea of what the adapters mem_fun and mem_fun_ref did was wrong.
Mohnish, this is especially for you, man try reading the source for stl_function.h !! You'll learn an awful lot about the way things work! try stl_algorithm.h too! But it's not for the faint-hearted!! :):) I thought I knew exactly what it did, but I was a bit wrong! It was time well spent trying to read it!!
I tried making my own version of mem_fun_ref, but there were problems and I wasn't able to get it right, yet!!
If you guys want I'll post explanations of mem_fun & mem_fun_ref! Tell me if you want it! Atleast I'll try, I'm still figuring out :)
Dinesh.
Re: N-queens solution
Revo of course the thing will work!!! I was really stupid, I should have given your'll this solution rather than the duplicate one. Remember I had said, I had written a program before also on 8-queens using brute search rather than "back-tracking", well that incorporated this idea.
This was at the back of my mind, but just forgot to use it for optimization! I'm sorry, I can get pretty dumb like this at times!! Thanks Revo!!
My aim for this thing was brushing up with C++, hence it's a little more complex than it should be. But I had a lot of fun with it.
I did the whole duplicate thing because I wanted to see what happened if I started say for an initial position on (0,0), I appended the nth-level queen to it. I wanted to see if the path taken was any different. But the nature of the problem is still such that, even if I append an nth-level queen all it gives me is a duplicate of the original solution! This is really a cool problem!
So I wanted to make a multi-level search and see what I found rather than just making a single-level search. For me the most interesting thing was the tree structure that was getting created.
You can find the optimized source here: Windows & Linux
Dinesh.
This was at the back of my mind, but just forgot to use it for optimization! I'm sorry, I can get pretty dumb like this at times!! Thanks Revo!!
My aim for this thing was brushing up with C++, hence it's a little more complex than it should be. But I had a lot of fun with it.
I did the whole duplicate thing because I wanted to see what happened if I started say for an initial position on (0,0), I appended the nth-level queen to it. I wanted to see if the path taken was any different. But the nature of the problem is still such that, even if I append an nth-level queen all it gives me is a duplicate of the original solution! This is really a cool problem!
So I wanted to make a multi-level search and see what I found rather than just making a single-level search. For me the most interesting thing was the tree structure that was getting created.
You can find the optimized source here: Windows & Linux
Dinesh.
Re: N-queens solution
Firstly i would like to clarify that I have not read Dinesh's solution yet. Too lazy to read and C++ is not the easiest language.
I got thinking of the problem and may have a solution. I think its different cause I did not feel the need for a duplicate() or the need to set many attack conditions. Maybe the soln's might be same. And it's almost 3:30 AM so I'll just present an algo, which if different, I'll try coding later.
My basic principle is that each queen on the chess board will occupy only one row. There are 8 queens, q0, q1,.. q7 where qn will be placed in the n th row.
The methods are
[ ] getSafePositions()........//returns all safe column positions for a queen in a row
setAttackBelow()..............//set all positions below current position as unsafe
setAttackDiagonalLeft()...//set all positions diagonally left of current position as unsafe
setAttackDiagonalRight()..//set all positions diagonally right of current position as unsafe
.[ ] q0.getSafePositions()
.if [ ] == null, {reset board & continue};
.for each in [ ]
....q0.setAttack()
....[ ] q1.getSafePositions()
....for each in [ ]
.... ..
.... ..
...// and iterate for each lower row.
...// finally
.......[ ]q7.getSafePositions()
...........if [ ] != null
.............else {we have a soln}
Here q0 is the queen placed anywhere in the first row, q1 in the second row and so on. if q7 is also placed on the board, then thats a solution.
Now the other attack combinations ( up of the current queen row ) are not required as the next queen just cannot be placed there. So those above positions can be neglected for setAttack and also for getSafePositions()
So is my solution different or did I make a fool out of myself not reading Dinesh's code??
I suggest Hrishi and Mohn also try some solutions. Should we try more problems like these? We'll get a million from sites like topcoder.com.
I got thinking of the problem and may have a solution. I think its different cause I did not feel the need for a duplicate() or the need to set many attack conditions. Maybe the soln's might be same. And it's almost 3:30 AM so I'll just present an algo, which if different, I'll try coding later.
My basic principle is that each queen on the chess board will occupy only one row. There are 8 queens, q0, q1,.. q7 where qn will be placed in the n th row.
The methods are
[ ] getSafePositions()........//returns all safe column positions for a queen in a row
setAttackBelow()..............//set all positions below current position as unsafe
setAttackDiagonalLeft()...//set all positions diagonally left of current position as unsafe
setAttackDiagonalRight()..//set all positions diagonally right of current position as unsafe
.[ ] q0.getSafePositions()
.if [ ] == null, {reset board & continue};
.for each in [ ]
....q0.setAttack()
....[ ] q1.getSafePositions()
....for each in [ ]
.... ..
.... ..
...// and iterate for each lower row.
...// finally
.......[ ]q7.getSafePositions()
...........if [ ] != null
.............else {we have a soln}
Here q0 is the queen placed anywhere in the first row, q1 in the second row and so on. if q7 is also placed on the board, then thats a solution.
Now the other attack combinations ( up of the current queen row ) are not required as the next queen just cannot be placed there. So those above positions can be neglected for setAttack and also for getSafePositions()
So is my solution different or did I make a fool out of myself not reading Dinesh's code??
I suggest Hrishi and Mohn also try some solutions. Should we try more problems like these? We'll get a million from sites like topcoder.com.
N-queens solution
Have you'll heard about the 8-queens problem, I think most CS guys are familiar with it. I was generally trying to brush up with C++, so I thought I'd try to generate the solutions to the 8-queens problem (there are 92 of them). Then I thought if I'm going for a solver might as well make it a generic one and so I wrote the following code to solve n-queens for any given n.
The source code can be found here : Windows & Linux
It was really a lot of fun!! For 8 queens, I got the execution time down from 435 seconds to 213 seconds to 20 seconds!!!
As far as I know, the code will generate solutions for any n, considering some critical resource doesn't get exhausted. I tested it for 9 queens which has 352 solutions, it generated all 352 of them! So it should work!!
Dinesh.
The source code can be found here : Windows & Linux
It was really a lot of fun!! For 8 queens, I got the execution time down from 435 seconds to 213 seconds to 20 seconds!!!
As far as I know, the code will generate solutions for any n, considering some critical resource doesn't get exhausted. I tested it for 9 queens which has 352 solutions, it generated all 352 of them! So it should work!!
Dinesh.
Saturday, June 05, 2004
some news
here are some good links i got
link here
desription
One way to think of Fast Infoset is as a GZIPed XML. It has the same property that you only need to know it is encoded to recover the original. The main difference is that Fast Infoset is customized for XML and leads to better encoding and decoding times.
link here
description
open source java
do you guys think java will be used in linux more if java is open sourced or will dev's stick to c/c++.
also what are your resources for computer related news?
link here
desription
One way to think of Fast Infoset is as a GZIPed XML. It has the same property that you only need to know it is encoded to recover the original. The main difference is that Fast Infoset is customized for XML and leads to better encoding and decoding times.
link here
description
open source java
do you guys think java will be used in linux more if java is open sourced or will dev's stick to c/c++.
also what are your resources for computer related news?
Wednesday, June 02, 2004
Re: To be or not to be virtual
Even I personally like the C++ style. And I think you hit the nail on the head by talking about designer control. Java partially forces you to adhere to a particular style whereas C++ can fit quite a few roles.
As far as the Design of C++ is concerned Bjarne put it best "Simplicity was an important design criterion: where there was a choice between simplifying the language definition and simplifying the compiler, the former was chosen."
I think Java went too far with the above, this is just a personal opinion, but everytime I write code in Java, I feel that I'm being spoonfed and that ultimately it seems like the design fits the language rather than the language fitting the design.
Dinesh.
As far as the Design of C++ is concerned Bjarne put it best "Simplicity was an important design criterion: where there was a choice between simplifying the language definition and simplifying the compiler, the former was chosen."
I think Java went too far with the above, this is just a personal opinion, but everytime I write code in Java, I feel that I'm being spoonfed and that ultimately it seems like the design fits the language rather than the language fitting the design.
Dinesh.
Saturday, May 29, 2004
To be or not to be virtual
It's interesting to see how languages look at a specific design decision in different ways. I'm of course talking about the Java, C# and C++. In particular, the case of virtualness.
Java, by default, makes every method of a class virtual by default. You need to explicitly specify if you DON'T want to make it overridable by using the keyword "final". C# goes the C++ way in making every method non-virtual by default.
Why did the designers choose to do it differently? From Java's perspective, I assume they were thinking about extensibility. So if the class doesn't do what you want exactly, you can always derive and add your own functionality. This affords you with some leeway in the design. If you feel like something is not right after the initial phase, you can always go back and make changes. On the other hand, you get good performance with C# and C++ cause the function calls are static - no indirection.
What do you think? Which dyou prefer? I guess this is a grey area like pretty much everything in software design. There are always tradeoffs. I guess there is no "right" answer here.
I personally feel that C#/C++ is the better option. Not only for the performance reasons, but also because the class designer is in complete control. You decide how much extensibility you want your class to have. You can make sure that your class will not be used for something it was not meant to be. Yeah, you can do the same in Java too, but it takes more code, even if it is only one extra keyword. Most functions in classes will NOT have the "final" keyword on them. C#/C++ might even make you think about design harder since it's sort of set in stone once you release. With Java there might be a tendency to think like "oh, we can always derive and change later if something's not right".
Java, by default, makes every method of a class virtual by default. You need to explicitly specify if you DON'T want to make it overridable by using the keyword "final". C# goes the C++ way in making every method non-virtual by default.
Why did the designers choose to do it differently? From Java's perspective, I assume they were thinking about extensibility. So if the class doesn't do what you want exactly, you can always derive and add your own functionality. This affords you with some leeway in the design. If you feel like something is not right after the initial phase, you can always go back and make changes. On the other hand, you get good performance with C# and C++ cause the function calls are static - no indirection.
What do you think? Which dyou prefer? I guess this is a grey area like pretty much everything in software design. There are always tradeoffs. I guess there is no "right" answer here.
I personally feel that C#/C++ is the better option. Not only for the performance reasons, but also because the class designer is in complete control. You decide how much extensibility you want your class to have. You can make sure that your class will not be used for something it was not meant to be. Yeah, you can do the same in Java too, but it takes more code, even if it is only one extra keyword. Most functions in classes will NOT have the "final" keyword on them. C#/C++ might even make you think about design harder since it's sort of set in stone once you release. With Java there might be a tendency to think like "oh, we can always derive and change later if something's not right".
Wednesday, May 26, 2004
Re: Stack
I've read that the heap is implemented as a linked list sort of data structure
Even I have read about this. It must be interesting to find out exactly how it's modelled.
I understood the 3rd object file as being akin to the DLL. The process image pertains to the actual program after being loaded into the memory. If you want more information about all this go here
I got the info about the object files from there.
dinesh.
Even I have read about this. It must be interesting to find out exactly how it's modelled.
I understood the 3rd object file as being akin to the DLL. The process image pertains to the actual program after being loaded into the memory. If you want more information about all this go here
I got the info about the object files from there.
dinesh.
Re: Coder to Developer
This exact same argument can be applied to the Windows, Office and IE monopolies. Who is forcing you to use it?
The point is that once people get used to something and find it reasonably good, that satisfies their needs, they are reluctant to change.
Exactly my point. No one's forcing me, I use it because it serves a definite purpose for me, once it stops serving that purpose, I move on. What I don't whine about is the company not complying to my needs. If I disagree with something about the product I have a choice not to buy it, but I can't force the company to sell it my way. Thats not an option in a free society. My need cannot be claim on a company owned by someone. He is free to run it as he sees fit.
dinesh.
The point is that once people get used to something and find it reasonably good, that satisfies their needs, they are reluctant to change.
Exactly my point. No one's forcing me, I use it because it serves a definite purpose for me, once it stops serving that purpose, I move on. What I don't whine about is the company not complying to my needs. If I disagree with something about the product I have a choice not to buy it, but I can't force the company to sell it my way. Thats not an option in a free society. My need cannot be claim on a company owned by someone. He is free to run it as he sees fit.
dinesh.
Tuesday, May 25, 2004
Re: Stack
Great informative reply.
I guess I sort of confused the stack memory allocation with the allocation of variables in the program. For some reason I read the quote as saying that when the program is run, all the stack variables in the program will be allocated and initialized. That's obviously not what it meant. I guess it's the act of reserving memory for the stack and the book keeping like initializing the stack pointers, frame pointers etc...
I am not sure as to what happens exactly happens, when say new is used. The object created, is created on the heap, but maybe it is accessed through a pointer to it's memory address, stored somewhere locally by the operating system. Just check this out, not sure how it's implemented in C++.
Well, when you use "new", you get back the address of the object created on the heap. Generally you store that address in a local pointer variable, which is stored on the stack. I dunno if this was your doubt.
I suppose the big difference between the stack memory and the heap (free store) is that allocation on the stack takes constant time (its just a pointer increment and constructing) whereas allocation on the heap is not necessarily constant. It needs to find a large enough space to be able to hold the object. I've read that the heap is implemented as a linked list sort of data structure. Dyou know anything about this?
There are three main types of object files.
Great info again. I didn't realize there were different types of object files. I just thought after you compile, you get a .obj file and after you link you can a .exe. Could you elaborate on #3 a bit? I didn't understand what the dynamic linker was.
I sometimes think that to be a true great when it comes to C/C++, one has to have some compiler design experience, then only you can truly know all the small nuances associated with this language.
I feel like it's more curiousity than anything else. As in, I have this concept of a stack in my mind, but how exactly does it all come together? Also, how does the system find a large enough free space on the heap for allocation. This is all good to know info and I find it interesting, but you don't particularly need to know it to be productive with C++. But as you say, to be "great", yeah, that's a different story. Knowing the guts of how the system works is critical.
I think having a good background in OS would help a lot especially when it comes to memory issues cause it's the OS setting up everything. I agree with you regarding knowing what the compiler is doing. It might be pretty worthwhile to play around with the CFront compiler which compiles C++ code to C. Stan Lippman uses this technique in his book "The C++ Object Model".
I guess I sort of confused the stack memory allocation with the allocation of variables in the program. For some reason I read the quote as saying that when the program is run, all the stack variables in the program will be allocated and initialized. That's obviously not what it meant. I guess it's the act of reserving memory for the stack and the book keeping like initializing the stack pointers, frame pointers etc...
I am not sure as to what happens exactly happens, when say new is used. The object created, is created on the heap, but maybe it is accessed through a pointer to it's memory address, stored somewhere locally by the operating system. Just check this out, not sure how it's implemented in C++.
Well, when you use "new", you get back the address of the object created on the heap. Generally you store that address in a local pointer variable, which is stored on the stack. I dunno if this was your doubt.
I suppose the big difference between the stack memory and the heap (free store) is that allocation on the stack takes constant time (its just a pointer increment and constructing) whereas allocation on the heap is not necessarily constant. It needs to find a large enough space to be able to hold the object. I've read that the heap is implemented as a linked list sort of data structure. Dyou know anything about this?
There are three main types of object files.
Great info again. I didn't realize there were different types of object files. I just thought after you compile, you get a .obj file and after you link you can a .exe. Could you elaborate on #3 a bit? I didn't understand what the dynamic linker was.
I sometimes think that to be a true great when it comes to C/C++, one has to have some compiler design experience, then only you can truly know all the small nuances associated with this language.
I feel like it's more curiousity than anything else. As in, I have this concept of a stack in my mind, but how exactly does it all come together? Also, how does the system find a large enough free space on the heap for allocation. This is all good to know info and I find it interesting, but you don't particularly need to know it to be productive with C++. But as you say, to be "great", yeah, that's a different story. Knowing the guts of how the system works is critical.
I think having a good background in OS would help a lot especially when it comes to memory issues cause it's the OS setting up everything. I agree with you regarding knowing what the compiler is doing. It might be pretty worthwhile to play around with the CFront compiler which compiles C++ code to C. Stan Lippman uses this technique in his book "The C++ Object Model".
Re: Coder to Developer
Google is a non-coercive monopoly, so let them enjoy it. They certainly deserve it. In a non-coercive monopoly, people always have the choice not to make use of a service. No one's "forcing" people to use google, it just got that way because they are good.
This exact same argument can be applied to the Windows, Office and IE monopolies. Who is forcing you to use it? You have plenty of choices out there - All the *nix's, Mac, Open Office, Star Office, WordPerfect, Mozilla, Opera, Safari etc... Don't like Microsoft? You can get by fine without using them. Interoperability is becoming less of an issue everyday with competing products being able to read and produce MS file formats.
The point is that once people get used to something and find it reasonably good, that satisfies their needs, they are reluctant to change.
This exact same argument can be applied to the Windows, Office and IE monopolies. Who is forcing you to use it? You have plenty of choices out there - All the *nix's, Mac, Open Office, Star Office, WordPerfect, Mozilla, Opera, Safari etc... Don't like Microsoft? You can get by fine without using them. Interoperability is becoming less of an issue everyday with competing products being able to read and produce MS file formats.
The point is that once people get used to something and find it reasonably good, that satisfies their needs, they are reluctant to change.
Monday, May 24, 2004
Re: Stack
"The static storage area is simply a fixed patch of memory that is allocated before the program begins to run. Using the stack or static storage area places a priority on the speed of storage allocation and release, which can be valuable in some situations."
What does "allocated before the program is run" mean exactly? Does it just mean that the OS "reserves" some area of memory and uses that as a stack (keep pushing on the function calls etc... in this area) in a FILO manner? Whereas the heap is just another chunk but you are free to allocate anywhere.
I think the answer to your queries lies in reading up on segmentation. When segmentation is used, a program which has been loaded, is allocated different segments for different parts of it.
In it's most basic sense say a program gets three segments 1) Program Instructions 2) Data 3) Call Stack. This was the basis for bring forward segmentation, so that we could get rid of the 1-D paging systems. In the 1-D system, the program, data, stack et al fall on a single piece of contiguous memory, so things could cram up when they grow. Now going back to segments, the program mentioned earlier, would have say the following segments.
So yes, the local data in main() for a C/C++ program does get allocated when the program is loaded in memory. I am not sure as to what happens exactly happens, when say new is used. The object created, is created on the heap, but maybe it is accessed through a pointer to it's memory address, stored somewhere locally by the operating system. Just check this out, not sure how it's implemented in C++.
When the compiler compiles your C++ code, it generates native machine code right? Does the obj file only contain those instrutions?
There are three main types of object files.
1)A relocatable file holds code and data suitable for linking with other object files to create an executable or a shared object file.
2) An executable file holds a program suitable for execution; the file specifies how the execute call creates a program's process image.
3) A shared object file holds code and data suitable for linking in two contexts. First, the link editor processes the shared object file with other relocatable and shared object files to create another object file. Second, the dynamic linker combines it with an executable file and other shared objects to create a process image.
I hope that came close to answering your question, I'm not sure whether this is what you were looking for, so ask again if it was not.
I sometimes think that to be a true great when it comes to C/C++, one has to have some compiler design experience, then only you can truly know all the small nuances associated with this language.
dinesh.
What does "allocated before the program is run" mean exactly? Does it just mean that the OS "reserves" some area of memory and uses that as a stack (keep pushing on the function calls etc... in this area) in a FILO manner? Whereas the heap is just another chunk but you are free to allocate anywhere.
I think the answer to your queries lies in reading up on segmentation. When segmentation is used, a program which has been loaded, is allocated different segments for different parts of it.
In it's most basic sense say a program gets three segments 1) Program Instructions 2) Data 3) Call Stack. This was the basis for bring forward segmentation, so that we could get rid of the 1-D paging systems. In the 1-D system, the program, data, stack et al fall on a single piece of contiguous memory, so things could cram up when they grow. Now going back to segments, the program mentioned earlier, would have say the following segments.
| | | |
| | | | | |
| | | | | |
| | | | | |
Segemnt1 Segment2 Segment3
Program Data Call Stack
So yes, the local data in main() for a C/C++ program does get allocated when the program is loaded in memory. I am not sure as to what happens exactly happens, when say new is used. The object created, is created on the heap, but maybe it is accessed through a pointer to it's memory address, stored somewhere locally by the operating system. Just check this out, not sure how it's implemented in C++.
When the compiler compiles your C++ code, it generates native machine code right? Does the obj file only contain those instrutions?
There are three main types of object files.
1)A relocatable file holds code and data suitable for linking with other object files to create an executable or a shared object file.
2) An executable file holds a program suitable for execution; the file specifies how the execute call creates a program's process image.
3) A shared object file holds code and data suitable for linking in two contexts. First, the link editor processes the shared object file with other relocatable and shared object files to create another object file. Second, the dynamic linker combines it with an executable file and other shared objects to create a process image.
I hope that came close to answering your question, I'm not sure whether this is what you were looking for, so ask again if it was not.
I sometimes think that to be a true great when it comes to C/C++, one has to have some compiler design experience, then only you can truly know all the small nuances associated with this language.
dinesh.
Re: Coder to Developer
They've already started to somewhat monopolize the search market.
There are two types of monopolies, Coercive and Non-Coercive Monopolies. Google is a non-coercive monopoly, so let them enjoy it. They certainly deserve it. In a non-coercive monopoly, people always have the choice not to make use of a service. No one's "forcing" people to use google, it just got that way because they are good.
dinesh.
There are two types of monopolies, Coercive and Non-Coercive Monopolies. Google is a non-coercive monopoly, so let them enjoy it. They certainly deserve it. In a non-coercive monopoly, people always have the choice not to make use of a service. No one's "forcing" people to use google, it just got that way because they are good.
dinesh.
RSS
RSS is an acronym for a a couple of terms (dunno which one's official)... "Rich Site Summary" and "Really Simple Syndication". This is an xml standard for content aggregation. The idea is simple. Instead of going to different sites to see what new content is available, you get notified of what's new. This is made possible with the agreed upon format which is RSS. The idea has been there for a while with both Netscape and Microsoft coming up with their own formats, but it didn't take off until the RSS standard came about.
RSS can be used for any sort of content. Probably the most popular use of RSS will be from news sites as that content is ALWAYS being updated. But it is used for all sorts of stuff including comics and blogs. There is a rival format called "Atom" and Google has gotten behind that, so the Blogger feeds are in the "Atom" format. Infact codeword has a blog feed... http://codeword.blogspot.com/atom.xml.
You would need some sort of feed aggregator application to make use of the feeds. You give the app URL's to the site feeds (like the codeword feed). If you look at news sites like BBC or Slashdot, they will have a red graphic with the word "XML" on it. That's the feed URL for the site. As the content on the site is updated, the RSS document is updated. The feed aggregator app periodically checks this document and informs you that the content has been updated. So as an example, instead of visiting http://codeword.blogspot.com everyday to check if something new has been posted, the feed aggregator app will tell you. I use Abilon. It's very basic and does everything an aggregator would need to do.
It's such a simple concept. The only thing that was needed was a standard and now with RSS/Atom they have it. I really feel like it's a "killer app".
RSS can be used for any sort of content. Probably the most popular use of RSS will be from news sites as that content is ALWAYS being updated. But it is used for all sorts of stuff including comics and blogs. There is a rival format called "Atom" and Google has gotten behind that, so the Blogger feeds are in the "Atom" format. Infact codeword has a blog feed... http://codeword.blogspot.com/atom.xml.
You would need some sort of feed aggregator application to make use of the feeds. You give the app URL's to the site feeds (like the codeword feed). If you look at news sites like BBC or Slashdot, they will have a red graphic with the word "XML" on it. That's the feed URL for the site. As the content on the site is updated, the RSS document is updated. The feed aggregator app periodically checks this document and informs you that the content has been updated. So as an example, instead of visiting http://codeword.blogspot.com everyday to check if something new has been posted, the feed aggregator app will tell you. I use Abilon. It's very basic and does everything an aggregator would need to do.
It's such a simple concept. The only thing that was needed was a standard and now with RSS/Atom they have it. I really feel like it's a "killer app".
Sunday, May 23, 2004
Stack
I thought I had a clear idea about the Stack memory, but something popped in my head and now I'm confused. So hopefully you can clarify this.
"The static storage area is simply a fixed patch of memory that is allocated before the program begins to run. Using the stack or static storage area places a priority on the speed of storage allocation and release, which can be valuable in some situations."
What does "allocated before the program is run" mean exactly? Does it just mean that the OS "reserves" some area of memory and uses that as a stack (keep pushing on the function calls etc... in this area) in a FILO manner? Whereas the heap is just another chunk but you are free to allocate anywhere.
When the compiler compiles your C++ code, it generates native machine code right? Does the obj file only contain those instrutions?
"The static storage area is simply a fixed patch of memory that is allocated before the program begins to run. Using the stack or static storage area places a priority on the speed of storage allocation and release, which can be valuable in some situations."
What does "allocated before the program is run" mean exactly? Does it just mean that the OS "reserves" some area of memory and uses that as a stack (keep pushing on the function calls etc... in this area) in a FILO manner? Whereas the heap is just another chunk but you are free to allocate anywhere.
When the compiler compiles your C++ code, it generates native machine code right? Does the obj file only contain those instrutions?
Re: Coder to Developer
What the hell happened to the blogs interface, I do not like this new one.
They upgraded the entire system recenty. Check out The Great Blogger Relaunch
What impression dyou have of Google? They're everywhere nowdays and keeps getting billed as the the hottest company on earth (at the moment). Everything they do is something unique and different - either in coming up with something new or improving on stuff thats already out there. They also have the "DO NO EVIL" policy which they publicized when they announced they were going public.
But how long dyou think this will last? I feel the more successful they get they'll acquire a more of a Microsoft image. They've already started to somewhat monopolize the search market. The market share won't statistically prove that, but c'mmon "to google" has become a verb in common lingo. With everyone relying on google for their information/search needs, the search engine market is fast resembling the OS market. It's also becoming a situation where people start thing, if you can't find it with Google, you can't find it anywhere else. They're even planning on "Puffin" - a search product for your local machine.
Also, as they head towards becoming a public company, they're driving force will be to generate more income/profits to satiate their share holders. They're ads will get more prominent. They've been very smart about it and have clearly been mindful of it until now, with not making it intrusive. But I read somewhere recently they were experimenting with graphic ads. It will be interesting to see where they are and how they are perceived in another 5 years. What dyou feel?
Just want to make clear that I really like google and all the services they provide. They definitely do have the best search out there - personally I have the most success with them. Also the GMail interface is fantastic - probably the most innovation that's occured in that area in a LONG time. But I just feel like this "darling" image everyone has of Google (including themselves) cannot last forever.
They upgraded the entire system recenty. Check out The Great Blogger Relaunch
What impression dyou have of Google? They're everywhere nowdays and keeps getting billed as the the hottest company on earth (at the moment). Everything they do is something unique and different - either in coming up with something new or improving on stuff thats already out there. They also have the "DO NO EVIL" policy which they publicized when they announced they were going public.
But how long dyou think this will last? I feel the more successful they get they'll acquire a more of a Microsoft image. They've already started to somewhat monopolize the search market. The market share won't statistically prove that, but c'mmon "to google" has become a verb in common lingo. With everyone relying on google for their information/search needs, the search engine market is fast resembling the OS market. It's also becoming a situation where people start thing, if you can't find it with Google, you can't find it anywhere else. They're even planning on "Puffin" - a search product for your local machine.
Also, as they head towards becoming a public company, they're driving force will be to generate more income/profits to satiate their share holders. They're ads will get more prominent. They've been very smart about it and have clearly been mindful of it until now, with not making it intrusive. But I read somewhere recently they were experimenting with graphic ads. It will be interesting to see where they are and how they are perceived in another 5 years. What dyou feel?
Just want to make clear that I really like google and all the services they provide. They definitely do have the best search out there - personally I have the most success with them. Also the GMail interface is fantastic - probably the most innovation that's occured in that area in a LONG time. But I just feel like this "darling" image everyone has of Google (including themselves) cannot last forever.
Tuesday, May 18, 2004
Monday, May 10, 2004
Re: Coder to Developer
I just feel like once we have been exposed to this stuff, we are left on a ledge somewhere to our own devices. Without knowing why or where they could be applicable. Some stuff I'm learning in Automata Theory seems quite interesting. It's just a very frustrating learning experience because I have no idea when, where or why I would use it. And that just makes you dislike the subject. This has been my experience in all such classes. It's not a one off deal.
Damn well put. I know exactly what you mean, some things are just not fathomable unless you see how it applies in reality. I think Tanenbaum in his operating systems book, makes a statement that " ... some of it is of no use, other than maybe keeping a few graph theorists employed" :). I remember laughing so much when i read that, i don't remember precisely what he was talking about, but in the context it was really funny. Sometimes, I almost come to believe it's true. I'm sure I will come across this in the future too, when i do more in AI, though personally,i want to be a master at both theory and practice :):)
dinesh.
p.s. - What the hell happened to the blogs interface, I do not like this new one.
Damn well put. I know exactly what you mean, some things are just not fathomable unless you see how it applies in reality. I think Tanenbaum in his operating systems book, makes a statement that " ... some of it is of no use, other than maybe keeping a few graph theorists employed" :). I remember laughing so much when i read that, i don't remember precisely what he was talking about, but in the context it was really funny. Sometimes, I almost come to believe it's true. I'm sure I will come across this in the future too, when i do more in AI, though personally,i want to be a master at both theory and practice :):)
dinesh.
p.s. - What the hell happened to the blogs interface, I do not like this new one.
Sunday, May 09, 2004
Re: Coder to Developer
Thing is that there is nothing inherently bad with "theoritical stuff". The reason it works in practice is because it is sound in theory in the first place.
I completely agree with you. I feel like with my tirades on theoretical stuff, I've given a wrong impression that I think they are totally useless. They are not. On the contracty. They are VERY important.
It's just that colleges tend to stop at theory without showing you how it applies or how we are supposed to apply it in physical reality.
Another excellent point. I just feel like once we have been exposed to this stuff, we are left on a ledge somewhere to our own devices. Without knowing why or where they could be applicable. Some stuff I'm learning in Automata Theory seems quite interesting. It's just a very frustrating learning experience because I have no idea when, where or why I would use it. And that just makes you dislike the subject. This has been my experience in all such classes. It's not a one off deal.
I realize this stuff is important since it forms the basis of CS. But at the same time, I also see that most people pursuing a CS degree are in it cause of the practical stuff. They want to learn stuff they will use in the real world. It's like the 80/20 rule. Focus on practical classes like software design, testing, good coding practices etc... that 80% will find useful and leave the heavy scientific stuff to the 20% who do want to work on the mathematical/research stuff.
I completely agree with you. I feel like with my tirades on theoretical stuff, I've given a wrong impression that I think they are totally useless. They are not. On the contracty. They are VERY important.
It's just that colleges tend to stop at theory without showing you how it applies or how we are supposed to apply it in physical reality.
Another excellent point. I just feel like once we have been exposed to this stuff, we are left on a ledge somewhere to our own devices. Without knowing why or where they could be applicable. Some stuff I'm learning in Automata Theory seems quite interesting. It's just a very frustrating learning experience because I have no idea when, where or why I would use it. And that just makes you dislike the subject. This has been my experience in all such classes. It's not a one off deal.
I realize this stuff is important since it forms the basis of CS. But at the same time, I also see that most people pursuing a CS degree are in it cause of the practical stuff. They want to learn stuff they will use in the real world. It's like the 80/20 rule. Focus on practical classes like software design, testing, good coding practices etc... that 80% will find useful and leave the heavy scientific stuff to the 20% who do want to work on the mathematical/research stuff.
Re: Coder to Developer
Thing is that there is nothing inherently bad with "theoritical stuff". The reason it works in practice is because it is sound in theory in the first place. It's just that colleges tend to stop at theory without showing you how it applies or how we are supposed to apply it in physical reality. Go through any college course and most of it is about mathematical formalism (things like your NP completeness or in physics - strings theory), rather than basing views on reality. That is what i think is wrong with most college courses.
dinesh.
dinesh.
Thursday, May 06, 2004
Re: Coder to Developer
"The more you know, the less you feel you know".
I read this quote somewhere (dunno if that's the exact quote), but I feel it applies pretty well to the topic. It's about relativity. The more you know, the more you read, the broader picture you get of what's out there. It's only then dyou realize how little you actually know comparatively.
Looking at job requirements and seeing the amount of stuff a potential candidate needs to know is a pretty huge humbling experience. I agree with everything he said about colleges not teaching the "good" practical stuff. It's almost as if he read my mind about that subject. It goes back to a discussion we had a while back about "theoretical crap" (my term) vs real world stuff.
I read this quote somewhere (dunno if that's the exact quote), but I feel it applies pretty well to the topic. It's about relativity. The more you know, the more you read, the broader picture you get of what's out there. It's only then dyou realize how little you actually know comparatively.
Looking at job requirements and seeing the amount of stuff a potential candidate needs to know is a pretty huge humbling experience. I agree with everything he said about colleges not teaching the "good" practical stuff. It's almost as if he read my mind about that subject. It goes back to a discussion we had a while back about "theoretical crap" (my term) vs real world stuff.
Coder to Developer
There's a new book out called "Coder to Developer". The reviews have been overwhelming good. Anyway, the guy who wrote the foreword, posted it on his blog...
-----------------------------------------
You know what drives me crazy?
“Everything?” you ask. Well, OK, some of you know me a bit too well by now.
But seriously, folks, what drives me crazy is that most software developers don’t realize just how little they know about software development.
Take, for example, me.
When I was a teenager, as soon as I finished reading Peter Norton’s famous guide to programming the IBM-PC in Assembler, I was convinced that I knew everything there was to know about software development in general. Heck, I was ready to start a software company to make a word processor, you see, and it was going to be really good. My imaginary software company was going to have coffee breaks with free donuts every hour. A lot of my daydreams in those days involved donuts.
When I got out of the army, I headed off to college and got a degree in Computer Science. Now I really knew everything. I knew more than everything, because I had learned a bunch of computer-scientific junk about linear algebra and NP completeness and frigging lambda calculus which was obviously useless, so I thought they must have run out of useful things to teach us and were scraping the bottom of the barrel.
Nope. At my first job I noticed how many things there are that many Computer Science departments are too snooty to actually teach you. Things like software teamwork. Practical advice about user interface design. Professional tools like source code control, bug tracking databases, debuggers and profilers. Business things. Computer Science departments in the most prestigious institutions just won’t teach you this stuff because they consider it “vocational,” not academic; the kind of thing that high school dropouts learn at the local technical institute so they can have a career as an auto mechanic, or an air-conditioner repairman, or a (holding nose between thumb and forefinger) “software developer.”
I can sort of understand that attitude. After all, many prestigious undergraduate institutions see their goal as preparing you for life, not teaching you a career, least of all a career in a field that changes so rapidly any technologies you learn now will be obsolete in a decade.
Over the next decade I proceeded to learn an incredible amount about software development and all the things it takes to produce software. I worked at Microsoft on the Excel team, at Viacom on the web team, and at Juno on their email client. And, you know what? At every point in the learning cycle, I was completely convinced that I knew everything there was to know about software development.
“Maybe you’re just an arrogant sod?” you ask, possibly using an even spicier word than “sod.” I beg your pardon: this is my foreword; if you want to be rude write your own damn foreword, tear mine out of the book, and put yours in instead.
There’s something weird about software development, some mystical quality, that makes all kinds of people think they know how to do it. I’ve worked at dotcom-type companies full of liberal arts majors with no software experience or training who nevertheless were convinced that they knew how to manage software teams and design user interfaces. This is weird, because nobody thinks they know how to remove a burst appendix, or rebuild a car engine, unless they actually know how to do it, but for some reason there are all these people floating around who think they know everything there is to know about software development.
Anyway, the responsibility is going to fall on your shoulders. You’re probably going to have to learn how to do software development on your own. If you’re really lucky, you’ve had some experience working directly with top notch software developers who can teach you this stuff, but most people don’t have that opportunity. So I’m glad to see that Mike Gunderloy has taken upon himself to write the book you hold in your hands. Here you will find a well-written and enjoyable introduction to many of the most important things that you’re going to need to know as you move from being a person who can write code to being a person who can develop software. Do those sound like the same thing? They’re not. That’s roughly the equivalent of going from being a six year old who can crayon some simple words, backwards N’s and all, to being a successful novelist who writes books that receive rave reviews and sell millions of copies. Being a software developer means you can take a concept, build a team, set up state of the art development processes, design a software product, the right software product, and produce it. Not just any software product: a high quality software product that solves a problem and delights your users. With documentation. A web page. A setup program. Test cases. Norwegian versions. BokmÃ¥l and Nynorsk. Appetizers, dessert, and twenty seven eight-by-ten color glossy photographs with circles and arrows and a paragraph on the back of each one explaining what each one was. (Apologies to Arlo Guthrie.)
And then, one day, finally, perhaps when it’s too late, you’ll wake up and say, “Hmm. Maybe I really don’t know what it really takes to develop software.” And on that day only, and not one minute before, but on that day and from that day forward, you will have earned the right to call yourself a software developer. In the meantime, all is not lost: you still have my blessing if you want to eat donuts every hour.
----------------------------------------------------------------------
-----------------------------------------
You know what drives me crazy?
“Everything?” you ask. Well, OK, some of you know me a bit too well by now.
But seriously, folks, what drives me crazy is that most software developers don’t realize just how little they know about software development.
Take, for example, me.
When I was a teenager, as soon as I finished reading Peter Norton’s famous guide to programming the IBM-PC in Assembler, I was convinced that I knew everything there was to know about software development in general. Heck, I was ready to start a software company to make a word processor, you see, and it was going to be really good. My imaginary software company was going to have coffee breaks with free donuts every hour. A lot of my daydreams in those days involved donuts.
When I got out of the army, I headed off to college and got a degree in Computer Science. Now I really knew everything. I knew more than everything, because I had learned a bunch of computer-scientific junk about linear algebra and NP completeness and frigging lambda calculus which was obviously useless, so I thought they must have run out of useful things to teach us and were scraping the bottom of the barrel.
Nope. At my first job I noticed how many things there are that many Computer Science departments are too snooty to actually teach you. Things like software teamwork. Practical advice about user interface design. Professional tools like source code control, bug tracking databases, debuggers and profilers. Business things. Computer Science departments in the most prestigious institutions just won’t teach you this stuff because they consider it “vocational,” not academic; the kind of thing that high school dropouts learn at the local technical institute so they can have a career as an auto mechanic, or an air-conditioner repairman, or a (holding nose between thumb and forefinger) “software developer.”
I can sort of understand that attitude. After all, many prestigious undergraduate institutions see their goal as preparing you for life, not teaching you a career, least of all a career in a field that changes so rapidly any technologies you learn now will be obsolete in a decade.
Over the next decade I proceeded to learn an incredible amount about software development and all the things it takes to produce software. I worked at Microsoft on the Excel team, at Viacom on the web team, and at Juno on their email client. And, you know what? At every point in the learning cycle, I was completely convinced that I knew everything there was to know about software development.
“Maybe you’re just an arrogant sod?” you ask, possibly using an even spicier word than “sod.” I beg your pardon: this is my foreword; if you want to be rude write your own damn foreword, tear mine out of the book, and put yours in instead.
There’s something weird about software development, some mystical quality, that makes all kinds of people think they know how to do it. I’ve worked at dotcom-type companies full of liberal arts majors with no software experience or training who nevertheless were convinced that they knew how to manage software teams and design user interfaces. This is weird, because nobody thinks they know how to remove a burst appendix, or rebuild a car engine, unless they actually know how to do it, but for some reason there are all these people floating around who think they know everything there is to know about software development.
Anyway, the responsibility is going to fall on your shoulders. You’re probably going to have to learn how to do software development on your own. If you’re really lucky, you’ve had some experience working directly with top notch software developers who can teach you this stuff, but most people don’t have that opportunity. So I’m glad to see that Mike Gunderloy has taken upon himself to write the book you hold in your hands. Here you will find a well-written and enjoyable introduction to many of the most important things that you’re going to need to know as you move from being a person who can write code to being a person who can develop software. Do those sound like the same thing? They’re not. That’s roughly the equivalent of going from being a six year old who can crayon some simple words, backwards N’s and all, to being a successful novelist who writes books that receive rave reviews and sell millions of copies. Being a software developer means you can take a concept, build a team, set up state of the art development processes, design a software product, the right software product, and produce it. Not just any software product: a high quality software product that solves a problem and delights your users. With documentation. A web page. A setup program. Test cases. Norwegian versions. BokmÃ¥l and Nynorsk. Appetizers, dessert, and twenty seven eight-by-ten color glossy photographs with circles and arrows and a paragraph on the back of each one explaining what each one was. (Apologies to Arlo Guthrie.)
And then, one day, finally, perhaps when it’s too late, you’ll wake up and say, “Hmm. Maybe I really don’t know what it really takes to develop software.” And on that day only, and not one minute before, but on that day and from that day forward, you will have earned the right to call yourself a software developer. In the meantime, all is not lost: you still have my blessing if you want to eat donuts every hour.
----------------------------------------------------------------------
Tuesday, April 27, 2004
GMail
"As an active Blogger user, we would like to invite you to be one of the first to try out Google's new email service, Gmail."
See, it pays to blog! BTW, you can mail me at mohn3310@GMAIL.com if you want ;-)
See, it pays to blog! BTW, you can mail me at mohn3310@GMAIL.com if you want ;-)
Monday, April 26, 2004
Re: AOP (some other day)
Check out Aspect Oriented Programming (AOP): Using AspectJ to implement and enforce coding standards for some more info on AOP and some examples.
Saturday, April 24, 2004
Re: AOP (some other day)
an article was recently posted on onjava.com explaining declarative programming. first the article explains annotations in java. in the second part 'Attributes in .NET Vs. Annotations in Java' are compared. the last difference is context attributes which are not implemented in java, but are in .net. AOP is supposed to be context attributes. this should clear a bit of the confusion. also post the next 'A Little Goes a Long Way' column whenever.
this i would say was the n'th major goof up on my side. i have never worked on AOP or annotations which led to some confusion. to be frank i still do not have a clear idea how all work. been quite some time not done any real programming. just reading stuff here and there. need to buy a book on java 1.5 soon. pass any recommendations. so final exams of engineering starting very soon. after that going to be a free man, and then - i'll be back. not that i'll not be bloging but beware of the 'exception'al blogs.
this i would say was the n'th major goof up on my side. i have never worked on AOP or annotations which led to some confusion. to be frank i still do not have a clear idea how all work. been quite some time not done any real programming. just reading stuff here and there. need to buy a book on java 1.5 soon. pass any recommendations. so final exams of engineering starting very soon. after that going to be a free man, and then - i'll be back. not that i'll not be bloging but beware of the 'exception'al blogs.
Thursday, April 22, 2004
Cleaner, more elegant, and wrong (Exceptions)
From MS Dev Blog...
-------------------------
Just because you can't see the error path doesn't mean it doesn't exist.
Here's a snippet from a book on C# programming, taken from the chapter on how great exceptions are.
try {
AccessDatabase accessDb = new AccessDatabase();
accessDb.GenerateDatabase();
} catch (Exception e) {
// Inspect caught exception
}
public void GenerateDatabase()
{
CreatePhysicalDatabase();
CreateTables();
CreateIndexes();
}
Notice how much cleaner and more elegant [this] solution is.
Cleaner, more elegant, and wrong.
Suppose an exception is thrown during CreateIndexes(). The GenerateDatabase() function doesn't catch it, so the error is thrown back out to the caller, where it is caught.
But when the exception left GenerateDatabase(), important information was lost: The state of the database creation. The code that catches the exception doesn't know which step in database creation failed. Does it need to delete the indexes? Does it need to delete the tables? Does it need to delete the physical database? It doesn't know.
So if there is a problem creating CreateIndexes(), you leak a physical database file and a table forever. (Since these are presumably files on disk, they hang around indefinitely.)
Writing correct code in the exception-throwing model is in a sense harder than in an error-code model, since anythingcan fail, and you have to be ready for it. In an error-code model, it's obvious when you have to check for errors: When you get an error code. In an exception model, you just have to know that errors can occur anywhere.
In other words, in an error-code model, it is obvious when somebody failed to handle an error: They didn't check the error code. But in an exception-throwing model, it is not obvious from looking at the code whether somebody handled the error, since the error is not explicit.
Consider the following:
Guy AddNewGuy(string name)
{
Guy guy = new Guy(name);
AddToLeague(guy);
guy.Team = ChooseRandomTeam();
return guy;
}
This function creates a new Guy, adds him to the league, and assigns him to a team randomly. How can this be simpler?
Remember: Every line is a possible error.
What if an exception is thrown by "new Guy(name)"?
Well, fortunately, we haven't yet started doing anything, so no harm done.
What if an exception is thrown by "AddToLeague(guy)"?
The "guy" we created will be abandoned, but the GC will clean that up.
What if an exception is thrown by "guy.Team = ChooseRandomTeam()"?
Uh-oh, now we're in trouble. We already added the guy to the league. If somebody catches this exception, they're going to find a guy in the league who doesn't belong to any team. If there's some code that walks through all the members of the league and uses the guy.Team member, they're going to take a NullReferenceException since guy.Team isn't initialized yet.
When you're writing code, do you think about what the consequences of an exception would be if it were raised by each line of code? You have to do this if you intend to write correct code.
Okay, so how to fix this? Reorder the operations.
Guy AddNewGuy(string name)
{
Guy guy = new Guy(name);
guy.Team = ChooseRandomTeam();
AddToLeague(guy);
return guy;
}
This seemingly insignificant change has a big effect on error recovery. By delaying the commitment of the data (adding the guy to the league), any exceptions taken during the construction of the guy do not have any lasting effect. All that happens is that a partly-constructed guy gets abandoned and eventually gets cleaned up by GC.
General design principle: Don't commit data until they are ready.
Of course, this example was rather simple since the steps in setting up the guy had no side-effects. If something went wrong during set-up, we could just abandon the guy and let the GC handle the cleanup.
In the real world, things are a lot messier. Consider the following:
Guy AddNewGuy(string name)
{
Guy guy = new Guy(name);
guy.Team = ChooseRandomTeam();
guy.Team.Add(guy);
AddToLeague(guy);
return guy;
}
This does the same thing as our corrected function, except that somebody decided that it would be more efficient if each team kept a list of members, so you have to add yourself to the team you intend to join. What consequences does this have on the function's correctness?
---------------------------
-------------------------
Just because you can't see the error path doesn't mean it doesn't exist.
Here's a snippet from a book on C# programming, taken from the chapter on how great exceptions are.
try {
AccessDatabase accessDb = new AccessDatabase();
accessDb.GenerateDatabase();
} catch (Exception e) {
// Inspect caught exception
}
public void GenerateDatabase()
{
CreatePhysicalDatabase();
CreateTables();
CreateIndexes();
}
Notice how much cleaner and more elegant [this] solution is.
Cleaner, more elegant, and wrong.
Suppose an exception is thrown during CreateIndexes(). The GenerateDatabase() function doesn't catch it, so the error is thrown back out to the caller, where it is caught.
But when the exception left GenerateDatabase(), important information was lost: The state of the database creation. The code that catches the exception doesn't know which step in database creation failed. Does it need to delete the indexes? Does it need to delete the tables? Does it need to delete the physical database? It doesn't know.
So if there is a problem creating CreateIndexes(), you leak a physical database file and a table forever. (Since these are presumably files on disk, they hang around indefinitely.)
Writing correct code in the exception-throwing model is in a sense harder than in an error-code model, since anythingcan fail, and you have to be ready for it. In an error-code model, it's obvious when you have to check for errors: When you get an error code. In an exception model, you just have to know that errors can occur anywhere.
In other words, in an error-code model, it is obvious when somebody failed to handle an error: They didn't check the error code. But in an exception-throwing model, it is not obvious from looking at the code whether somebody handled the error, since the error is not explicit.
Consider the following:
Guy AddNewGuy(string name)
{
Guy guy = new Guy(name);
AddToLeague(guy);
guy.Team = ChooseRandomTeam();
return guy;
}
This function creates a new Guy, adds him to the league, and assigns him to a team randomly. How can this be simpler?
Remember: Every line is a possible error.
What if an exception is thrown by "new Guy(name)"?
Well, fortunately, we haven't yet started doing anything, so no harm done.
What if an exception is thrown by "AddToLeague(guy)"?
The "guy" we created will be abandoned, but the GC will clean that up.
What if an exception is thrown by "guy.Team = ChooseRandomTeam()"?
Uh-oh, now we're in trouble. We already added the guy to the league. If somebody catches this exception, they're going to find a guy in the league who doesn't belong to any team. If there's some code that walks through all the members of the league and uses the guy.Team member, they're going to take a NullReferenceException since guy.Team isn't initialized yet.
When you're writing code, do you think about what the consequences of an exception would be if it were raised by each line of code? You have to do this if you intend to write correct code.
Okay, so how to fix this? Reorder the operations.
Guy AddNewGuy(string name)
{
Guy guy = new Guy(name);
guy.Team = ChooseRandomTeam();
AddToLeague(guy);
return guy;
}
This seemingly insignificant change has a big effect on error recovery. By delaying the commitment of the data (adding the guy to the league), any exceptions taken during the construction of the guy do not have any lasting effect. All that happens is that a partly-constructed guy gets abandoned and eventually gets cleaned up by GC.
General design principle: Don't commit data until they are ready.
Of course, this example was rather simple since the steps in setting up the guy had no side-effects. If something went wrong during set-up, we could just abandon the guy and let the GC handle the cleanup.
In the real world, things are a lot messier. Consider the following:
Guy AddNewGuy(string name)
{
Guy guy = new Guy(name);
guy.Team = ChooseRandomTeam();
guy.Team.Add(guy);
AddToLeague(guy);
return guy;
}
This does the same thing as our corrected function, except that somebody decided that it would be more efficient if each team kept a list of members, so you have to add yourself to the team you intend to join. What consequences does this have on the function's correctness?
---------------------------
Architecture
Pretty good interview with a software design consultant/ author on artima.com covering wide range of topics. http://www.artima.com/intv/license.html
Especially liked "Becoming an Architect"
Especially liked "Becoming an Architect"
Re: AOP (again)
Is the Java implementation a standard? If not, is it going to be incorporated into it in the next to next version?
stuff like Aspectj will never be a standard. these are just third party libraries for doing advanced stuff in java. there are other implementations of AOP like javaassist. this is one of the strengths of java. so many additional development tools/frameworks have been built. there are other solutions which directly compete with the standard API's. like the velocity project by jakarta-apache is an alternative to JSP. or in most cases, additional missing functionlity libraries are developed. like java had no framework analogous to webforms. struts was developed by jakarta-apache to create true MVC web apps. in JSP, HTML and java get terribly mixed. now, JSF is being finally created which uses many ideas from struts. some other projects are spring, hibernate etc. also most of these are on the J2EE front and open source, not GPL. so lots of work being done by the java community. are there many non-standard API's in .NET?
, but need to reach a level of competancy that I can actually contribute something useful instead of just introducing bugs. I actually don't really know how the Open Source Development model works. Do you? It ultimately comes down to one group that is in charge doesn't it? They control the releases etc... Just like the main kernel group. How does your avg joe contribute... for big apps?
the avg joe does mostly provide only bugs. but the average joe can learn more to become a hacker and really contribute. it is a learning process. for smaller apps, of what i have read, there is mostly a small dedicated group of one/two devs who really make the project. when s dev looses interest and another group emerges, control is shifted. very democratic on nature. eric raymond has written a book on this topic - The Cathedral and the Bazaar. which is a must read ( i still have to ). it explains the open source dev model, and hopefully the revenue aspect as well. but for bigger apps, affiliated to co's it must be more regulated ( politte way to say controlled ).
stuff like Aspectj will never be a standard. these are just third party libraries for doing advanced stuff in java. there are other implementations of AOP like javaassist. this is one of the strengths of java. so many additional development tools/frameworks have been built. there are other solutions which directly compete with the standard API's. like the velocity project by jakarta-apache is an alternative to JSP. or in most cases, additional missing functionlity libraries are developed. like java had no framework analogous to webforms. struts was developed by jakarta-apache to create true MVC web apps. in JSP, HTML and java get terribly mixed. now, JSF is being finally created which uses many ideas from struts. some other projects are spring, hibernate etc. also most of these are on the J2EE front and open source, not GPL. so lots of work being done by the java community. are there many non-standard API's in .NET?
, but need to reach a level of competancy that I can actually contribute something useful instead of just introducing bugs. I actually don't really know how the Open Source Development model works. Do you? It ultimately comes down to one group that is in charge doesn't it? They control the releases etc... Just like the main kernel group. How does your avg joe contribute... for big apps?
the avg joe does mostly provide only bugs. but the average joe can learn more to become a hacker and really contribute. it is a learning process. for smaller apps, of what i have read, there is mostly a small dedicated group of one/two devs who really make the project. when s dev looses interest and another group emerges, control is shifted. very democratic on nature. eric raymond has written a book on this topic - The Cathedral and the Bazaar. which is a must read ( i still have to ). it explains the open source dev model, and hopefully the revenue aspect as well. but for bigger apps, affiliated to co's it must be more regulated ( politte way to say controlled ).
Re: More balls through Windows
can't agree more with the stuff mohn wrote on windows vs linux bugs. a lot depends on the users of the OS how computer aware they are.
The other thing is my theory of why Linux will never reach high popularity on the desktop. It seems like Linux is a "cult" right now and those who are part of it are happy to be in on it.
linux is becoming more like windows evryday especially with the GUI. a lot of devs realise that linux is not as user-friendly and are fixing that. there is a definite cult, but no one can really be dis-satisfied because customization is possible. there are so many distro's available each for a different level of users. many super geeks still stick to console only. win users start of with mandrake/ fedora, then learn more. it's all about choice.
another major factor is the push towards linux by co's like ibm. ibm has recently started advertising tv on linux. and it is increasing awareness. 2 or 3 guys from college asked me about linux after the ad's. i would not have had this discussion more than a year ago. linux has reached a major level of maturity on the servers. the next level although slower will be on the desktop. maybe this will be more pronounced in developing countries like india. but seriously, from a consumers point of view don't we prefer open standards? with maturity, linux has only one way to go, up!!
The other thing is my theory of why Linux will never reach high popularity on the desktop. It seems like Linux is a "cult" right now and those who are part of it are happy to be in on it.
linux is becoming more like windows evryday especially with the GUI. a lot of devs realise that linux is not as user-friendly and are fixing that. there is a definite cult, but no one can really be dis-satisfied because customization is possible. there are so many distro's available each for a different level of users. many super geeks still stick to console only. win users start of with mandrake/ fedora, then learn more. it's all about choice.
another major factor is the push towards linux by co's like ibm. ibm has recently started advertising tv on linux. and it is increasing awareness. 2 or 3 guys from college asked me about linux after the ad's. i would not have had this discussion more than a year ago. linux has reached a major level of maturity on the servers. the next level although slower will be on the desktop. maybe this will be more pronounced in developing countries like india. but seriously, from a consumers point of view don't we prefer open standards? with maturity, linux has only one way to go, up!!
Tuesday, April 20, 2004
Wiki
Have you heard of "Wiki"? If not, THIS should explain it.
It's a pretty cool concept - very "open source-ish". I just came across a site for .NET interop with native Windows functions (called P/Invoke i.e. Platform Invoke) - http://pinvoke.net/. You can actually add content to each function just by double clicking anywhere on the page.
There's even a wiki encycopedia called Wikipedia.
It's a pretty cool concept - very "open source-ish". I just came across a site for .NET interop with native Windows functions (called P/Invoke i.e. Platform Invoke) - http://pinvoke.net/. You can actually add content to each function just by double clicking anywhere on the page.
There's even a wiki encycopedia called Wikipedia.
Sunday, April 18, 2004
Re: GMail
http://www.oreillynet.com/pub/wlg/4707
Great blog by Tim O'Reilly about GMail privacy issues. He goes on to much broader topics including future directions of OSs.
Great blog by Tim O'Reilly about GMail privacy issues. He goes on to much broader topics including future directions of OSs.
Saturday, April 17, 2004
Re: AOP (again)
Came across an article on Windows Dev Network site. The site requires a login, so just copying the content here. The author is part of the team that develops AspectJ. Again, I noticed that he talks of attributes and then will lead into AOP... so they are quite interconnected.
--------------------------------
A Little Goes a Long Way
Attributes in C# and annotations in Java provide a hook for principled macros and metaprogramming in the C family. Lisp has had this technology for years, offering many lessons.
By Gregor Kiczales
C# attributes and annotations in Java’s upcoming JDK 1.5—both hereafter called tags—provide the basic hook for adopting a range of useful meta-programming techniques. Tags are new to these C-syntax languages, and we’re starting to see their adoption by programmers, tools and APIs. Lisp has had technology like this for years, so it’s worth looking back to see what 30-plus years of experience can teach us.
The Lisp family of languages has always had the upper hand on macros. Lisp’s macro technology is powerful and principled; thus, Lisp users have developed a rich practice of when and how to use macros to good advantage.
Reading this, you may be thinking “Macros—aargh! Macros are terrible!” C’s text-based macros are so fragile that for many people, the term has developed very negative connotations.
The first lesson is that in Lisp, the term macros has never meant what it does in C. Lisp macros are syntactic: They operate on the program abstract syntax tree (AST) after parsing. This gives the macros a higher—and more principled—level from which to operate. By their nature, syntactic macros produce well-formed programs, which makes them inherently easier to understand and debug than text-based macros.
C# attributes and Java annotations are not themselves a macro facility, but because they’re parsable, they inherently support syntactic macros: They have already adopted Lisp’s first lesson.
After years of experience with syntactic macros, a further enhancement called hygienic macros emerged. Hygienic macros gave macro writers tools that automatically dealt with such issues as preventing name capture, importing definitions from other packages and the like. These issues are also critically important for C# and Java, and should find their way into the macro- and bytecode-editing toolkits.
Two Positions for Tags
The tags that support macros can potentially appear in evaluated and nonevaluated positions. An evaluated position means that the tag appears somewhere you’d expect it to be evaluated (compiled first, of course). A non-evaluated position means that, by default, you’d expect the annotation to be just an attribute of the declaration.
In Lisp, almost every position is evaluated, so, for a number of years, Lisp macros used only evaluated-position tags. But in the 1980s, the declare syntax was added, providing a nonevaluated position for tags.
C# attributes and Java annotations can appear in a number of positions (the two mechanisms differ slightly on this), but for now, just consider that they can appear before any declaration.
“Macro and Attribute Syntax” compares tag appearance in Lisp and C#, listing three Lisp implementations of a procedure that updates a record, along with two C# implementations. All five examples wrap the core update functionality in a transaction. In the left column, the transaction code appears explicitly in the procedure. In the top center, in Lisp, an evaluated-position macro is used to wrap the transaction code. In the third column, an annotation declares that the body should be in a transaction. The corresponding Java code looks very similar to the C#, but with a tag syntax of @Transactional.
Metadata
In Lisp, the declare tag was commonly used for simple metadata tagging; say, telling the editor how to indent code, or to provide different kinds of documentation. Similarly, in C# and Java, attributes have been used at their basic level for metadata that simply labels or decorates a program; typical examples include deployment descriptions, documentation and cross-referencing code with UML tools. These tags can also be used to name anonymous procedures or classes—in Lisp, the named-lambda macro was used for this. (Next month, we’ll see a powerful synergy between this use of tags and AOP.)
Simple Semantic Extensions
By default, tags have no semantic effect—in this way, they differ from Lisp macros—but this doesn’t mean that attributes can’t have semantic effect. A preprocessor can read the source code and make additions or changes as directed by the attributes. Alternatively, the compiler can preserve the tags, and then a postprocessor can read the bytecode and manipulate it as directed by the tags. Both of these have the essential properties of syntactic macros.
A simple example of a semantic extension is a tag that says something like “Generate getter and setter methods for a field,” or “Generate value-checking code for a field or parameter” (such as [Positive] to ensure an integer is positive). There are already products that provide this kind of functionality for C# and Visual Studio, and doubtless Java will soon see similar tools.
Beware Macro Overload
Lisp history also teaches us the important lesson that a little goes a long way when using semantic extensions—in the Lisp world, it was common for macro tyros to define a slew of them. It was great fun—it made their code shorter, and, to them, clearer. I was as guilty of this as anyone; for about three months, I tormented colleagues with my extreme use of macrolet, which allowed a kind of nested macro.
The problem with an abundance of semantic extensions is exactly the same as the feature—it leaves lots of little languages floating around. Lisp’s history in this respect has taught us that people found it unduly difficult to read each other’s code: Imagine reading C# code with lists of attributes longer than the method bodies, or just with as many different attributes as the underlying API.
New languages should be defined sparingly, only when they make a big difference to code clarity, and when it’s likely that any future reader of the code will easily understand it. Extensions to define getters and setters are probably reasonable. Extensions to deal with a focused and well-defined element of domain knowledge may be reasonable. Widespread use of semantic extensions for things that look almost as good when done with ordinary OOP (or AOP) is probably not.
So have fun with attributes and the metaprogramming tools they enable. Used properly, they can help with what I’ve always thought was our ultimate goal: making the code look more like the design the programmer’s thinking about. But remember, a little goes a long way.
Next month: Now that I’ve explained attributes and annotations, next month’s column will focus on using them together with aspects.
--------------------------------------------------------------------------------
Gregor Kiczales led the Xerox PARC teams that developed aspect-oriented programming and AspectJ, and is a leading AOP evangelist based in Vancouver.
--------------------------------
--------------------------------
A Little Goes a Long Way
Attributes in C# and annotations in Java provide a hook for principled macros and metaprogramming in the C family. Lisp has had this technology for years, offering many lessons.
By Gregor Kiczales
C# attributes and annotations in Java’s upcoming JDK 1.5—both hereafter called tags—provide the basic hook for adopting a range of useful meta-programming techniques. Tags are new to these C-syntax languages, and we’re starting to see their adoption by programmers, tools and APIs. Lisp has had technology like this for years, so it’s worth looking back to see what 30-plus years of experience can teach us.
The Lisp family of languages has always had the upper hand on macros. Lisp’s macro technology is powerful and principled; thus, Lisp users have developed a rich practice of when and how to use macros to good advantage.
Reading this, you may be thinking “Macros—aargh! Macros are terrible!” C’s text-based macros are so fragile that for many people, the term has developed very negative connotations.
The first lesson is that in Lisp, the term macros has never meant what it does in C. Lisp macros are syntactic: They operate on the program abstract syntax tree (AST) after parsing. This gives the macros a higher—and more principled—level from which to operate. By their nature, syntactic macros produce well-formed programs, which makes them inherently easier to understand and debug than text-based macros.
C# attributes and Java annotations are not themselves a macro facility, but because they’re parsable, they inherently support syntactic macros: They have already adopted Lisp’s first lesson.
After years of experience with syntactic macros, a further enhancement called hygienic macros emerged. Hygienic macros gave macro writers tools that automatically dealt with such issues as preventing name capture, importing definitions from other packages and the like. These issues are also critically important for C# and Java, and should find their way into the macro- and bytecode-editing toolkits.
Two Positions for Tags
The tags that support macros can potentially appear in evaluated and nonevaluated positions. An evaluated position means that the tag appears somewhere you’d expect it to be evaluated (compiled first, of course). A non-evaluated position means that, by default, you’d expect the annotation to be just an attribute of the declaration.
In Lisp, almost every position is evaluated, so, for a number of years, Lisp macros used only evaluated-position tags. But in the 1980s, the declare syntax was added, providing a nonevaluated position for tags.
C# attributes and Java annotations can appear in a number of positions (the two mechanisms differ slightly on this), but for now, just consider that they can appear before any declaration.
“Macro and Attribute Syntax” compares tag appearance in Lisp and C#, listing three Lisp implementations of a procedure that updates a record, along with two C# implementations. All five examples wrap the core update functionality in a transaction. In the left column, the transaction code appears explicitly in the procedure. In the top center, in Lisp, an evaluated-position macro is used to wrap the transaction code. In the third column, an annotation declares that the body should be in a transaction. The corresponding Java code looks very similar to the C#, but with a tag syntax of @Transactional.
Metadata
In Lisp, the declare tag was commonly used for simple metadata tagging; say, telling the editor how to indent code, or to provide different kinds of documentation. Similarly, in C# and Java, attributes have been used at their basic level for metadata that simply labels or decorates a program; typical examples include deployment descriptions, documentation and cross-referencing code with UML tools. These tags can also be used to name anonymous procedures or classes—in Lisp, the named-lambda macro was used for this. (Next month, we’ll see a powerful synergy between this use of tags and AOP.)
Simple Semantic Extensions
By default, tags have no semantic effect—in this way, they differ from Lisp macros—but this doesn’t mean that attributes can’t have semantic effect. A preprocessor can read the source code and make additions or changes as directed by the attributes. Alternatively, the compiler can preserve the tags, and then a postprocessor can read the bytecode and manipulate it as directed by the tags. Both of these have the essential properties of syntactic macros.
A simple example of a semantic extension is a tag that says something like “Generate getter and setter methods for a field,” or “Generate value-checking code for a field or parameter” (such as [Positive] to ensure an integer is positive). There are already products that provide this kind of functionality for C# and Visual Studio, and doubtless Java will soon see similar tools.
Beware Macro Overload
Lisp history also teaches us the important lesson that a little goes a long way when using semantic extensions—in the Lisp world, it was common for macro tyros to define a slew of them. It was great fun—it made their code shorter, and, to them, clearer. I was as guilty of this as anyone; for about three months, I tormented colleagues with my extreme use of macrolet, which allowed a kind of nested macro.
The problem with an abundance of semantic extensions is exactly the same as the feature—it leaves lots of little languages floating around. Lisp’s history in this respect has taught us that people found it unduly difficult to read each other’s code: Imagine reading C# code with lists of attributes longer than the method bodies, or just with as many different attributes as the underlying API.
New languages should be defined sparingly, only when they make a big difference to code clarity, and when it’s likely that any future reader of the code will easily understand it. Extensions to define getters and setters are probably reasonable. Extensions to deal with a focused and well-defined element of domain knowledge may be reasonable. Widespread use of semantic extensions for things that look almost as good when done with ordinary OOP (or AOP) is probably not.
So have fun with attributes and the metaprogramming tools they enable. Used properly, they can help with what I’ve always thought was our ultimate goal: making the code look more like the design the programmer’s thinking about. But remember, a little goes a long way.
Next month: Now that I’ve explained attributes and annotations, next month’s column will focus on using them together with aspects.
--------------------------------------------------------------------------------
Gregor Kiczales led the Xerox PARC teams that developed aspect-oriented programming and AspectJ, and is a leading AOP evangelist based in Vancouver.
--------------------------------
Friday, April 16, 2004
Re: AOP (again)
better still see if there is any aop implementation in .net.
I haven't heard of anything about it. And doesn't seem like anything will be done for version 2 either which is coming out next year. So I guess it's below their radar right now.
Is the Java implementation a standard? If not, is it going to be incorporated into it in the next to next version?
definitely would want to contribute to some great open app, but will i give my killer app (if there ever will be one) under gpl i am not sure. i am not very sure of the revenue model. i know it is a bit of a hypocrisy but seriously never considered everything as open/free.
I don't think your views are hypocritical. I feel like a lot of people are doing either/or with open/closed source. I am wondering - Why not both? There are good points to find in both. A lot of guys writing open source apps work in closed source companies. Closed by day, Open by night ;-) How else can they make a living? Lot of changes are going to take place in the next few years in this area. Let's see what happens.
do you guys ever think of contributing to an open app?
Sure, but need to reach a level of competancy that I can actually contribute something useful instead of just introducing bugs. I actually don't really know how the Open Source Development model works. Do you? It ultimately comes down to one group that is in charge doesn't it? They control the releases etc... Just like the main kernel group. How does your avg joe contribute... for big apps?
also a very interesting blog by james gosling, the creator of java. he wrote on the recent microsoft-sun settlement.
Actually, I thought hell froze over when I saw Scott McNealy sitting next to Steve Ballmer with a grin on his face. Sun is such a stupid company. Seriously, they spent a billion dollors coming up with a case against MS and then they settle with really no charges against MS. What was that all about? And MS sucks because its able to using its hefty bank account to buy its way out of trouble. The business side of MS really needs to change.
Another 2 cents.
I haven't heard of anything about it. And doesn't seem like anything will be done for version 2 either which is coming out next year. So I guess it's below their radar right now.
Is the Java implementation a standard? If not, is it going to be incorporated into it in the next to next version?
definitely would want to contribute to some great open app, but will i give my killer app (if there ever will be one) under gpl i am not sure. i am not very sure of the revenue model. i know it is a bit of a hypocrisy but seriously never considered everything as open/free.
I don't think your views are hypocritical. I feel like a lot of people are doing either/or with open/closed source. I am wondering - Why not both? There are good points to find in both. A lot of guys writing open source apps work in closed source companies. Closed by day, Open by night ;-) How else can they make a living? Lot of changes are going to take place in the next few years in this area. Let's see what happens.
do you guys ever think of contributing to an open app?
Sure, but need to reach a level of competancy that I can actually contribute something useful instead of just introducing bugs. I actually don't really know how the Open Source Development model works. Do you? It ultimately comes down to one group that is in charge doesn't it? They control the releases etc... Just like the main kernel group. How does your avg joe contribute... for big apps?
also a very interesting blog by james gosling, the creator of java. he wrote on the recent microsoft-sun settlement.
Actually, I thought hell froze over when I saw Scott McNealy sitting next to Steve Ballmer with a grin on his face. Sun is such a stupid company. Seriously, they spent a billion dollors coming up with a case against MS and then they settle with really no charges against MS. What was that all about? And MS sucks because its able to using its hefty bank account to buy its way out of trouble. The business side of MS really needs to change.
Another 2 cents.
More balls through Windows
http://www.economist.com/business/displayStory.cfm?story_id=2594309
Just a few thoughts on the article...
Yet again, one of the main reasons presented in the superiority of Linux when compared with Windows, is the lack of security holes. I feel like this is a flawed argument and cannot truely be judged in a fair way. I'm not saying Windows is more secure. It most probably isn't. Linux is probably extremely secure, but there are still security holes in it. I don't keep up with it much, but the Debian computers in our CS labs will be shutdown this weekend cause of a kernel security hole. Recently, there was also a worm for the Mac released. No OS is completely secure. Windows is the most popular and is such a huge target - of course hackers are going to go after it. It will be the case for whatever OS has the biggest market share.
And I have also read the argument that with Linux there are people working 24 hrs on patches if and when holes are found. It is exactly the same situation with Microsoft. There are guys working on it round the clock. Ultimately when you talk of Linux, it is the kernel and the patches for the kernel will come from the "official" guys - the guys developing it (Linus and his buddies). Am I correct in this assumption? So again exact corralation with MS.
The other thing is my theory of why Linux will never reach high popularity on the desktop. It seems like Linux is a "cult" right now and those who are part of it are happy to be in on it. As soon as every Tom, Dick and Harry's aunt starts using it, it will be nothing really that special. It's a programmers OS. It's technical and complicated (relatively). That's why it's so great. The Linux guys don't want a Windows clone. Why would they? It's unique in it's own way and should remain that way. Not try to just ape other OS's. Anyway, that's just my theory.
The great thing about Linux is its customizability. That's why I feel the place where it will really shine (apart from servers) is in appliances... like Watches, Mobiles, Televisions and other small devices. MS has Windows Embedded and they are trying to push it hard, but without that complete freedom to customize, I dunno how good it will be. But on Desktops, I'm still skeptical.
My 2 cents.
Just a few thoughts on the article...
Yet again, one of the main reasons presented in the superiority of Linux when compared with Windows, is the lack of security holes. I feel like this is a flawed argument and cannot truely be judged in a fair way. I'm not saying Windows is more secure. It most probably isn't. Linux is probably extremely secure, but there are still security holes in it. I don't keep up with it much, but the Debian computers in our CS labs will be shutdown this weekend cause of a kernel security hole. Recently, there was also a worm for the Mac released. No OS is completely secure. Windows is the most popular and is such a huge target - of course hackers are going to go after it. It will be the case for whatever OS has the biggest market share.
And I have also read the argument that with Linux there are people working 24 hrs on patches if and when holes are found. It is exactly the same situation with Microsoft. There are guys working on it round the clock. Ultimately when you talk of Linux, it is the kernel and the patches for the kernel will come from the "official" guys - the guys developing it (Linus and his buddies). Am I correct in this assumption? So again exact corralation with MS.
The other thing is my theory of why Linux will never reach high popularity on the desktop. It seems like Linux is a "cult" right now and those who are part of it are happy to be in on it. As soon as every Tom, Dick and Harry's aunt starts using it, it will be nothing really that special. It's a programmers OS. It's technical and complicated (relatively). That's why it's so great. The Linux guys don't want a Windows clone. Why would they? It's unique in it's own way and should remain that way. Not try to just ape other OS's. Anyway, that's just my theory.
The great thing about Linux is its customizability. That's why I feel the place where it will really shine (apart from servers) is in appliances... like Watches, Mobiles, Televisions and other small devices. MS has Windows Embedded and they are trying to push it hard, but without that complete freedom to customize, I dunno how good it will be. But on Desktops, I'm still skeptical.
My 2 cents.
Thursday, April 15, 2004
Re: AOP (again)
I was sort of confused because what they mention was exactly what attributes are all about - injection of code at runtime, without messing with source code. Keeping a clean separation. So I was wondering what the difference was. Have you figured it out?
in attributes the attribute is added within the src. this is then used by the vm. in aop, the rules for the aspect are added in seperate files. so there is just no mixing of aop code and general source. in aspectj, aop code is inserted using the aop compiler. also regular expression style methods can be used to include aop code within a group of methods. to run the code a jar has to be included in the java command. read this article from developerworks to get an example to get the difference. better still see if there is any aop implementation in .net. there are some present for c++. also aop in java was present pre-inclusion of metadata. so i am not sure how this will affect the aop implementations.
But the injecting of code (stuff that apparently aspectJ does), that I don't understand. How do they "hook" into the runtime
the definitions of the aspectj attributes must be defined in the runtime jar file needed to be included. i must specify, that i have not yet tried aop, just read a bit on the topic. why i mentioned aspectj attributes, is that i get the feeling that aop implementations work like attributes, in the sense of including extra metadata. but there is a very huge difference which should be clear after reading an example. actually since i have never worked with attributes either is it possible to create aop like apps using attributes? consider a normal app-wide logging example.
Being a Linux guy, I'm surprised you asked this question
i guess i've given this false impression that i want everything to be open source. i really like linux and the open apps out there are really amazing. but i am not sure if i would want all my code to be gpl. definitely would want to contribute to some great open app, but will i give my killer app (if there ever will be one) under gpl i am not sure. i am not very sure of the revenue model. i know it is a bit of a hypocrisy but seriously never considered everything as open/free. maybe allowing others to see your source is ok, but others selling your stuff and calling it their own is not so cool. but who knows. do you guys ever think of contributing to an open app? especially hrishi?
also a very interesting blog by james gosling, the creator of java. he wrote on the recent microsoft-sun settlement.
in attributes the attribute is added within the src. this is then used by the vm. in aop, the rules for the aspect are added in seperate files. so there is just no mixing of aop code and general source. in aspectj, aop code is inserted using the aop compiler. also regular expression style methods can be used to include aop code within a group of methods. to run the code a jar has to be included in the java command. read this article from developerworks to get an example to get the difference. better still see if there is any aop implementation in .net. there are some present for c++. also aop in java was present pre-inclusion of metadata. so i am not sure how this will affect the aop implementations.
But the injecting of code (stuff that apparently aspectJ does), that I don't understand. How do they "hook" into the runtime
the definitions of the aspectj attributes must be defined in the runtime jar file needed to be included. i must specify, that i have not yet tried aop, just read a bit on the topic. why i mentioned aspectj attributes, is that i get the feeling that aop implementations work like attributes, in the sense of including extra metadata. but there is a very huge difference which should be clear after reading an example. actually since i have never worked with attributes either is it possible to create aop like apps using attributes? consider a normal app-wide logging example.
Being a Linux guy, I'm surprised you asked this question
i guess i've given this false impression that i want everything to be open source. i really like linux and the open apps out there are really amazing. but i am not sure if i would want all my code to be gpl. definitely would want to contribute to some great open app, but will i give my killer app (if there ever will be one) under gpl i am not sure. i am not very sure of the revenue model. i know it is a bit of a hypocrisy but seriously never considered everything as open/free. maybe allowing others to see your source is ok, but others selling your stuff and calling it their own is not so cool. but who knows. do you guys ever think of contributing to an open app? especially hrishi?
also a very interesting blog by james gosling, the creator of java. he wrote on the recent microsoft-sun settlement.
Tuesday, April 13, 2004
Re: AOP (again)
i had posted some stuff on AOP but got no response. so i thought of posting a blog on the topic.
Yeah sorry about that. I went through the article link you posted before briefly, but didn't really understand it much.
I was sort of confused because what they mention was exactly what attributes are all about - injection of code at runtime, without messing with source code. Keeping a clean separation. So I was wondering what the difference was. Have you figured it out?
aspectj can work on class files. no need for java files. same for javaassist. they make use of reflection to analyse a class and then inject aop code. now i am not sure how this works but i'll go on with what i have understood so far.
Hmm... I dunno how this would work. The class files, just like .NET assemblies, already have bytecode/IL in it. The JIT just converts that to native code. So how and in what form can you add to class files? I would assume that the runtime (JVM/CLR) is the only thing that can inject code. How and when does aspectJ get called?
do attributes in .net (metadata in java) perform the same operation. only that the vm must be knowing the meanings of these attributes compared to the aop compiler incase of aop
Exactly. The VM has to know what to do. Dunno how aspectJ connects at runtime. I dunno of anything related to AOP in .NET... just attributes (if there is a relation).
also does the @Remote attribute in .net, cause an attribute to be included into the code, or does it cause the equivalent IL to be include. simply put, are attributes compile time or runtime. why i am asking is incase there is a custom attribute and the vm does not (by a miracle) get the implementation, does it ignore it. this would be a major runtime problem. also if at runtime wouldn't this slow the VM? somehow i feel the vm does these things, but how without sucking in performance?
I understood attributes to be a way of insterting some extra metadata. In some cases, where the CLR understands those attributes, it acts like a flag. If it sees the flag to be on, it will inject code. Attributes are compile time... but all code is compiled at runtime (JIT compiled) - just more code in injected. I suppose you will have performance degradation, but you can getting so much functionality for free. Plus, when you talk managed code, performance is not the most important concern. In .NET, as I've mentioned before, there is an attribute called "WebMethod" which makes a method a WebService. Imagine the amount of "infrastructure" code that needs to be generated to make it work with SOAP etc...
The custom attributes is just for your own use. You can query that at runtime. You could potentially create another app, which loads up an assembly (class) and reads your custom metadata and does something with it. But the injecting of code (stuff that apparently aspectJ does), that I don't understand. How do they "hook" into the runtime.
which brings me to a second question. what do you think of intellectual property in java/c#. it is very easy to reverse engineer code. if not, simply aop some part. some applns like bcel and javaassist allow to modify bytecode and save the class file or modify the class file at runtime and use it dynamically.
Being a Linux guy, I'm surprised you asked this question ;-) I don' t think it's a huge deal. It is pretty easy to reverse engineer just cause IL is a pretty high level language. But there are code obfuscators out there that will render the code almost unreadable.
Using AOP to modify class files - that's something I'm still a bit skeptical of. I can't understand how they would achieve that. I guess as we get more info on this subject, things will become clearer.
Yeah sorry about that. I went through the article link you posted before briefly, but didn't really understand it much.
I was sort of confused because what they mention was exactly what attributes are all about - injection of code at runtime, without messing with source code. Keeping a clean separation. So I was wondering what the difference was. Have you figured it out?
aspectj can work on class files. no need for java files. same for javaassist. they make use of reflection to analyse a class and then inject aop code. now i am not sure how this works but i'll go on with what i have understood so far.
Hmm... I dunno how this would work. The class files, just like .NET assemblies, already have bytecode/IL in it. The JIT just converts that to native code. So how and in what form can you add to class files? I would assume that the runtime (JVM/CLR) is the only thing that can inject code. How and when does aspectJ get called?
do attributes in .net (metadata in java) perform the same operation. only that the vm must be knowing the meanings of these attributes compared to the aop compiler incase of aop
Exactly. The VM has to know what to do. Dunno how aspectJ connects at runtime. I dunno of anything related to AOP in .NET... just attributes (if there is a relation).
also does the @Remote attribute in .net, cause an attribute to be included into the code, or does it cause the equivalent IL to be include. simply put, are attributes compile time or runtime. why i am asking is incase there is a custom attribute and the vm does not (by a miracle) get the implementation, does it ignore it. this would be a major runtime problem. also if at runtime wouldn't this slow the VM? somehow i feel the vm does these things, but how without sucking in performance?
I understood attributes to be a way of insterting some extra metadata. In some cases, where the CLR understands those attributes, it acts like a flag. If it sees the flag to be on, it will inject code. Attributes are compile time... but all code is compiled at runtime (JIT compiled) - just more code in injected. I suppose you will have performance degradation, but you can getting so much functionality for free. Plus, when you talk managed code, performance is not the most important concern. In .NET, as I've mentioned before, there is an attribute called "WebMethod" which makes a method a WebService. Imagine the amount of "infrastructure" code that needs to be generated to make it work with SOAP etc...
The custom attributes is just for your own use. You can query that at runtime. You could potentially create another app, which loads up an assembly (class) and reads your custom metadata and does something with it. But the injecting of code (stuff that apparently aspectJ does), that I don't understand. How do they "hook" into the runtime.
which brings me to a second question. what do you think of intellectual property in java/c#. it is very easy to reverse engineer code. if not, simply aop some part. some applns like bcel and javaassist allow to modify bytecode and save the class file or modify the class file at runtime and use it dynamically.
Being a Linux guy, I'm surprised you asked this question ;-) I don' t think it's a huge deal. It is pretty easy to reverse engineer just cause IL is a pretty high level language. But there are code obfuscators out there that will render the code almost unreadable.
Using AOP to modify class files - that's something I'm still a bit skeptical of. I can't understand how they would achieve that. I guess as we get more info on this subject, things will become clearer.
AOP (again)
i had posted some stuff on AOP but got no response. so i thought of posting a blog on the topic.
this article in javaworld was one of the references for this blog. also referred to an article on aspectj on developerworks.
"aspect oriented programming (aop) is a new programming technique that allows programmers to modularize crosscutting concerns". crosscutting concerns is the keyword. in oops code is divided into classes. some common functionality which forms a part of many classes constitutes a crosscutting concern. take for example logging. other uses suggested are error-handling and authentication.
generally within each method of a class some logging code would be added.like logger.entry("msg:xx"); this messes the entire app. in aop it is possible to seperate such code. the app is written without any logging code. then "aspects" are added in seperately. within an aspect you define common code. that code can be inserted at different places within the app. these places are known as pointcuts. some include before a method execution, before a return type is given. many pointcuts are provided which allow you to insert aop code in most thinkable regions. what code is inserted is known as advice. so advices are the actual operations executed at a pointcut. the logging code can be included once in the advice, and pointcuts placed at different parts of the app.
aspectj is one aop implementation, part of the eclipse.org project. javaassist part of jboss is another one. javaassist performs aop in some other style.
aspectj can work on class files. no need for java files. same for javaassist. they make use of reflection to analyse a class and then inject aop code. now i am not sure how this works but i'll go on with what i have understood so far.
"Attributes are used for several defined purposes in the java class format, including the already-mentioned bytecode, constant values for fields, exception handling, and debugging infomation. .. From the beginning, the JVm spec has required JVMs to ignore attributes of unknown types. This requirement gives flexibility for extending the use of attributes to serve other purposes in the future, such as providing meta-information needed by frameworks that work with user classes" - an excerpt from developerworks. so aop compilers must be adding such attributes which can be used to effect aspects at runtime.
do attributes in .net (metadata in java) perform the same operation. only that the vm must be knowing the meanings of these attributes compared to the aop compiler incase of aop. also does the @Remote attribute in .net, cause an attribute to be included into the code, or does it cause the equivalent IL to be include. simply put, are attributes compile time or runtime. why i am asking is incase there is a custom attribute and the vm does not (by a miracle) get the implementation, does it ignore it. this would be a major runtime problem. also if at runtime wouldn't this slow the VM? somehow i feel the vm does these things, but how without sucking in performance?
which brings me to a second question. what do you think of intellectual property in java/c#. it is very easy to reverse engineer code. if not, simply aop some part. some applns like bcel and javaassist allow to modify bytecode and save the class file or modify the class file at runtime and use it dynamically.
this article in javaworld was one of the references for this blog. also referred to an article on aspectj on developerworks.
"aspect oriented programming (aop) is a new programming technique that allows programmers to modularize crosscutting concerns". crosscutting concerns is the keyword. in oops code is divided into classes. some common functionality which forms a part of many classes constitutes a crosscutting concern. take for example logging. other uses suggested are error-handling and authentication.
generally within each method of a class some logging code would be added.like logger.entry("msg:xx"); this messes the entire app. in aop it is possible to seperate such code. the app is written without any logging code. then "aspects" are added in seperately. within an aspect you define common code. that code can be inserted at different places within the app. these places are known as pointcuts. some include before a method execution, before a return type is given. many pointcuts are provided which allow you to insert aop code in most thinkable regions. what code is inserted is known as advice. so advices are the actual operations executed at a pointcut. the logging code can be included once in the advice, and pointcuts placed at different parts of the app.
aspectj is one aop implementation, part of the eclipse.org project. javaassist part of jboss is another one. javaassist performs aop in some other style.
aspectj can work on class files. no need for java files. same for javaassist. they make use of reflection to analyse a class and then inject aop code. now i am not sure how this works but i'll go on with what i have understood so far.
"Attributes are used for several defined purposes in the java class format, including the already-mentioned bytecode, constant values for fields, exception handling, and debugging infomation. .. From the beginning, the JVm spec has required JVMs to ignore attributes of unknown types. This requirement gives flexibility for extending the use of attributes to serve other purposes in the future, such as providing meta-information needed by frameworks that work with user classes" - an excerpt from developerworks. so aop compilers must be adding such attributes which can be used to effect aspects at runtime.
do attributes in .net (metadata in java) perform the same operation. only that the vm must be knowing the meanings of these attributes compared to the aop compiler incase of aop. also does the @Remote attribute in .net, cause an attribute to be included into the code, or does it cause the equivalent IL to be include. simply put, are attributes compile time or runtime. why i am asking is incase there is a custom attribute and the vm does not (by a miracle) get the implementation, does it ignore it. this would be a major runtime problem. also if at runtime wouldn't this slow the VM? somehow i feel the vm does these things, but how without sucking in performance?
which brings me to a second question. what do you think of intellectual property in java/c#. it is very easy to reverse engineer code. if not, simply aop some part. some applns like bcel and javaassist allow to modify bytecode and save the class file or modify the class file at runtime and use it dynamically.
Monday, April 12, 2004
Saturday, April 10, 2004
Re: Code Review - iermon
It's really impressive. So you are completely done with the proj?
thanks.. a lot of credit also has to go to the guys working at barc. done with the project i cannot say. within the restriction of time we did an important portion of the job. we actually left implementation of the detectors using CAN. thats another protocol which allows multiple devices to be connected over a single bus.
Device has a jvm on it...
the microcontroller uses TINI. the TINI SDK is available for download from maxim-ic.com. there are 2 processes always running on the system, one of which is the 'jvm'. it runs as a seperate process and the java app runs as a seperate one. there is no conventional jvm, but things work.
the API supported is the j2se, not j2me. but it tries to support 1.1.8 there are cases where only a part of a class will work as per the API. the API's we used were mainly lang, io, net. as a microcontroller they have sufficient and well chosen API support. more importantly, the TINI API adds support for other features of the controler itself. provides functionality for very specific stuff. for eg, you can program an led on the motherboard to blink.
thanks.. a lot of credit also has to go to the guys working at barc. done with the project i cannot say. within the restriction of time we did an important portion of the job. we actually left implementation of the detectors using CAN. thats another protocol which allows multiple devices to be connected over a single bus.
Device has a jvm on it...
the microcontroller uses TINI. the TINI SDK is available for download from maxim-ic.com. there are 2 processes always running on the system, one of which is the 'jvm'. it runs as a seperate process and the java app runs as a seperate one. there is no conventional jvm, but things work.
the API supported is the j2se, not j2me. but it tries to support 1.1.8 there are cases where only a part of a class will work as per the API. the API's we used were mainly lang, io, net. as a microcontroller they have sufficient and well chosen API support. more importantly, the TINI API adds support for other features of the controler itself. provides functionality for very specific stuff. for eg, you can program an led on the motherboard to blink.
Thursday, April 08, 2004
Re: Code Review - iermon
Read this document which was prepared as a mid-year report to explain the objectives, need etc. that document should clear most questions.
Damn! That's one hell of a report. It's really impressive. So you are completely done with the proj?
do not know how many principles of XP we conformed to. just that we were 2 guys on one pc
I dunno a lot about it, but I guess that is probably the most important principle. I have some mixed feelings about XP. Two heads are better than one, but you need to be compatible. If you got a perfectionist maniac (like moi) who cares about code formatting etc... and the other dude couldn't care less, it probably won't work well. But I see many benefits to it. With two sets of eyes looking at the code you can catch silly errors much faster. Also different ways of looking at a problem can be REALLY beneficial.
Device has a jvm on it...
Is the Java VM the Micro edition? How big is it? And does it contain most of the same API's from the Std edition?
Damn! That's one hell of a report. It's really impressive. So you are completely done with the proj?
do not know how many principles of XP we conformed to. just that we were 2 guys on one pc
I dunno a lot about it, but I guess that is probably the most important principle. I have some mixed feelings about XP. Two heads are better than one, but you need to be compatible. If you got a perfectionist maniac (like moi) who cares about code formatting etc... and the other dude couldn't care less, it probably won't work well. But I see many benefits to it. With two sets of eyes looking at the code you can catch silly errors much faster. Also different ways of looking at a problem can be REALLY beneficial.
Device has a jvm on it...
Is the Java VM the Micro edition? How big is it? And does it contain most of the same API's from the Std edition?
Re: GMail
Some more info on privacy related stuff...
http://www.theregister.co.uk/2004/04/03/google_mail_is_evil_privacy/
Most interesting bit... "The contents of your Gmail account also are stored and maintained on Google servers in order to provide the service. Indeed, residual copies of email may remain on our systems, even after you have deleted them from your mailbox or after the termination of your account."
So, it looks like you were right... they are thinking of not deleting the email at all. I don't see how they will handle the space issue. Keep growing infinitely?
http://www.theregister.co.uk/2004/04/03/google_mail_is_evil_privacy/
Most interesting bit... "The contents of your Gmail account also are stored and maintained on Google servers in order to provide the service. Indeed, residual copies of email may remain on our systems, even after you have deleted them from your mailbox or after the termination of your account."
So, it looks like you were right... they are thinking of not deleting the email at all. I don't see how they will handle the space issue. Keep growing infinitely?
Re: Code Review - iermon
Firstly, what exactly does the app do?
see, thats one of the reasons why orielly has not called me yet. Read this document which was prepared as a mid-year report to explain the objectives, need etc. that document should clear most questions. if any more,.. pls ask. the app is divided into modules and each performs a specific part. the doc in the prev blog should explain the app now.
How did you do the coding? Each did a separate class or did you work on everything together? I've never really worked with anyone else on a coding project, so just wondering what approach you took. Small diversion... what dyou think of XP?
a part of LCD was written by another employee before. but had to restructure it to our style. then wrote GMCounter,.. etc. this entire system was so new, so different that we did not think of planning how to structure the code. just tried taking a small step at a time. we obviously knew the system requirements, but no coding design. then the so-called controller evolved. and things sort of fell into place. can you guys think of any other way you would structure the app. it was a relatively small app so we could restructure the code we wrote in small independent modules, then just plug them together.
also you are definetely smart enough to realise that we were not smart enough to write the PPPServer class. that was an demo example we just integrated into the app.
do not know how many principles of XP we conformed to. just that we were 2 guys on one pc. plus there was a slight mis-match as we code in diff languages. but, we could definitely relate on logic and it was a good experience. sometimes get simple or complicated solutions, sometimes just none. there were quite a few instances when there were multiple solutions to one problem and then you can decide on the better one. a good learning experience.
Where does the output to all the exception.printStackTrace()'s go? I guess the only output that is displayed is with the "lcd.LCDWrite()" calls.
Device has a jvm on it... What OS? Some form of linux?
dallas semiconductor have their own proprietary software TINI. they have a TINI SDK. the microcontroller (mc) can be run with or without the OS. without the os, flash memory would generally contain an app written in assembly. otherwise the tini os can be loaded into the mc and then other apps started after the os. either binaries can be created (tbin) or java (tini) files can be used. in the TINI docs the method to generate a tbin or tini app is described (still have to read on tbin's). for java (tini) files analogous to normal pc's a shell/command line is required, but not for tbin files. tini also have a shell called *. this can be started after the os. this shell can be accessed by telnet'ing the mc. it requires a login and supports some basic commands like date, ls, dir, cd, cat, ipconfig, rm, del,..
to execute a java app,
$ java iermon.tini
also some stuff i has posted earlier
"java files are then written and compiled on a seperate pc. these are then converted to a .tini file. tini is actually a java based propriety framework by dallas semiconductors. it packages all the necessary .class files and adds some more info. this tini file just has to be transferred by ftp. next java the .tini file. thats all. in normal java apps, the jvm executes the class file and the garbage collector is actually just a daemon thread. but in this implementation, the gc is a seperate process."
now System.out.println refers to the telnet session in which the java app was created. close this window/session and the app runs on the mc but no System.out.println will be seen. and mohn was right about the lcd panel. it is supposed to be the actual window to the operations of the mc. we have not actually finished the app in whole. could have spent more time for better logging and better names, comments, etc. just short of time.
What's with the .tlib? Why not just have it as a class and reference that? I didn't know there was another file format other than .class in java.
tlib is another TINI propreitary file. but you got me thinking on the question. i think tlib can be something analogous to a native library. for eg to call C/C++ code within a java app use the method System.loadLibrary("xxx"); where xxx is a dll or a lib.so. but cannot confirm as of now. you know the Disclaimer right!! another reason why orielly are shy of me...
see, thats one of the reasons why orielly has not called me yet. Read this document which was prepared as a mid-year report to explain the objectives, need etc. that document should clear most questions. if any more,.. pls ask. the app is divided into modules and each performs a specific part. the doc in the prev blog should explain the app now.
How did you do the coding? Each did a separate class or did you work on everything together? I've never really worked with anyone else on a coding project, so just wondering what approach you took. Small diversion... what dyou think of XP?
a part of LCD was written by another employee before. but had to restructure it to our style. then wrote GMCounter,.. etc. this entire system was so new, so different that we did not think of planning how to structure the code. just tried taking a small step at a time. we obviously knew the system requirements, but no coding design. then the so-called controller evolved. and things sort of fell into place. can you guys think of any other way you would structure the app. it was a relatively small app so we could restructure the code we wrote in small independent modules, then just plug them together.
also you are definetely smart enough to realise that we were not smart enough to write the PPPServer class. that was an demo example we just integrated into the app.
do not know how many principles of XP we conformed to. just that we were 2 guys on one pc. plus there was a slight mis-match as we code in diff languages. but, we could definitely relate on logic and it was a good experience. sometimes get simple or complicated solutions, sometimes just none. there were quite a few instances when there were multiple solutions to one problem and then you can decide on the better one. a good learning experience.
Where does the output to all the exception.printStackTrace()'s go? I guess the only output that is displayed is with the "lcd.LCDWrite()" calls.
Device has a jvm on it... What OS? Some form of linux?
dallas semiconductor have their own proprietary software TINI. they have a TINI SDK. the microcontroller (mc) can be run with or without the OS. without the os, flash memory would generally contain an app written in assembly. otherwise the tini os can be loaded into the mc and then other apps started after the os. either binaries can be created (tbin) or java (tini) files can be used. in the TINI docs the method to generate a tbin or tini app is described (still have to read on tbin's). for java (tini) files analogous to normal pc's a shell/command line is required, but not for tbin files. tini also have a shell called *. this can be started after the os. this shell can be accessed by telnet'ing the mc. it requires a login and supports some basic commands like date, ls, dir, cd, cat, ipconfig, rm, del,..
to execute a java app,
$ java iermon.tini
also some stuff i has posted earlier
"java files are then written and compiled on a seperate pc. these are then converted to a .tini file. tini is actually a java based propriety framework by dallas semiconductors. it packages all the necessary .class files and adds some more info. this tini file just has to be transferred by ftp. next java the .tini file. thats all. in normal java apps, the jvm executes the class file and the garbage collector is actually just a daemon thread. but in this implementation, the gc is a seperate process."
now System.out.println refers to the telnet session in which the java app was created. close this window/session and the app runs on the mc but no System.out.println will be seen. and mohn was right about the lcd panel. it is supposed to be the actual window to the operations of the mc. we have not actually finished the app in whole. could have spent more time for better logging and better names, comments, etc. just short of time.
What's with the .tlib? Why not just have it as a class and reference that? I didn't know there was another file format other than .class in java.
tlib is another TINI propreitary file. but you got me thinking on the question. i think tlib can be something analogous to a native library. for eg to call C/C++ code within a java app use the method System.loadLibrary("xxx"); where xxx is a dll or a lib.so. but cannot confirm as of now. you know the Disclaimer right!! another reason why orielly are shy of me...
Wednesday, April 07, 2004
Re: GMail
A very advanced file search should be possible on Windows in the next versions. I think Yukon with database built into the OS.
WinFS in Longhorn has to do with (our good pal) metadata. It's going to tag every piece of info on the system with extra data to make it easier to search. Right now there is not enough info, so it has to weed through each and every file. Imagine if Google had to do that for it's 3 billion files. Talk about a long wait.
More than the 1Gb space i am interested in what search functionality gmail are talking about.
I dunno if the search functionality will be something new... just google, but for mail. Hotmail doesn't offer search capability as of now. Actually I wouldn't see that much of a need for it - I mean we're talking about 2 mb worth of emails. But when you have 500 times that space, search will be crucial.
The organization bit is the more interesting part. It will be in a message board format. So if I write you and you reply, it will be in a thread. Right now, it's all over the place.
OT - I read somewhere that with terabyte harddisks it will be possible to store every conversation you've ever had in your entire life in a digital format. Now, I dunno who in their right mind would ever want to do that, but it's pretty cool.
Besides so many govt org all over the world scan all the data highways all the time!!
"Echelon" is a project (US and some other nations) to develop a technology that could intersept every kind of digital communication. http://www.cybercitycafe.com/explore/echelon.html
BTW, have you googled yourself?
WinFS in Longhorn has to do with (our good pal) metadata. It's going to tag every piece of info on the system with extra data to make it easier to search. Right now there is not enough info, so it has to weed through each and every file. Imagine if Google had to do that for it's 3 billion files. Talk about a long wait.
More than the 1Gb space i am interested in what search functionality gmail are talking about.
I dunno if the search functionality will be something new... just google, but for mail. Hotmail doesn't offer search capability as of now. Actually I wouldn't see that much of a need for it - I mean we're talking about 2 mb worth of emails. But when you have 500 times that space, search will be crucial.
The organization bit is the more interesting part. It will be in a message board format. So if I write you and you reply, it will be in a thread. Right now, it's all over the place.
OT - I read somewhere that with terabyte harddisks it will be possible to store every conversation you've ever had in your entire life in a digital format. Now, I dunno who in their right mind would ever want to do that, but it's pretty cool.
Besides so many govt org all over the world scan all the data highways all the time!!
"Echelon" is a project (US and some other nations) to develop a technology that could intersept every kind of digital communication. http://www.cybercitycafe.com/explore/echelon.html
BTW, have you googled yourself?
Re: Code Review - iermon
Just went over the code and spec a bit. So a few questions...
Firstly, what exactly does the app do?
How did you do the coding? Each did a separate class or did you work on everything together? I've never really worked with anyone else on a coding project, so just wondering what approach you took. Small diversion... what dyou think of XP?
Where does the output to all the exception.printStackTrace()'s go? I guess the only output that is displayed is with the "lcd.LCDWrite()" calls.
Device has a jvm on it... What OS? Some form of linux?
What's with the .tlib? Why not just have it as a class and reference that? I didn't know there was another file format other than .class in java.
Firstly, what exactly does the app do?
How did you do the coding? Each did a separate class or did you work on everything together? I've never really worked with anyone else on a coding project, so just wondering what approach you took. Small diversion... what dyou think of XP?
Where does the output to all the exception.printStackTrace()'s go? I guess the only output that is displayed is with the "lcd.LCDWrite()" calls.
Device has a jvm on it... What OS? Some form of linux?
What's with the .tlib? Why not just have it as a class and reference that? I didn't know there was another file format other than .class in java.
Code Review - iermon
As posted on previous blogs, Dinesh and I along with 2 other classmates (Anup Nair and Mrunal Bhatt) got the oppurtunity to work at BARC as part of our final year project.
We have completed the coding part, and have begun the actual project report. Its funny as even till now bugs, bug scares and easy optimizations come up. Disadvantages of not planning i guess. So i thought of posting an early access draft of the report and the source. Some of the code may seem very un-java like. Thats because we were writing for a microcontroller.
We have completed the coding part, and have begun the actual project report. Its funny as even till now bugs, bug scares and easy optimizations come up. Disadvantages of not planning i guess. So i thought of posting an early access draft of the report and the source. Some of the code may seem very un-java like. Thats because we were writing for a microcontroller.
Re: GMail
Well google itself has been revolutionary and gmail seems going in the right direction. More than the 1Gb space i am interested in what search functionality gmail are talking about. Should change the way we think of email. A very advanced file search should be possible on Windows in the next versions. I think Yukon with database built into the OS.
Its funny as with cheaper computing power / storage we are allowing ourselves to become more disorganised. And leave all the hardwork to computers!!
On privacy, does such a thing exist?? I always thought emails were archived. Besides so many govt org all over the world scan all the data highways all the time!!
Its funny as with cheaper computing power / storage we are allowing ourselves to become more disorganised. And leave all the hardwork to computers!!
On privacy, does such a thing exist?? I always thought emails were archived. Besides so many govt org all over the world scan all the data highways all the time!!
Tuesday, April 06, 2004
Re: GMail
There aint no free lunch.
Considering the service they are offering for FREE this shouldn't come as such a huge surprise. Don't get me wrong - I think the privacy policy is a serious issue. I don't want anyone, man or machine, scanning my emails. But they are coming out with something quite radical and for a pretty sweet price. It's a tradeoff many are willing to make, including me. I'm pretty sure, they will be pressured into offering some kind of premium service for a fee with no ads. MSN and Yahoo offer it for some 1/10 the space they're going to offer.
I can't imagine the magnitude of storage that will be available say 10 years from now!
Considering how much the prices of storage have fallen right now 1 gig ain't a big deal. But it's going to be huge because they are doing something no one has done before - something unique. It will force Yahoo and Hotmail to also increase storage.
They say that we'll be able to search through any email we've EVER sent / received. Does this mean that we'll not be able to PERMANENTLY delete any message? It might show the message to be deleted but will it be stored on the google servers?
I doubt it. It would make NO sense it they did that. Believe me, people will find ways to make a gig of storage look real small. They have to allow for deleting permanently.
Considering the service they are offering for FREE this shouldn't come as such a huge surprise. Don't get me wrong - I think the privacy policy is a serious issue. I don't want anyone, man or machine, scanning my emails. But they are coming out with something quite radical and for a pretty sweet price. It's a tradeoff many are willing to make, including me. I'm pretty sure, they will be pressured into offering some kind of premium service for a fee with no ads. MSN and Yahoo offer it for some 1/10 the space they're going to offer.
I can't imagine the magnitude of storage that will be available say 10 years from now!
Considering how much the prices of storage have fallen right now 1 gig ain't a big deal. But it's going to be huge because they are doing something no one has done before - something unique. It will force Yahoo and Hotmail to also increase storage.
They say that we'll be able to search through any email we've EVER sent / received. Does this mean that we'll not be able to PERMANENTLY delete any message? It might show the message to be deleted but will it be stored on the google servers?
I doubt it. It would make NO sense it they did that. Believe me, people will find ways to make a gig of storage look real small. They have to allow for deleting permanently.
Re: GMail
I think providing a gigabyte per user is simply phenomenal. The google guys do come up with good stuff! I can't imagine the magnitude of storage that will be available say 10 years from now!
However, I think the privacy is going to be a major concern. It states that it'll come up with ads based on the content of the email messages. I'm sure people are going to object to that. While most of us wouldn't have stuff we'd be VERY secret about, the idea that someone (even if it's a computer) will be scanning our email content on a regular basis wouldn't give a particularly secure feeling to a lot of people. But I guess it's not such a big deal after all.
They say that we'll be able to search through any email we've EVER sent / received. Does this mean that we'll not be able to PERMANENTLY delete any message? It might show the message to be deleted but will it be stored on the google servers?
All in all, it would be fair to say that I can't wait to register for it! :-)
However, I think the privacy is going to be a major concern. It states that it'll come up with ads based on the content of the email messages. I'm sure people are going to object to that. While most of us wouldn't have stuff we'd be VERY secret about, the idea that someone (even if it's a computer) will be scanning our email content on a regular basis wouldn't give a particularly secure feeling to a lot of people. But I guess it's not such a big deal after all.
They say that we'll be able to search through any email we've EVER sent / received. Does this mean that we'll not be able to PERMANENTLY delete any message? It might show the message to be deleted but will it be stored on the google servers?
All in all, it would be fair to say that I can't wait to register for it! :-)
Friday, April 02, 2004
GMail
Press Release: http://www.google.com/press/pressrel/gmail.html
FAQ: http://gmail.google.com/gmail/help/about.html
This is something amazing. Imagine 1 GIGABYTES of memory available! It's going to have Hotmail and Yahoo running like hell.
It was actually announced on April 1st, so a lot of people thought it was an April Fool's joke!
FAQ: http://gmail.google.com/gmail/help/about.html
This is something amazing. Imagine 1 GIGABYTES of memory available! It's going to have Hotmail and Yahoo running like hell.
It was actually announced on April 1st, so a lot of people thought it was an April Fool's joke!
Subscribe to:
Posts (Atom)