[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
File: 9 KB, 220x147, tmp_11575-Richard_Matthew_Stallman_working_on_his_Lemote_Machine.JPG-1575579653.jpg [View same] [iqdb] [saucenao] [google] [report]
58119036 No.58119036 [Reply] [Original] [archived.moe] [rbt]

How do I be a good programmer /g/?

Im using Visual Studio to make Free Software. But my code is one giant wall of text. Am I supposed to be breaking it into smaller parts like other pages and methods.

How are you all gonna be able to wade through my Free Code to audit it for bitcoin miners and botnets if its such a mess?

>> No.58119071

If you're planning on open sourcing and publishing your code, having some sort of cohesive structure is absolutely imperative. Sort your methods how you think they are best done so, and split them up according to category/function - make necessary changes to your code having done that. Aside from that, you might consider intentionally putting in blank lines and such in particularly verbose parts of the code, splitting it up so that it has some sort of structure that makes sense,

>> No.58119082


>> No.58120075
File: 1019 KB, 500x373, 63421.gif [View same] [iqdb] [saucenao] [google] [report]

Remember to never use ableist, homophobic, racist or sexist language in your ruby project's code of conduct, shitlord. (^:

>> No.58120103
File: 283 KB, 480x451, absolutely_stallman.png [View same] [iqdb] [saucenao] [google] [report]


>> No.58120917

ehm... split it?

>> No.58121008

also, splitting your code in different files can help you and others to have a better understanding of how your code is organized. I personally seldom include other functions than the main in the main file, except when they use global variables (a bad habit of mine, I know…).
Personally, I create my files according to the category of my functions, if I have a function related to some kind of analysis (generally audio spectrum and signature in my case), it will generally be in a file or a folder named “analysis”.

Also, I prefer to mention it just in case, comment and document your code. Even if you do not plan on sharing it. Doing so will help you clear your mind on how your code work, and it will help you so much remember the mechanisms of your code if you go back to it months later ––needless to say it will be crucial if you plan on sharing your code with other people.

In short: make your code easy to understand, and this as much as possible.

>Im using Visual Studio to make Free Software
kek, well done boy

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.