Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualthok

Posted 26 April 2013 - 07:28 AM

I've read some of the style guide before, but haven't finished yet. I think I will finish it now, but don't worry, my code is pretty neat at the moment. Also, that tool will be useful.


 

I'm not worried. But someone else (including the future you) trying to read your code might. =)

 

 

I will start coding now. Is there a place here to post my code (when it's finished) so I can get feedback or review about it? I think getting some feedbacks will be nice.

 

Yes, there are many places to store your code online and receive feedback, which leads me to another important software development topic: version control. Are you using version control? If not, start using a version control system now.

 

One of the best places (in my opinion) to post code is GitHub.com. You'll need to learn how to use git, which is a great skill to have. Many people are using git. You can either store your code in your repository, or you can use `gists` which are a lighter-weight method of storing code and text. `gists` are ideal for small bodies of code (scripts, prototypes, examples, etc.), whereas a full repository is ideal for large bodies of code (a project, a library, etc.).

 

I recommend starting with gists first, because you don't need to learn git commands to use them. Gists are also good because they're tied to your github account, so you can find them easily. (As a software developer, github is a create place to build a portfolio. Many potential employers will ask for code samples; it's great to just be able to point them to your github page.)

 

Another simpler, quicker, and slightly more crude way to post code is to use something like pastebin.com or pastie.org. Both services can do syntax highlighting for a bunch of major languages (bash, C, XML, Java, Python, etc.).

 

ABOUT LICENSING:

 

If you're going to post code, make sure the license of the code is clear. This can either be done with a license header in the file (example: https://gist.github.com/larsbutler/5330230) or with a LICENSE file in the repository (example: https://github.com/larsbutler/geomet/blob/master/LICENSE.txt). If the code belongs to someone else, be sure to note who wrote it and how it is licensed. A lot of people who post code on their blogs do not specify a license for their code, which is a mistake in my opinion. (This leads to people either using code in such a way that the original author didn't intended or doesn't like, or simply not being able to use the code for fear of infringing on a copyright. The pymmo code, for example, did not include a license, as far as I can tell.

 

For your original code, you can choose an open source license so people can use your code. See http://en.wikipedia.org/wiki/List_of_software_licenses and http://opensource.org/licenses to find out more. If you don't really care that much and want to license your code in an extremely "free" way, the BSD or MIT license is a good choice.

 

If you want to post your code publicly, but you don't necessarily want to use an open source license, you can simply include a statement in your code that you are the copyright owner and that use of this code is not permitted for commercial/personal/educational (be specific as you want) purposes. Just be aware that if your code derived from open source licensed code, the license of that code may prohibit you from "closing" your code in this way.


#1thok

Posted 26 April 2013 - 07:22 AM

I've read some of the style guide before, but haven't finished yet. I think I will finish it now, but don't worry, my code is pretty neat at the moment. Also, that tool will be useful.


 

I'm not worried. But someone else (including the future you) trying to read your code might. =)

 

I will start coding now. Is there a place here to post my code (when it's finished) so I can get feedback or review about it? I think getting some feedbacks will be nice.

 

Yes, there are many places to store your code online and receive feedback, which leads me to another important software development topic: version control. Are you using version control? If not, start using a version control system now.

 

One of the best places (in my opinion) to post code is GitHub.com. You'll need to learn how to use git, which is a great skill to have. Many people are using git. You can either store your code in your repository, or you can use `gists` which are a lighter-weight method of storing code and text. `gists` are ideal for small bodies of code (scripts, prototypes, examples, etc.), whereas a full repository is ideal for large bodies of code (a project, a library, etc.).

 

I recommend starting with gists first, because you don't need to learn git commands to use them. Gists are also good because they're tied to your github account, so you can find them easily. (As a software developer, github is a create place to build a portfolio. Many potential employers will ask for code samples; it's great to just be able to point them to your github page.)

 

Another simpler, quicker, and slightly more crude way to post code is to use something like pastebin.com or pastie.org. Both services can do syntax highlighting for a bunch of major languages (bash, C, XML, Java, Python, etc.).

 

VERY IMPORTANT NOTE ABOUT LICENSING: If you're going to post code, make sure the license of the code is clear. This can either be done with a license header in the file (example: https://gist.github.com/larsbutler/5330230) or with a LICENSE file in the repository (example: https://github.com/larsbutler/geomet/blob/master/LICENSE.txt). If the code belongs to someone else, be sure to note who wrote it and how it is licensed. A lot of people who post code on their blogs do not specify a license for their code, which is a mistake in my opinion. The pymmo code, for example, did not include a license, as far as I can tell. For your original code, you can choose an open source license so people can use your code. See http://en.wikipedia.org/wiki/List_of_software_licenses and http://opensource.org/licenses to find out more. If you don't really care that much and want to license your code in an extremely "free" way, the BSD or MIT license is a good choice.

 

If you want to post your code publicly, but you don't necessarily want people to be able to use your code, you can simply include a statement in your code describing the copyright owner and that use of this code for commercial/personal/educational (be specific as you want) purposes is not permitted. Just be aware that if your code derived from open source licensed code, the license of that code may prohibit you from "closing" your code in this way.


PARTNERS