Well,
I have been pretty away lately but it is just that I am enjoying my holidays here in Europe.
From the 1st of July to the 4th, I spend a few days in Paris enjoying the food and the summer. Then I spend a nice weekend in London where I visited the Thoughtworks office and met a few very nice people thanks to Danilo.
I could finally offer Mariana her Asus eee Pc 900 which is a fine little piece of computer. The pre packaged Xandros distribution is quite weird and she is anxious to install Ubuntu on it but I still have not managed to create a bootable USB.
We visited a few places and museums as well as a pub (could not miss that, right?) and went to a magic show. Covent Garden and the London Transport Museum were some of the highlights. The London's eye tour was quite deceiving on the other hand.
The 7th we got back to Paris and, tired as we were, lost our first opportunity to join the Paris Coding Dojo which made me quite sad. On the rest I had a nice week walking around Paris without any specific destination. Highlights to the top of the Eiffel Tower. It is cheaper and MUCH more interesting than London's eye. No time restriction, more infos and space. A nicer view of the whole city as well as a first and second floor trip that can last long. I had the pleasure to have lunch at the second floor (home made sandwiches and water) and it was very pleasant.
The 14th we finally went to the parc in front of the Eiffel Tower to wait for the fireworks. It was a very nice evening. Laying down on the grass, having a nice picnic with wine and then listening to classic music while watching an amazing firework show. Only sad part was that people were not polite enough to stay sit so everyone could enjoy it. We had to stand up and the shorter people suffered a bit. Sad to see that civilization is not what it used to be.
I am currently to the south of France, near Bordeaux, at my grand parents' place. It is a very nice and calm spot although tourists are becoming more and more invasive. Tomorrow I leave to the mountains at a friend's place were I should have 3 days of calm and then we head for Nice to see Julian and then Grenoble to see Alfredo, my advisor (let's hope I don't run into the same troubles as the PHD comics).
Showing posts with label blah. Show all posts
Showing posts with label blah. Show all posts
Thursday, July 17, 2008
Monday, February 25, 2008
A week at Campus Party
Hello everyone,
It has now been two weeks since I started going to Campus Party and eight days since I stopped it. It was a very nice experience where I could meet a couple persons I wanted to.
I must admit I was a bit disapointed with the audience since I was expecting a bit more people interested in development activities such as Archimedes and Coding Dojos or an eXtreme Programming (XP) laboratory. I had something like 10 attendees from start to the end and another 10 passing by during Archimedes demonstration, the Coding Dojo had about 8 newcomers while the XP lab managed to reach amazing 4 attendees.
Besides hanging on with friends during the whole week and seeing computer geeks getting a lot of attention from the press (which I had some but threw away by being busy), Campus party was mostly a big lan party with tons of file sharing, game play and robots wandering around hiting people or waking them up with music.
I think I earned three good experiences with the event:
Anyway, next posts will cover my promises about Archimedes, news about the courses in São Carlos, my next works on OOP for graduation students and posts to session in Agile 2008. See you in a bit.
It has now been two weeks since I started going to Campus Party and eight days since I stopped it. It was a very nice experience where I could meet a couple persons I wanted to.
I must admit I was a bit disapointed with the audience since I was expecting a bit more people interested in development activities such as Archimedes and Coding Dojos or an eXtreme Programming (XP) laboratory. I had something like 10 attendees from start to the end and another 10 passing by during Archimedes demonstration, the Coding Dojo had about 8 newcomers while the XP lab managed to reach amazing 4 attendees.
Besides hanging on with friends during the whole week and seeing computer geeks getting a lot of attention from the press (which I had some but threw away by being busy), Campus party was mostly a big lan party with tons of file sharing, game play and robots wandering around hiting people or waking them up with music.
I think I earned three good experiences with the event:
- Learned to disassemble executable code and debug it with gdb (this will make a post later when I achieve my goal with it).
- Worked on Archimedes and got some feedback from users about wether or not it is decent. While people told me it was great, nobody (except one person maybe, as far as I know) really started to use it.
- Met Akita that suggested that we produced a couple of screencasts about Seaside. I though about it and since I am the teaching assistant for the Object Oriented Programming (OOP) course and we are going to work with it, I will probably do it. I will post them here when it's done.
Anyway, next posts will cover my promises about Archimedes, news about the courses in São Carlos, my next works on OOP for graduation students and posts to session in Agile 2008. See you in a bit.
Marcadores:
blah,
campus party
Wednesday, January 23, 2008
Those alive, always... blog
After dying and resurrecting a couple of times since my last post (in late October), I'm restarting to blog. I have, of course, tons of news and updates but I will not drown you with everything. I will post everything in small separate posts so that everyone can refer to what ever is important to them.
I will also try to maintain the blog style that way from now on. I understand that big posts are something that can rarely be reused (just like happens to code), so I will try to refactor my posts to improve reusability.
I will also try (again) to post a bit more often to keep this updated.
Well, this was only a blah, feel free to read what interests you on the rest.
I will also try to maintain the blog style that way from now on. I understand that big posts are something that can rarely be reused (just like happens to code), so I will try to refactor my posts to improve reusability.
I will also try (again) to post a bit more often to keep this updated.
Well, this was only a blah, feel free to read what interests you on the rest.
Marcadores:
blah
Wednesday, October 10, 2007
News after almost 2 months
Well,
It is quite evident that I'm not a compulsive writter. Almost 2 months since my last post now but I've got some pretty good amount of news.
First and sad news: The paper was reject by the ETX comittee. The following reasons were the principal ones that got it rejected:
Other than that: Archimedes is currently almost completetly stalled. I haven't been finding time to code anything on the project with the master's work. It is sad to admit but I should only be able to refocus on the project in december or beginning of the next year. I surely hope next year I will have again another group of volunteers to work on the project on the XP course.
More personal matters and things that might interest this blog's readers. I will attend (with Mariana) at the OOPSLA '07 anyway. We were accepted as student volunteers so we will spend our whole week (from the 20th to the 25th) helping the people from the organization to make this amazing conference. I cannot promise much but I can assure everyone that me and Mariana are going to do our best to post everything we can on this blog about the OOPSLA. Maybe we even broadcast a couple talks if we manage to (and are allowed to). Once we find out what will be the infrastructure there, we will try to keep you guys up to date.
We leave São Paulo the 18th evening and reach Montreal the 19th morning. Works might start the 20th and we will stay in Montreal until the 27th (or 28th) depending on some details.
Last, but not least, I've classified with my team (Jeferson R. da Silva and Marcio Oshiro) to participate in the brazilian's finals (http://maratona.ime.usp.br/ in portuguese) for the ACM ICPC programming maraton contest (http://icpc.baylor.edu/icpc/). So I will be in Belo Horizonte from the 9th november to the 11th. We surely hope to manage to be in the top 10 this year and we are training a lot for it (which is the reason why Archimedes lost my coding time).
Well, that's about it. And remember, from the 20th to the 25th, stay tunned because news will be flowing quickly here. See you guys.
It is quite evident that I'm not a compulsive writter. Almost 2 months since my last post now but I've got some pretty good amount of news.
First and sad news: The paper was reject by the ETX comittee. The following reasons were the principal ones that got it rejected:
- It was not clear enough in the sense that the english writting was not very good.
- The paper had to focus mainly on either the project history and then be a paper about a success case of using Eclipse's RCP or on the technical side. This last one should bring to discussions the main CAD architecutres and discuss the impact eRCP could have on it.
- The last reviewer said that the project and the article were pretty good but it lacked an implementation to prove itself usefull. I don't know if I didn't understood the comments or if the reviewer really (REALLY) didn't understand what we wrote.
Other than that: Archimedes is currently almost completetly stalled. I haven't been finding time to code anything on the project with the master's work. It is sad to admit but I should only be able to refocus on the project in december or beginning of the next year. I surely hope next year I will have again another group of volunteers to work on the project on the XP course.
More personal matters and things that might interest this blog's readers. I will attend (with Mariana) at the OOPSLA '07 anyway. We were accepted as student volunteers so we will spend our whole week (from the 20th to the 25th) helping the people from the organization to make this amazing conference. I cannot promise much but I can assure everyone that me and Mariana are going to do our best to post everything we can on this blog about the OOPSLA. Maybe we even broadcast a couple talks if we manage to (and are allowed to). Once we find out what will be the infrastructure there, we will try to keep you guys up to date.
We leave São Paulo the 18th evening and reach Montreal the 19th morning. Works might start the 20th and we will stay in Montreal until the 27th (or 28th) depending on some details.
Last, but not least, I've classified with my team (Jeferson R. da Silva and Marcio Oshiro) to participate in the brazilian's finals (http://maratona.ime.usp.br/ in portuguese) for the ACM ICPC programming maraton contest (http://icpc.baylor.edu/icpc/). So I will be in Belo Horizonte from the 9th november to the 11th. We surely hope to manage to be in the top 10 this year and we are training a lot for it (which is the reason why Archimedes lost my coding time).
Well, that's about it. And remember, from the 20th to the 25th, stay tunned because news will be flowing quickly here. See you guys.
Marcadores:
acm,
archimedes,
blah,
oopsla
Thursday, June 7, 2007
A tutorial for programmer
I think I will just have to admit that no mather how often I hope to publish news on this blog, I will always be late. But the fact is, running late is the only thing that pushes me to write here so I will keep trying to keep a reasonable pace and I will keep complaining about being late. I hope you guys don't mind.
As for now, I have some news although not many. Archimedes is quite stuck this week since today (thursday) is a holiday and it was half of our programming time. The other half was monday and we didn't used it to program for once. It was burned down making up a talk and a demonstration about how to develop plugins for Archimedes.
I've tried to keep all the documents in english so I could share them later on the internet but I still have a big work to do: the screencast.
The talk was composed of three parts, two of which I made and the first one was made by an Archimedes collaborator (Julien Renaut). It is mostly focused on programming problems and how people can add features to Archimedes. His talk was about extensions and extension points which are some concepts used by eRCP to allow plugins to add functionality to the main software. His work was done in Portuguese but I will translate it and insert it into the main talk I will upload.
The second part was my talk which was a lot more about Archimedes and how our main structure works. It tries to let people understand the flow of information within the software. It has a couple of "UML" (those are not really UML but kind of) figures and a nice review about Archimedes' main classes. I need to add the notes on this talk so that people can look at the talk and understand what I was trying to talk about.
The third and last part was a small example of how to create a plugin project that would add a new element to the software. This is quite a long work and I want to have a screencast of that with my voice explaining what is going on. So it will probably take me some time (maybe a month) to have it all working fine.
Also, there is a volunteer architect building up a user guide much better than anything we could ever produce. It is currently ongoing and is in Portuguese but as soon as it is finished, I will ask for help on translating this to several languages.
Speaking of languages, I am getting desperate to have Archimedes' build system working with maven 2 has said before. This would allow me to have a src.zip deploy once more as well as a nice translation zip file to have people translating the software more frequently and easily.
So that's what I've been doing. I've also been working hard to try to solve the problems from the uva gadget but I've been failing a lot which is not really keeping my moral up. :( Also, my desktop seems to have died on me. This doesn't means many loses at the moment but makes me quite upset and will probably take me some precious time to fix. Until then I might just not have anything to test Archimedes on Windows or Linux so I hope you guys keep sending us reports.
That's it. Bye bye!
As for now, I have some news although not many. Archimedes is quite stuck this week since today (thursday) is a holiday and it was half of our programming time. The other half was monday and we didn't used it to program for once. It was burned down making up a talk and a demonstration about how to develop plugins for Archimedes.
I've tried to keep all the documents in english so I could share them later on the internet but I still have a big work to do: the screencast.
The talk was composed of three parts, two of which I made and the first one was made by an Archimedes collaborator (Julien Renaut). It is mostly focused on programming problems and how people can add features to Archimedes. His talk was about extensions and extension points which are some concepts used by eRCP to allow plugins to add functionality to the main software. His work was done in Portuguese but I will translate it and insert it into the main talk I will upload.
The second part was my talk which was a lot more about Archimedes and how our main structure works. It tries to let people understand the flow of information within the software. It has a couple of "UML" (those are not really UML but kind of) figures and a nice review about Archimedes' main classes. I need to add the notes on this talk so that people can look at the talk and understand what I was trying to talk about.
The third and last part was a small example of how to create a plugin project that would add a new element to the software. This is quite a long work and I want to have a screencast of that with my voice explaining what is going on. So it will probably take me some time (maybe a month) to have it all working fine.
Also, there is a volunteer architect building up a user guide much better than anything we could ever produce. It is currently ongoing and is in Portuguese but as soon as it is finished, I will ask for help on translating this to several languages.
Speaking of languages, I am getting desperate to have Archimedes' build system working with maven 2 has said before. This would allow me to have a src.zip deploy once more as well as a nice translation zip file to have people translating the software more frequently and easily.
So that's what I've been doing. I've also been working hard to try to solve the problems from the uva gadget but I've been failing a lot which is not really keeping my moral up. :( Also, my desktop seems to have died on me. This doesn't means many loses at the moment but makes me quite upset and will probably take me some precious time to fix. Until then I might just not have anything to test Archimedes on Windows or Linux so I hope you guys keep sending us reports.
That's it. Bye bye!
Marcadores:
archimedes,
blah,
extensions,
rcp,
talks
Tuesday, May 29, 2007
A new release for Archimedes
Hello,
I'm amost late AGAIN. At least this proves me something: I surely prefer tons of things before writing down to this blog. Sad but true, I'm not a writter, I'm a programmer.
Anyway, yesterday I've released the latest version of Archimedes concentrating several features I've been talking about such as Text, dimension, layers, etc...
We already found about 6 or 7 bugs during our demonstration to the architects that help us but this is only a proof that we should release unstable versions and have more people testing it. I hope make this possible by using maven to control Archimedes build and tests as well as the deploy system. Don't know for sure when this is going to happen but I will work on it in July.
I've tried to test the install system and the zip files on all three platforms and I believe everything is working fine but PLEASE tell me if something goes wrong.
Changing the subject, I've found out today how to write google gadgets and how fun this can be. I felt the need to find a gadget that would show me a UVa problem from the ACM contest each day so I could train a bit more since I wish to show a better performance on the local contest here in São Paulo this year. Looking up on their search system gave me nothing so I decided I could write my create my own gadget since Google has been asking people to do so since they renamed the personalized home to iGoogle. Checking out that feature I discovered it is only a very limited gadget factory aimed to non programmers but there I found the link I added at the begining of the paragraph.
I understood how the system worked (quite simple, it is just xml parsed into HTML code with javascript) and wrote my own gadget. I used google's users page to upload my gadget and there you go: http://nightao.googlepages.com/uvaGadget.xml. I still wish to add tons of features such as a user id preference that would make the gadget load only problems you haven't solved. Maybe parse the site to create 3 tabs with description, input, output and maybe another one to submit a solution. I got tons of ideas and with Javascript, almost anything can be done (although it is very hard to design and debug it). For those of you who use google's personalized home, I do suggest you take a look on how to build your own gadget because I can bet there are gadget you would like to have that does not exists.
That's it for now,
Bye bye
I'm amost late AGAIN. At least this proves me something: I surely prefer tons of things before writing down to this blog. Sad but true, I'm not a writter, I'm a programmer.
Anyway, yesterday I've released the latest version of Archimedes concentrating several features I've been talking about such as Text, dimension, layers, etc...
We already found about 6 or 7 bugs during our demonstration to the architects that help us but this is only a proof that we should release unstable versions and have more people testing it. I hope make this possible by using maven to control Archimedes build and tests as well as the deploy system. Don't know for sure when this is going to happen but I will work on it in July.
I've tried to test the install system and the zip files on all three platforms and I believe everything is working fine but PLEASE tell me if something goes wrong.
Changing the subject, I've found out today how to write google gadgets and how fun this can be. I felt the need to find a gadget that would show me a UVa problem from the ACM contest each day so I could train a bit more since I wish to show a better performance on the local contest here in São Paulo this year. Looking up on their search system gave me nothing so I decided I could write my create my own gadget since Google has been asking people to do so since they renamed the personalized home to iGoogle. Checking out that feature I discovered it is only a very limited gadget factory aimed to non programmers but there I found the link I added at the begining of the paragraph.
I understood how the system worked (quite simple, it is just xml parsed into HTML code with javascript) and wrote my own gadget. I used google's users page to upload my gadget and there you go: http://nightao.googlepages.com/uvaGadget.xml. I still wish to add tons of features such as a user id preference that would make the gadget load only problems you haven't solved. Maybe parse the site to create 3 tabs with description, input, output and maybe another one to submit a solution. I got tons of ideas and with Javascript, almost anything can be done (although it is very hard to design and debug it). For those of you who use google's personalized home, I do suggest you take a look on how to build your own gadget because I can bet there are gadget you would like to have that does not exists.
That's it for now,
Bye bye
Marcadores:
archimedes,
blah,
google gadgets,
uva
Tuesday, May 22, 2007
Last week of release
Ok! I AM late!
I admit it. But at least I remembered.
Anyways...
Haven't got tons of news. We are entering the last week of iteration and basically this will be devoted to improve the software in a programmer point of view. This means we won't be adding features. The work planned is to improve the software's tests (that are kind of messy since the migration) and maybe focus on a better build system using maven2. I should release the version 0.52.0 late on Sunday or maybe early on Monday.
I could already give some insights. The first one is that we will be using the recently published truetype fonts from RedHat since they are compatible with the Windows core fonts and are GPL compatible. Those will be distributed with Archimedes to ensure full compatibility across platforms. I would like to thank gtroza for this tip.
The other one is not so good. We will not be delivering any persistence system yet. The old xml persistence system that existed previously is not yet ported to this new architecture because we are figuring a way to make it flexible enough to fit all our requirements. The PDF export is not ready either... Those will probably be the highest priority in the next release so it should be done in a month.
Mainly that is it about Archimedes. The rest I have talked about on the last few weeks.
I will probably not post any other news for the rest of the week since I will focus on having the release decently ready and tested not to have as many problems as last time. Again, no screenshot since you will be able to see the news by yourselves!
Bye Bye!
I admit it. But at least I remembered.
Anyways...
Haven't got tons of news. We are entering the last week of iteration and basically this will be devoted to improve the software in a programmer point of view. This means we won't be adding features. The work planned is to improve the software's tests (that are kind of messy since the migration) and maybe focus on a better build system using maven2. I should release the version 0.52.0 late on Sunday or maybe early on Monday.
I could already give some insights. The first one is that we will be using the recently published truetype fonts from RedHat since they are compatible with the Windows core fonts and are GPL compatible. Those will be distributed with Archimedes to ensure full compatibility across platforms. I would like to thank gtroza for this tip.
The other one is not so good. We will not be delivering any persistence system yet. The old xml persistence system that existed previously is not yet ported to this new architecture because we are figuring a way to make it flexible enough to fit all our requirements. The PDF export is not ready either... Those will probably be the highest priority in the next release so it should be done in a month.
Mainly that is it about Archimedes. The rest I have talked about on the last few weeks.
I will probably not post any other news for the rest of the week since I will focus on having the release decently ready and tested not to have as many problems as last time. Again, no screenshot since you will be able to see the news by yourselves!
Bye Bye!
Marcadores:
archimedes,
blah,
fonts,
redhat
Monday, May 14, 2007
Almost one week later
Ups... I almost failed again to keep this blog up to date.
But recovered "on time". So, what are the news I have to share?
Well, mainly Archimedes news:
We are deciding if we launch the release this week end or the next one. This choice is mainly related to the free time people have to make this happen. The features that we had to develop according to the road map are not ready but a nice bunch is ok.
Just to be a bit more precise:
- The text feature is complete with an Arial font that is being packed with Archimedes. I still have to find out what are the legal issues about that and if I am allowed to distribute this. Otherwise we will have to find a cross-platform TrueType Font open-source or discover how the ones from OpenOffice are used. If anyone has any answer to those questions, please warn me.
- The layers are working again with the combo box and the layer editor window (with a lot of update bugs fixed).
- The Rectangle feature is back.
- The behaviour of the Orto system when you snap to Grid point has been "corrected". Which means that gripping has priority over orto.
- The Pan feature is back (although its shortcut through middle click isn't).
- Moving (or streching) by clicking on the snap points should be ready with a small amout of work.
- Dimensions are walking slowly but surely.
- The mouse cursor now changes when on a command. There is a big cross when waiting for a command and the small rectangle when you are on a command.
- The snap points are now dark red (just like the icons showed) and if you grip to any with the mouse, it will light up to yellow so that it is clear that you snapped.
- The infinite line is almost back. I'm just having a minor problem to render it correctly (meaning infinitely) but it should be solved quickly.
Features that we should have done and will probably be late:
- Zoom command
- Export to PDF
- Open/Save XML(.arc)
There are also several things we would like to improve in the programmer side. I can quote the build process that could be much better with Maven2, the deploy process that could be much better with continuum (or Cruise control), the test coverage of what we have done so far and a few other things.
I will probably focus on the simpler things now which are to finish the features that are almost done and, if I have some time, import the Zoom command from the last version.
I guess that's it. No screenshot this time... I'll let you guys holding your breath for the next release. :)
But recovered "on time". So, what are the news I have to share?
Well, mainly Archimedes news:
We are deciding if we launch the release this week end or the next one. This choice is mainly related to the free time people have to make this happen. The features that we had to develop according to the road map are not ready but a nice bunch is ok.
Just to be a bit more precise:
- The text feature is complete with an Arial font that is being packed with Archimedes. I still have to find out what are the legal issues about that and if I am allowed to distribute this. Otherwise we will have to find a cross-platform TrueType Font open-source or discover how the ones from OpenOffice are used. If anyone has any answer to those questions, please warn me.
- The layers are working again with the combo box and the layer editor window (with a lot of update bugs fixed).
- The Rectangle feature is back.
- The behaviour of the Orto system when you snap to Grid point has been "corrected". Which means that gripping has priority over orto.
- The Pan feature is back (although its shortcut through middle click isn't).
- Moving (or streching) by clicking on the snap points should be ready with a small amout of work.
- Dimensions are walking slowly but surely.
- The mouse cursor now changes when on a command. There is a big cross when waiting for a command and the small rectangle when you are on a command.
- The snap points are now dark red (just like the icons showed) and if you grip to any with the mouse, it will light up to yellow so that it is clear that you snapped.
- The infinite line is almost back. I'm just having a minor problem to render it correctly (meaning infinitely) but it should be solved quickly.
Features that we should have done and will probably be late:
- Zoom command
- Export to PDF
- Open/Save XML(.arc)
There are also several things we would like to improve in the programmer side. I can quote the build process that could be much better with Maven2, the deploy process that could be much better with continuum (or Cruise control), the test coverage of what we have done so far and a few other things.
I will probably focus on the simpler things now which are to finish the features that are almost done and, if I have some time, import the Zoom command from the last version.
I guess that's it. No screenshot this time... I'll let you guys holding your breath for the next release. :)
Marcadores:
archimedes,
blah
Sunday, May 6, 2007
Loading files with RCP
Keeping my efforts to post about interesting things instead of just complaining most of the time like I use to do, today, I will write about how discover the file path of certain files from within an RCP application.
First of all, the problem of loading a file in that situation must be explained. It sounds a bit stupid to explain something if it seams there is no problem to solve, right?
So, loading a file when you are coding an RCP plug-in is a problem because you can never know where your application will be relatively to the plug-in. You could hack some way out of this by assuming some things about your platform since eRCP, by default, generates always the same structure. But the fact is that this could be broken by just a few minor changes on your platform. So if we want to solve the problem correctly, we have to rely on the main application to load things correctly since it knows exactly where it is and where the plugin is.
Now that the problem should be clear, let's understand what is eRCP solution to it. The first simple solution presented is implemented in the default Activator class eclipse generates for each plugin if required. This class contains a static method findImageDescriptor that loads an image with a relative path. This is very useful since most plug-ins have some kind of image that they wish to load (icons, images, etc...) but it obviously does not solve the problem of loading any file. This operation is a bit trickier because it is pretty well decoupled so that people can load things at the level they desire.
Before version 3.2, eclipse (and eRCP in general) suggested to use the method "find" implemented in the Activator class reachable from Activator.getDefault(). Since version 3.2, this has changed and that old method is now deprecated. I don't know the reason for sure but I would guess that they found out that the Activator class shouldn't contain knowledge about how to load a file. The fact is that the static class FileLocator was created to encapsulate that knowledge.
Now that class is quite simple to use and it is probably not a problem to find out how to use the FileLocator.find(Bundle, IPath, Map) method. Most of the time, you will get the bundle from you Activator class (getDefault().getBundle()) and the Map will be empty because you probably want to load a file that has no dynamic info (otherwise, check the javadoc to know how to use it). Most commons uses of this method will just instantiate a new Path with a String argument that is the path to the file relative to the plug-in's root folder. This will return you an URL instance containing the info about your bundle and the file's path. If you check it, you will notice it is not a normal path but something like "bundleentry://bundle_number/path_to_your_file". As you can guess, there is no way you can use that to instantiate a File or a FileInputStream to read it.
And that is the hard part: You will find two static methods in FileLocator that can help you:
FileLocator.resolve(URL)
and
FileLocator.toFileUrl(URL).
In most of the cases, both method will return the same correct path. But what is the difference about them? I am not sure so please do not take this info for the truth before looking for more information. From my viewpoint, the difference regards only the path you will get at the end. The first method will return URL with http, ftp, jar, etc.. protocols while the second one will only return file protocols which is, in most cases, what you desire. Having tried to explain all this, here is the code you will get to load a file from your RCP plug-in:
I hope this helped you guys and please feel free to ask any question if I wasn't clear on something. See you guys later.
First of all, the problem of loading a file in that situation must be explained. It sounds a bit stupid to explain something if it seams there is no problem to solve, right?
So, loading a file when you are coding an RCP plug-in is a problem because you can never know where your application will be relatively to the plug-in. You could hack some way out of this by assuming some things about your platform since eRCP, by default, generates always the same structure. But the fact is that this could be broken by just a few minor changes on your platform. So if we want to solve the problem correctly, we have to rely on the main application to load things correctly since it knows exactly where it is and where the plugin is.
Now that the problem should be clear, let's understand what is eRCP solution to it. The first simple solution presented is implemented in the default Activator class eclipse generates for each plugin if required. This class contains a static method findImageDescriptor that loads an image with a relative path. This is very useful since most plug-ins have some kind of image that they wish to load (icons, images, etc...) but it obviously does not solve the problem of loading any file. This operation is a bit trickier because it is pretty well decoupled so that people can load things at the level they desire.
Before version 3.2, eclipse (and eRCP in general) suggested to use the method "find" implemented in the Activator class reachable from Activator.getDefault(). Since version 3.2, this has changed and that old method is now deprecated. I don't know the reason for sure but I would guess that they found out that the Activator class shouldn't contain knowledge about how to load a file. The fact is that the static class FileLocator was created to encapsulate that knowledge.
Now that class is quite simple to use and it is probably not a problem to find out how to use the FileLocator.find(Bundle, IPath, Map) method. Most of the time, you will get the bundle from you Activator class (getDefault().getBundle()) and the Map will be empty because you probably want to load a file that has no dynamic info (otherwise, check the javadoc to know how to use it). Most commons uses of this method will just instantiate a new Path with a String argument that is the path to the file relative to the plug-in's root folder. This will return you an URL instance containing the info about your bundle and the file's path. If you check it, you will notice it is not a normal path but something like "bundleentry://bundle_number/path_to_your_file". As you can guess, there is no way you can use that to instantiate a File or a FileInputStream to read it.
And that is the hard part: You will find two static methods in FileLocator that can help you:
FileLocator.resolve(URL)
and
FileLocator.toFileUrl(URL).
In most of the cases, both method will return the same correct path. But what is the difference about them? I am not sure so please do not take this info for the truth before looking for more information. From my viewpoint, the difference regards only the path you will get at the end. The first method will return URL with http, ftp, jar, etc.. protocols while the second one will only return file protocols which is, in most cases, what you desire. Having tried to explain all this, here is the code you will get to load a file from your RCP plug-in:
Bundle bundle = Activator.getDefault().getBundle();
Path path = new Path("path/to/your/file.extension"); //$NON-NLS-1$
URL url = FileLocator.find(bundle, path, Collections.EMPTY_MAP);
URL fileUrl = null;
try {
fileUrl = FileLocator.toFileURL(url);
}
catch (IOException e) {
// Will happen if the file cannot be read for some reason
e.printStackTrace();
}
File file = new File(fileUrl.getPath());
I hope this helped you guys and please feel free to ask any question if I wasn't clear on something. See you guys later.
Wednesday, May 2, 2007
More errors & Archimedes screenshots
Well,
People always say we should do things while rested and without rush. Otherwise we will screw everything and make it all go wrong all the time. I never really listen to those advices although I really believe they are 100% correct. That is a BIG mistake!
This BIG mistake made me screw out two Archimedes' releases in a row. 0.50.0 was a crap because the zip files were trash and the linux (and windows) installers and zips did NOT contained the OpenGL plugin required to be able to see any drawing. The next day I was there, tired again, trying to fix all the problems and, as it should be, I fixed a couple of them but never even realized that my regular expression to match the openGL plugin was NOT matching with the windows plugin. Just to have a last cherry on the cake, I found out later on (at work) that for some mysterious reason, the linux opengl plugin was generating a nice and friendly crash regarding something on the native library. So great!
This means I will release later on today yet another version of Archimedes with not 1 more feature just trying to have the bloody files to work! While I don't complete this work, I will attend to a request from a greek reader to post some Archimedes's screenshots. I took those using the deploy generated by pde for that next version. Let's hope my script will not screw everything up once again! If it does, I will be forced to stop all development and have Archimedes' core and all the plugins compiled and tested by maven2. This should solve my problems at least for some time.
The first screenshot is a clean view of a drawing on MacOS X (from my development laptop):

The second screenshot is a view of Archimedes with a nice very simple drawing during an arc creation on Ubuntu (GNU/Linux):

The last one is the layer editor view of Archimedes on Windows:

We will probably have nicer and better screenshots after the next release (in about 3 weeks) and I will update the ones at sourceforge and those ones then. For now, this is all. I will be back as soon as possible.
People always say we should do things while rested and without rush. Otherwise we will screw everything and make it all go wrong all the time. I never really listen to those advices although I really believe they are 100% correct. That is a BIG mistake!
This BIG mistake made me screw out two Archimedes' releases in a row. 0.50.0 was a crap because the zip files were trash and the linux (and windows) installers and zips did NOT contained the OpenGL plugin required to be able to see any drawing. The next day I was there, tired again, trying to fix all the problems and, as it should be, I fixed a couple of them but never even realized that my regular expression to match the openGL plugin was NOT matching with the windows plugin. Just to have a last cherry on the cake, I found out later on (at work) that for some mysterious reason, the linux opengl plugin was generating a nice and friendly crash regarding something on the native library. So great!
This means I will release later on today yet another version of Archimedes with not 1 more feature just trying to have the bloody files to work! While I don't complete this work, I will attend to a request from a greek reader to post some Archimedes's screenshots. I took those using the deploy generated by pde for that next version. Let's hope my script will not screw everything up once again! If it does, I will be forced to stop all development and have Archimedes' core and all the plugins compiled and tested by maven2. This should solve my problems at least for some time.
The first screenshot is a clean view of a drawing on MacOS X (from my development laptop):

The second screenshot is a view of Archimedes with a nice very simple drawing during an arc creation on Ubuntu (GNU/Linux):

The last one is the layer editor view of Archimedes on Windows:

We will probably have nicer and better screenshots after the next release (in about 3 weeks) and I will update the ones at sourceforge and those ones then. For now, this is all. I will be back as soon as possible.
Marcadores:
archimedes,
blah
Script errors & eRCP shortcuts
Well,
Let's see the good part of things: I'm posting a lot more on this blog (if that is somehow good). But as I started announcing good parts, it is quite obvious I did something wrong. Well, I screwed the script that generates Archimedes's installers. The result was that the generated zip file was all messed up with the path. Also, the installers were not adding most of the plugins with operations because I forgot to add the entries into the core. So I decided to add a package with those. I should probably enhance that system though. Too bad I won't do it so soon.
Anyway, back to what is important. Retaking that old series I promised about Eclipse Rich Client Platform. I'm going to talk a bit about the new shortcut system on eRCP. I thought this might be usefull because Archimedes' developers will have to do this a lot and a friend of mine was asking me about this and couldn't find anything around.
First thing people will notice when having to handle with shortcuts in eRCP is that all action has a wonderful "accelerator" field which seams to make this help useless. Unfortunatly, if you use that accelerator you friendly get a warning message and once you take a look at it, you'll find out that it is deprecated. Well, as you all should know, deprecated means that you can use it... for now! You have absolutely no guarantee that in a couple weeks it will still be there. Therefore we should try not to create new features with things that might disapear in a couple weeks. So we agree that we should find another solution to it. Great!
Make some research you find out that there is a new way to do accelerators that is much more flexible and powerful. The only problem is you hardly find any example or tip anywhere. After having suffered a lot to find how it should be done, I reached this not so simple way but indeed much more flexible and powerful. Here is an example from Archimedes:
What this xml does?
Basically defines two new extensions: commands and bindings.
The idea is that each command can have several bindings or diferent bindings for diferent languages or platforms, etc...
Why do you need those?
What you really want is the binding extension which defines a binding between a command and a key sequence. Of course, you need a command in order to have this binding. That's why you need the command. Now, if you pay attention I had to create a new class (
There you go. Now it is easy to define accelerators for your eRCP applications.
Let's see the good part of things: I'm posting a lot more on this blog (if that is somehow good). But as I started announcing good parts, it is quite obvious I did something wrong. Well, I screwed the script that generates Archimedes's installers. The result was that the generated zip file was all messed up with the path. Also, the installers were not adding most of the plugins with operations because I forgot to add the entries into the core. So I decided to add a package with those. I should probably enhance that system though. Too bad I won't do it so soon.
Anyway, back to what is important. Retaking that old series I promised about Eclipse Rich Client Platform. I'm going to talk a bit about the new shortcut system on eRCP. I thought this might be usefull because Archimedes' developers will have to do this a lot and a friend of mine was asking me about this and couldn't find anything around.
First thing people will notice when having to handle with shortcuts in eRCP is that all action has a wonderful "accelerator" field which seams to make this help useless. Unfortunatly, if you use that accelerator you friendly get a warning message and once you take a look at it, you'll find out that it is deprecated. Well, as you all should know, deprecated means that you can use it... for now! You have absolutely no guarantee that in a couple weeks it will still be there. Therefore we should try not to create new features with things that might disapear in a couple weeks. So we agree that we should find another solution to it. Great!
Make some research you find out that there is a new way to do accelerators that is much more flexible and powerful. The only problem is you hardly find any example or tip anywhere. After having suffered a lot to find how it should be done, I reached this not so simple way but indeed much more flexible and powerful. Here is an example from Archimedes:
<extension
point="org.eclipse.ui.commands">
<command
defaultHandler="br.org.archimedes.orto.OrtoHandler"
id="br.org.archimedes.orto.command"
name="orto"/>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
commandId="br.org.archimedes.orto.command"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="F8"/>
</extension>
What this xml does?
Basically defines two new extensions: commands and bindings.
The idea is that each command can have several bindings or diferent bindings for diferent languages or platforms, etc...
Why do you need those?
What you really want is the binding extension which defines a binding between a command and a key sequence. Of course, you need a command in order to have this binding. That's why you need the command. Now, if you pay attention I had to create a new class (
OrtoHandler
) to deal with the key match event. This class has to implement IHandler interface that is a publisher that allows subscribers to listen to that event and informs whether it is able to run or not and has a run method. In most cases, this will replace or be the same class you used in your Action.There you go. Now it is easy to define accelerators for your eRCP applications.
Marcadores:
archimedes,
blah,
rcp
Sunday, April 29, 2007
VoIP wonders
The last couple month have been very happy months.
I got my beloved macbook pro and got a wonderful gift from Kristian Kielhofner (founder of astlinux distribution): a small thin client (a.k.a the box) and a small phone/ethernet converter box (a.k.a the black box).
Now, those small boxes are just great. During the fisl 8.0, Kris gave me a not-so-short class about asterisk and how to work on those two boxes. Since I've been so busy, I had not had the time to have fun with them but this weekend I decided to make them work.
It took me no longer then 3 hours to have the box plugged to the cable modem, the wireless router plugged to the box working as a hub and both the black box and my desktop plugged to the router. Meaning that my whole network was running behind the box.
So far, nothing great about this right?
The great part starts now. With some help from Kris, I logged on the box and set it up to recognize the laptop's softphone, the desktop's one, my mom's laptop's phone and my home phone. Meaning that I can now, make or transfer calls from any of those to any of those. Sounds useless at home I agree. But just think about what this can do if you have a small/medium business and can't afford a PBX company (since those are REALLY expensive). You could have your whole internal communication running over your ethernet network. Let's agree on a couple things here: less cables == less pain/troubles. And the best part, this can work if you are not all the time at your office. As long as you have an internet connection, you can receive your incoming calls and people will never know you are not there. This really owns!
Following those ideas, thing about how much it would cost you to call someone in another country. The answer is simple, the local phone call from an asterisk server in that country to the phone you are calling. This is exactly what I paid to chat with Kris for about 20 minutes this afternoon as a test for the system. Except maybe that I paid nothing, more likely, Kris did. But again, this could be changed. The fact is, people could easily call my home number and dial a couple of extension to make phone calls to their beloved ones that have a good internet connection paying just a local phone call. Just imagine how great this is. It just means we are crossing another line. Years ago, the phone system was getting fans all over the world because people could speak to other people all over the world just like if they were 10 feet away. This was indeed wonderfull but it also turned out very expensive. What we are reaching now, is a cheap simple way to get all those people connected to each other.
This just amazes me. I am now for sure a fan and will become as soon as I can, a good user and maybe even a developer for those open source solutions. And once I get all my system set up, I will post a few other details and maybe I could get my config files somewhere to help anyone that wishes to try it out.
I got my beloved macbook pro and got a wonderful gift from Kristian Kielhofner (founder of astlinux distribution): a small thin client (a.k.a the box) and a small phone/ethernet converter box (a.k.a the black box).
Now, those small boxes are just great. During the fisl 8.0, Kris gave me a not-so-short class about asterisk and how to work on those two boxes. Since I've been so busy, I had not had the time to have fun with them but this weekend I decided to make them work.
It took me no longer then 3 hours to have the box plugged to the cable modem, the wireless router plugged to the box working as a hub and both the black box and my desktop plugged to the router. Meaning that my whole network was running behind the box.
So far, nothing great about this right?
The great part starts now. With some help from Kris, I logged on the box and set it up to recognize the laptop's softphone, the desktop's one, my mom's laptop's phone and my home phone. Meaning that I can now, make or transfer calls from any of those to any of those. Sounds useless at home I agree. But just think about what this can do if you have a small/medium business and can't afford a PBX company (since those are REALLY expensive). You could have your whole internal communication running over your ethernet network. Let's agree on a couple things here: less cables == less pain/troubles. And the best part, this can work if you are not all the time at your office. As long as you have an internet connection, you can receive your incoming calls and people will never know you are not there. This really owns!
Following those ideas, thing about how much it would cost you to call someone in another country. The answer is simple, the local phone call from an asterisk server in that country to the phone you are calling. This is exactly what I paid to chat with Kris for about 20 minutes this afternoon as a test for the system. Except maybe that I paid nothing, more likely, Kris did. But again, this could be changed. The fact is, people could easily call my home number and dial a couple of extension to make phone calls to their beloved ones that have a good internet connection paying just a local phone call. Just imagine how great this is. It just means we are crossing another line. Years ago, the phone system was getting fans all over the world because people could speak to other people all over the world just like if they were 10 feet away. This was indeed wonderfull but it also turned out very expensive. What we are reaching now, is a cheap simple way to get all those people connected to each other.
This just amazes me. I am now for sure a fan and will become as soon as I can, a good user and maybe even a developer for those open source solutions. And once I get all my system set up, I will post a few other details and maybe I could get my config files somewhere to help anyone that wishes to try it out.
Archimedes Road map for May 2007
Well,
It was quite obvious I am not ready to maintain a blog yet. But I will keep trying anyway.
At the moment what I have to say is that publishing a new version of Archimedes is a time taking operation. Besides from generating all the releases and zips and uploading everything to the internet both Sourceforge and CodigoLivre and manually having to upload the same files to a couple of other sites, I have to generate about 10 texts that should be published as news on those websites, mails on the releases mailing list, comments on the change log and release infos and a web page to be added to the Archimedes website.
All this work can be very time consuming and gets me very tired and bored. At the moment I have an automated system working with Eclipse PDE and bash scripts that allow me to generate the deploy and the zips and installer and upload all those files to the sourceforge and codigolivre. It basically runs an ant call on eclipse to do the pde work and then works with zip and ftp to generate the files and upload them. Took me about 1 hour to make since I'm a crappy shell scripter but now it's done. So that's the quick part now, but I still have to upload files one by one two sites (codeplex and incubadora) which is a very slow operation and I fall in the old problem: generating all those texts.
As anyone can notice, I am a REALLY crappy english writter and my teachers usually say the same about my french or portuguese writting skills. That can comforts me since I usually generate those texts very fast since I know it will suck anyway but it still takes a lot of time and energy. Especially when I have to translate some parts of it. Anyway... enough complaining.
About Archimedes, the next release should be launched may 26th if nothing goes wrong. This would mean about 1 month between both releases although I would really like it if we had news to publish weekly from now on (meaning next week should have something new to users). The plan for the next release includes:
It was quite obvious I am not ready to maintain a blog yet. But I will keep trying anyway.
At the moment what I have to say is that publishing a new version of Archimedes is a time taking operation. Besides from generating all the releases and zips and uploading everything to the internet both Sourceforge and CodigoLivre and manually having to upload the same files to a couple of other sites, I have to generate about 10 texts that should be published as news on those websites, mails on the releases mailing list, comments on the change log and release infos and a web page to be added to the Archimedes website.
All this work can be very time consuming and gets me very tired and bored. At the moment I have an automated system working with Eclipse PDE and bash scripts that allow me to generate the deploy and the zips and installer and upload all those files to the sourceforge and codigolivre. It basically runs an ant call on eclipse to do the pde work and then works with zip and ftp to generate the files and upload them. Took me about 1 hour to make since I'm a crappy shell scripter but now it's done. So that's the quick part now, but I still have to upload files one by one two sites (codeplex and incubadora) which is a very slow operation and I fall in the old problem: generating all those texts.
As anyone can notice, I am a REALLY crappy english writter and my teachers usually say the same about my french or portuguese writting skills. That can comforts me since I usually generate those texts very fast since I know it will suck anyway but it still takes a lot of time and energy. Especially when I have to translate some parts of it. Anyway... enough complaining.
About Archimedes, the next release should be launched may 26th if nothing goes wrong. This would mean about 1 month between both releases although I would really like it if we had news to publish weekly from now on (meaning next week should have something new to users). The plan for the next release includes:
- Text and Edit text working with Truetype fonts loaded from the system. This should allow users to use the text feature for real, not just like it was before.
- Simplified Dimensions with the hability to reposition the dimension's text. We might not have the time to get this completed since it depends heavily on the text to work decently.
- Layers should be back with all the old features and maybe even some improvements.
- A small "bug" on the snap behaviour with orto on will be fixed. This means snap will overrule orto if the mouse grips on some snap point.
- Moving will be enabled when selecting certain snap points for certain elements.
- Saving and Opening files on the Archimedes format should be back also.
- PDF Export should also be back to allow users to print their work or just show it to someone else.
- Rectangle, Zoom and Pan will also be back but those have no improvements planned yet.
Marcadores:
archimedes,
automated build,
blah,
roadmap
Tuesday, March 6, 2007
In love with my MacBook Pro
Hello,
I'm sorry I'm late with posting my article about automating your build and installer generation. There are two main reasons for that. The first one is that I have to learn how to do it before I can write about it. I kind of have an idea about how to do it but I should start to write a couple script and test it before I write a load of craps about it.
The second reason is that I just received my brand new MacBook Pro. This is mainly taking most of my time since I want to try every feature I discover on it. Totally got me impressed. As many say, once you try a Mac, you think twice before coming back to another OS. I could tell you that, for sure, I'm going to stay REALLY away from Windows since the only thing I used to do on Windows was playing games. But since most games I play are available for Mac, really no need to use Windows.
I wouldn't go as far as to say I'm quitting Linux that fast however. I surely believe Mac OS X is a much nicer Desktop interface and since it has a sort of Unix core I can use most of my scripts and things in it.
There are some limitations however and the problem of losing some freedom. I am, however, very pleased to see that, for once, I paid for something that was worth it. Very stable, very nice, very pretty, lots of cool features and cool softwares.
For sure I now recommend Mac for people who don't give a damn about freedom to alter the code (since usually they don't even know what "the code" is) and want a very productive and good interface.
If some day (and I doubt it) Mac opens their source code, I would consider it the best OS for personal computers anyone. Some miles ahead of Linux and some year lights ahead of Windows for sure. I should here apologize to the Gnome and KDE developers, you guys are doing a freaking good job, but Mac OS X managed to accomplish an amazing work and the Leopard version (to come yet this year they say) should bring the little features I'm missing a bit using Tiger.
Anyway, as you can read, I'm totally thrilled about my new computer so I'm a bit behind schedule on any thing while trying to have it fully configured for extensive use. If I don't have the next post ready until the week end, I promise I'll do it for Sunday.
I'm sorry I'm late with posting my article about automating your build and installer generation. There are two main reasons for that. The first one is that I have to learn how to do it before I can write about it. I kind of have an idea about how to do it but I should start to write a couple script and test it before I write a load of craps about it.
The second reason is that I just received my brand new MacBook Pro. This is mainly taking most of my time since I want to try every feature I discover on it. Totally got me impressed. As many say, once you try a Mac, you think twice before coming back to another OS. I could tell you that, for sure, I'm going to stay REALLY away from Windows since the only thing I used to do on Windows was playing games. But since most games I play are available for Mac, really no need to use Windows.
I wouldn't go as far as to say I'm quitting Linux that fast however. I surely believe Mac OS X is a much nicer Desktop interface and since it has a sort of Unix core I can use most of my scripts and things in it.
There are some limitations however and the problem of losing some freedom. I am, however, very pleased to see that, for once, I paid for something that was worth it. Very stable, very nice, very pretty, lots of cool features and cool softwares.
For sure I now recommend Mac for people who don't give a damn about freedom to alter the code (since usually they don't even know what "the code" is) and want a very productive and good interface.
If some day (and I doubt it) Mac opens their source code, I would consider it the best OS for personal computers anyone. Some miles ahead of Linux and some year lights ahead of Windows for sure. I should here apologize to the Gnome and KDE developers, you guys are doing a freaking good job, but Mac OS X managed to accomplish an amazing work and the Leopard version (to come yet this year they say) should bring the little features I'm missing a bit using Tiger.
Anyway, as you can read, I'm totally thrilled about my new computer so I'm a bit behind schedule on any thing while trying to have it fully configured for extensive use. If I don't have the next post ready until the week end, I promise I'll do it for Sunday.
Thursday, February 15, 2007
Initial post
My name is Hugo and I'm a brazilian programmer but I'll write this blog in english for some reasons. The main reason for that is that I wish to share my programming and coding experience with as many people as possible. The second reason is that I really need to practice my writting in english (in other languages also but I'll handle that somewhere else).
I should have explained this earlier but this blog will be used to report several information about my programming experiences and problems faced. Most of my code is written in Java so you'll find a lot of infos about Java specificities and platforms available for it.
The main thing that drove me to start this is the lack of information there is about Eclipse's Rich Client Platform. I found several problem using it and I wanted to share those experiences. Another important part of this blog will be dedicated to Archimedes. I started this project almost 2 years ago (around july 2005) and I'll use this blog to give some infos from inside it's development.
This should be the main road although some things may come out of it from time to time. Of course, all comments and critics are welcome (even if it regards my crappy english spelling and grammar).
I should have explained this earlier but this blog will be used to report several information about my programming experiences and problems faced. Most of my code is written in Java so you'll find a lot of infos about Java specificities and platforms available for it.
The main thing that drove me to start this is the lack of information there is about Eclipse's Rich Client Platform. I found several problem using it and I wanted to share those experiences. Another important part of this blog will be dedicated to Archimedes. I started this project almost 2 years ago (around july 2005) and I'll use this blog to give some infos from inside it's development.
This should be the main road although some things may come out of it from time to time. Of course, all comments and critics are welcome (even if it regards my crappy english spelling and grammar).
Marcadores:
blah
Subscribe to:
Posts (Atom)