How To Read Python Source Code

Dolyetyus

Co Admin
21 Nis 2020
1,204
664
Delft
Welcome to my new article dear TurkHackTeam Members.

In this topic I will write some hints you to learn how to read Python codes.

Fİrst of all, just reading source won't improve your skills all that much. You might learn a trick here and there, but on the whole, changing the code will teach you far more than reading it ever will.

5-1-900x506.jpg


I would recommend finding an open source project that you like and use, identifying a few bugs that you are interested in fixing (finding bugs should be pretty easy, and if you can't do it yourself, check the bug tracker), and then fix them. Some bugs may be harder to fix than others, which is why I suggest finding a few different bugs; if you get stuck on one, move on to another. You will have read plenty of code in order to find the bug, and you will have thought the code through enough to be able to fix a bug in it. Furthermore, you will have improved a piece of software that you know and use, and if you submit the patch back to the project, you may get good review and criticism on your patch, as well as helping out future users and getting something to stick on your resume.

For myself, I like to write some small projects randomly, so I have now implemented it in a number of different languages. My code is far from perfect, but I can then work on re-factoring and slowly working in specific patterns and practices for the language of choice.

I tend to take notes right in the source code. When writing I use a special comment character (# or ' ' ') so that I can distinguish between my own notes and the original author's comments.

Make a note on all the clever tricks, confusing flows, beautiful usgae of programming constructs, and anything else you want to remember. If you're stuck, you can also make a note about coming back to that particular section.

flatfy-blog-manset.jpeg


By writing down your thoughts, you're really making that piece of source code your own. Over time, the constructs you pick up will start leaking into your own works.

Well, I hope you can benefit this article. Have a good day.
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.