My first ever open source code contribution

in #boinc5 years ago

So I just helped out programming some stuff for a large project for the very first time!

For those of you that don't know, BOINC stands for the Berkeley Open Infrastructure for Networked Computing, and is the network of computers and the software that runs on them that allows people to participate in volunteer scientific computing. This is where you can donate your computer's time and resources to solve scientific problems such as curing cancer or discovering astronomical events such as supernovae.

It is my pleasure to help the developers, and considering I've been a long-time user of BOINC, I thought I'd donate a little more!

What I did

I solved issue #3245 which caused the compiler to produce a warning due to bad memory manipulations.

What this means is, the program that builds this software warned us (the programmers) that what's being done is not really conventional and possibly dangerous.

What was happening was objects were being deleted manually in memory rather than being cleared safely using functionality already provided to us.

An analogy

Imagine you dig a hole, doesn't matter how big, the important thing is, you keep all the soil. Then what you do is you go in there and you host a tea party, get a table, a few chairs, a kettle, etc.

But when you are done with the tea party, all you do is bury it with your soil. And then, if you want to use it again, you dig the hole back up (including the tea party) and you build another tea party. A lot of effort and a lot of resources wasted.

What I did was instead of dumping all the soil back and then digging it back up, I simply packed up the tea party, ready to use for another time.

How I did it

  1. Fork the BOINC software repository

  2. Create a new branch and start changing the code on my own fork

  3. Test the changes by compiling the software and checking for errors

  4. It works on my machine so let's push the changes to my branch

  5. Make a PR. Interestingly enough, there was a template with a few questions I had to fill out regarding my changes so that they are well documented.

  6. Uh oh, there was a build error with one of the testing scripts:

    This seems to be an error that only occurs on the MacOS GNU C Compiler.

  7. Fix the error so all platforms are happy. Simply push the changes to my branch.

  8. Wait for my changes to be pulled into the master branch and implemented into the next release.

  9. $$$

Conclusion

In the end, I felt like I accomplished a very tiny piece of the puzzle that helps someone down the track.

Along with helping out, I learned quite a bit about certain parts of the C++ language. I have completed a course at university for programming in C++ but even with that, there were some concepts and situations I've never come across before, and this experience allowed me to learn about not only these new concepts, but also how an open-source software package is developed.


Gridcoin Discord | Gitlab | Donate | [email protected]

Sort:  

@untersatz curate 100

Posted using Partiko iOS

This post has been upvoted by witness @untersatz. You've done a great job!
The @untersatz witness and manual curation is under the guidance of @contrabourdon and @organduo.
Current VP: 85.79%

@alliedforces curate

Posted using Partiko iOS

You got some love from a member of @thealliance family!
Keep up the great work!
The #spreadlovenotwar curation campaign is under the guidance of witnesses @enginewitty and @untersatz.
Current VP: 98%