
My open source bike
“The warrior will not give up.”
Master Shifu, mf Kung Fu Panda
You can consider this topic not as technical, but as artistic. There will be no pieces of code, class diagrams and other nonsense. There will be a story of one java open source project that I have been developing for about a year.
It all started when I was in my fourth year at a provincial Russian university. From the semester, about which there were legends in my specialty, as about the “killer semester” with its 55th laboratory work in graphics, compilers and computational mathematics (hereinafter VM).
When at the beginning of the semester you think about the upcoming big and boring (and at universities, as a rule, everything is boring) work, your hands often begin to give up. Fortunately, I already had a time-tested recipe for “endless enutiism”. Its meaning was “endless knowledge of the unknown” (c) Strugatsky, Monday begins on Saturday. Simply put, every time I tried to at least somehow distort the standard educational process, so that it would become at least a little more interesting for me. A large number of methods have been tried - Linux on a working machine (with drivers from ATI), languages unpopular in university circles (read not C # and C ++) and development environments (read not VS2008), bug trackers for tasks, local code repositories for laboratory etc.
Then I decided to start writing my open source project, which is an aggregation of laboratory work at the VM course in the form of a java library with transparent and familiar APIs for java programmers.
I created a project on Google Code, came up with the name of the library and work began. Each next laboratory at the VM rate was a bundle of commits to the library repository. It was something new for me and helped me maintain my enthusiasm throughout the course.
At the end of the course, la4j (Linear Algebra for Java) has grown to version 0.0.7 and already knew how to work with vectors and matrices, solve linear equation systems in 6 different ways, and find eigenvalues and matrix vectors.
After completing the VM course, I almost did not deal with the project, the course ended - my enthusiasm ran out. Everything changed when a new course began - Design Patterns.
This course was incredibly interesting to me, I even began to write a series of articles about it on Habrahabr about it . But the main thing here is that I realized all the mistakes that I once made in la4j. I could not tolerate this, and armed with convenient Eclipse refactoring tools, I began to shred the code. So it turned out version 0.1.0. A version that was no longer ashamed to show someone. She had a nice OOP design, small but sufficient functionality. And most importantly - it was the result of quite a lot of work from which I felt satisfaction.
I can’t say that until this stage I positioned la4j as an open source project. I perceived this as my hobby, as a platform for honing my knowledge and skills. I just did it just for fun.
Then for a while I forgot about la4j again and began to work hard at work, combining study and work. By fate, I began to engage in the performance of the Java platform at work, and this fact made me take a fresh look at the computational algorithms inside la4j.
I tried to apply the gained experience of performance analysis and optimizations in la4j. So the article “The history of one optimization” was born, which aroused great interest among users of my project. At that moment I received a large number of reviews, and most importantly - offers of help. Several people expressed a desire to help me further develop the project.
Then it seemed to me that now everything will change. People will start writing code and a bunch of commits will fly to my repository. But that did not happen.
I added at least a couple of people to the project, talked about future plans and even posted an issue for each of them with an approximate task. I myself was looking forward to the reaction of new participants. Unfortunately, I did not wait. People were gone, I decided to freeze the project for an indefinite period.
Then, I graduated from university and got a permanent job. I can only say that I liked working much more than studying. I had a lot of free time that I wasted trying to take a break from defending my diploma and marathon for 5 years.
In September, all students begin to study and a conditioned reflex worked for me like Pavlov’s dog - you need to write laboratory ones, learn functional analysis, etc. Then I remembered about la4j and decided that I should finish it. Finish not because “the solution of LU systems is a very important and urgent problem of our time”, but simply because, when I started it and didn’t finish it.
First of all, I transferred the project to Maven, and began to write tests, deciding to use the TDD methodology. As it turned out, my choice was successful - firstly, you can see the progress, secondly, you feel when the product is ready for release.
I completely redefined the whole architecture, rewrote a lot of code and wrote a new one. Added functionality (sparse matrices, decompositions, input / output , etc.). I even fixed several bugs that I could not notice without unit testing.
And ...
A few days ago, I finished work on version 0.2.0 . A lot of work was done, a lot of technical and not-so decisions were made, 55 classes were designed and implemented, 6,700 lines of code and about 80 jUnit tests were written. I hope my work will not be wasted, and will become another convenient tool in the portfolio of any java-developer.
I beg you, reader. Before writing a comment, pay attention to the list of ready-made questions and answers.
Q: “In Java no one writes computations, bury!” A
: “They write. Moreover, they still don’t want to use wrappers over BLAS because of binding to the native platform. ”
Q: “There is JAMA, why another bike?”
O: a) Because he is his own. b) JAMA does not support sparse matrices. c) JAMA does not support input / output. c) JAMA has a terrible API. d) JAMA has terrible performance.
UPD : The other day, version 0.4.0 (06/03/2013) became available
UPD : Quietly and quietly version 0.4.5 was released ( 02/02/2013 )
Master Shifu, mf Kung Fu Panda
You can consider this topic not as technical, but as artistic. There will be no pieces of code, class diagrams and other nonsense. There will be a story of one java open source project that I have been developing for about a year.
Start
It all started when I was in my fourth year at a provincial Russian university. From the semester, about which there were legends in my specialty, as about the “killer semester” with its 55th laboratory work in graphics, compilers and computational mathematics (hereinafter VM).
When at the beginning of the semester you think about the upcoming big and boring (and at universities, as a rule, everything is boring) work, your hands often begin to give up. Fortunately, I already had a time-tested recipe for “endless enutiism”. Its meaning was “endless knowledge of the unknown” (c) Strugatsky, Monday begins on Saturday. Simply put, every time I tried to at least somehow distort the standard educational process, so that it would become at least a little more interesting for me. A large number of methods have been tried - Linux on a working machine (with drivers from ATI), languages unpopular in university circles (read not C # and C ++) and development environments (read not VS2008), bug trackers for tasks, local code repositories for laboratory etc.
Then I decided to start writing my open source project, which is an aggregation of laboratory work at the VM course in the form of a java library with transparent and familiar APIs for java programmers.
I created a project on Google Code, came up with the name of the library and work began. Each next laboratory at the VM rate was a bundle of commits to the library repository. It was something new for me and helped me maintain my enthusiasm throughout the course.
At the end of the course, la4j (Linear Algebra for Java) has grown to version 0.0.7 and already knew how to work with vectors and matrices, solve linear equation systems in 6 different ways, and find eigenvalues and matrix vectors.
Mid
After completing the VM course, I almost did not deal with the project, the course ended - my enthusiasm ran out. Everything changed when a new course began - Design Patterns.
This course was incredibly interesting to me, I even began to write a series of articles about it on Habrahabr about it . But the main thing here is that I realized all the mistakes that I once made in la4j. I could not tolerate this, and armed with convenient Eclipse refactoring tools, I began to shred the code. So it turned out version 0.1.0. A version that was no longer ashamed to show someone. She had a nice OOP design, small but sufficient functionality. And most importantly - it was the result of quite a lot of work from which I felt satisfaction.
I can’t say that until this stage I positioned la4j as an open source project. I perceived this as my hobby, as a platform for honing my knowledge and skills. I just did it just for fun.
Then for a while I forgot about la4j again and began to work hard at work, combining study and work. By fate, I began to engage in the performance of the Java platform at work, and this fact made me take a fresh look at the computational algorithms inside la4j.
I tried to apply the gained experience of performance analysis and optimizations in la4j. So the article “The history of one optimization” was born, which aroused great interest among users of my project. At that moment I received a large number of reviews, and most importantly - offers of help. Several people expressed a desire to help me further develop the project.
Then it seemed to me that now everything will change. People will start writing code and a bunch of commits will fly to my repository. But that did not happen.
I added at least a couple of people to the project, talked about future plans and even posted an issue for each of them with an approximate task. I myself was looking forward to the reaction of new participants. Unfortunately, I did not wait. People were gone, I decided to freeze the project for an indefinite period.
Then, I graduated from university and got a permanent job. I can only say that I liked working much more than studying. I had a lot of free time that I wasted trying to take a break from defending my diploma and marathon for 5 years.
In September, all students begin to study and a conditioned reflex worked for me like Pavlov’s dog - you need to write laboratory ones, learn functional analysis, etc. Then I remembered about la4j and decided that I should finish it. Finish not because “the solution of LU systems is a very important and urgent problem of our time”, but simply because, when I started it and didn’t finish it.
First of all, I transferred the project to Maven, and began to write tests, deciding to use the TDD methodology. As it turned out, my choice was successful - firstly, you can see the progress, secondly, you feel when the product is ready for release.
I completely redefined the whole architecture, rewrote a lot of code and wrote a new one. Added functionality (sparse matrices, decompositions, input / output , etc.). I even fixed several bugs that I could not notice without unit testing.
And ...
Almost the end
A few days ago, I finished work on version 0.2.0 . A lot of work was done, a lot of technical and not-so decisions were made, 55 classes were designed and implemented, 6,700 lines of code and about 80 jUnit tests were written. I hope my work will not be wasted, and will become another convenient tool in the portfolio of any java-developer.
the end
I beg you, reader. Before writing a comment, pay attention to the list of ready-made questions and answers.
Q: “In Java no one writes computations, bury!” A
: “They write. Moreover, they still don’t want to use wrappers over BLAS because of binding to the native platform. ”
Q: “There is JAMA, why another bike?”
O: a) Because he is his own. b) JAMA does not support sparse matrices. c) JAMA does not support input / output. c) JAMA has a terrible API. d) JAMA has terrible performance.
Resources
- Offial web site
- la4j at github
- la4j at Blogger
- The idea of implementing an I / O package
- The story of one optimization
UPD : The other day, version 0.4.0 (06/03/2013) became available
UPD : Quietly and quietly version 0.4.5 was released ( 02/02/2013 )