It’s been a while, since last post…
A lot of work through holidays, if I could call it that way. Holidays for people around me, and for me, it was like a extended school period.
Anyway, I’ve been doing some rather neat things regarding my point of interest. Since I’m about to finish master studies at my faculty, or I hope I will asap, I’ve been wasting my time on couple of last exams. To make it short, there was a subject called Internet Programming, about JAVA web technologies, and for the project I did something I firstly doubled I could.
Main goal was to connect my idea of programming XMPP client, with GlassFish application server. It was very frustrating experience, since there is no systematic documentation about various Java technologies online. So, I had to use forums, and strongly rely on my intuition about some things. I have used GlassFish 3.1.2 server, with NetBeans 7.2 IDE and Jabberwocky framework for implementing XMPP components. It took me about two weeks to make it work, since CDI has been bugging me for a week. Like I said, documentation was very poor, and community very small. I’d like to thank to a man/team developing this framework, since they tried to help me. In the end, I did full install on virtual machine with java 7 jdk packages, and it worked without any problems. For developing console based client, I have used Smack Java library, and developing the client was a peace of cake, in comparing to the Jabberwocky component. But, it worked splendid at project presentation. Not to mention that professor did not even look at the code 🙂
Thing I’ve been working for a couple of days now is Python/PyGame simulation for another subject, which exam I’m going to take tomorrow. Simulation is about satellite/space ship orbiting a planet. Since that subject lectures finished in January, I did first satisfying version in February, but it had some peculiar errors in calculations (numerical), so I’ve abandoned it for some time. This is the video of it:
The second version, which I completed couple of days ago, had those errors fixed, but I did remove all eye cookie, just for the sake of debugging speed. This is the second version:
As you can see, there are no fancy panels, but having fixed all the errors, I’ve “repaired all system panels, and restore it to it full capacity” 🙂 and added some eye cookie, like velocity vector, gravitational force vector and radius vector. I hope it is finished, for good 🙂 Here is the final version:
Since this is based on numeric calculations, there is some calculation error, based on how short time period is. In this case, time period is 10^-2. To make things more serious, I’ve made some tests, without graphic interface and exported them and draw some charts in PyPlot. In, lets say, first 300 steps of iteration, error is slight, and you can see even on graphic representation. If you make 1000 iterations, and take 300 steps at the end, you can see how numeric orbit is changed through time, in comparing to a orbit which is drawn regarding analytic formula. Here is the chart for 300 steps, form 699th until 999th.
Blue line is orbit drawn by coordinates based on iterative process. Green one is based on 100% correct coordinates based on analytic formula of ellipse. Reducing time period to 10^-4, errors are slight even for 20 000 iteration steps. Of course, you have to find balance between wanted precision and time needed to finish calculations.
This is what I’ve been doing lately. Maybe its interesting?