![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
In my advisor's office the other day, $collaborator2 and I were going back and forth about this soft-query interface my advisor wants us to build. (This is what CHARUN has come back from Development Hell to provide. I talked about that a few entries ago, so I won't repeat myself.) One thing led to another, and when the dust settled, it was on me to write the backend (in C) and retool the frontend (in PHP and, now, Javascript via Sajax), while $collaborator2 did the middleware (based on SVM-light, which is also in C, which I would then write a SWIG PHP wrapper for).
Well, he emailed me tonight to say he'd finished the middleware portion to do what I wanted. I took a look at what he'd written, and was immediately suspicious: I'd asked for a function which returned a vector of weights in the form of a double[], and he had indeed written such a thing, but the parameters were (int argc, char* argv[]). Further, the elements in argv[] were mostly turning into file handles. "The hell?" I said to myself, dug through this rather baroque function, found the part that actually computed the weight vector, and rewrote that as a much smaller function. (Still not elegant, as this is C, but at least it was easier to read.)
I fired that off to him, and a few minutes later he came online to discuss what I'd written. During the course of the discussion, he admitted he'd simply yanked main() part and parcel from another part of SVM-light which did what I wanted (among other things), which I'd already suspected from the parameter names. DO NOT DO THIS, PEOPLE. IT MAKES CODE LOOK UGLY AND REUSES UNNECESSARY MATERIAL.
Now, don't get me wrong: $collaborator2 is a smart guy, and he understands the math behind this way better than I do. I would have a hard time doing this project without him, because among other things, I've never done a partial differential equation before. But it's really frustrating when people parcel out the work on a project and then I have to go back and micromanage them because they do something dumb and slipshod. I could have spent the same amount of time writing the code myself in the first place, you know?
Oh well. In happier news, tonight I discovered DOM-Drag and its offspring, dragsort, which are going to make the UI for this so very very pretty. Still don't like Javascript (though I like C less), but the fact that it has a good DOM API redeems it somewhat (ok, a lot) in my sight.
Also, availability of online library resources will be one of the deciding factors in my choice of institutions to do a postdoc with. A subscription to Safari would be ideal.
I really need to stop writing software in languages I hate. It would do wonders for my mood.
Well, he emailed me tonight to say he'd finished the middleware portion to do what I wanted. I took a look at what he'd written, and was immediately suspicious: I'd asked for a function which returned a vector of weights in the form of a double[], and he had indeed written such a thing, but the parameters were (int argc, char* argv[]). Further, the elements in argv[] were mostly turning into file handles. "The hell?" I said to myself, dug through this rather baroque function, found the part that actually computed the weight vector, and rewrote that as a much smaller function. (Still not elegant, as this is C, but at least it was easier to read.)
I fired that off to him, and a few minutes later he came online to discuss what I'd written. During the course of the discussion, he admitted he'd simply yanked main() part and parcel from another part of SVM-light which did what I wanted (among other things), which I'd already suspected from the parameter names. DO NOT DO THIS, PEOPLE. IT MAKES CODE LOOK UGLY AND REUSES UNNECESSARY MATERIAL.
Now, don't get me wrong: $collaborator2 is a smart guy, and he understands the math behind this way better than I do. I would have a hard time doing this project without him, because among other things, I've never done a partial differential equation before. But it's really frustrating when people parcel out the work on a project and then I have to go back and micromanage them because they do something dumb and slipshod. I could have spent the same amount of time writing the code myself in the first place, you know?
Oh well. In happier news, tonight I discovered DOM-Drag and its offspring, dragsort, which are going to make the UI for this so very very pretty. Still don't like Javascript (though I like C less), but the fact that it has a good DOM API redeems it somewhat (ok, a lot) in my sight.
Also, availability of online library resources will be one of the deciding factors in my choice of institutions to do a postdoc with. A subscription to Safari would be ideal.
I really need to stop writing software in languages I hate. It would do wonders for my mood.