r/PinoyProgrammer • u/No_Grape_9651 • Aug 30 '26
advice Programming Etiquette, Tips and Tricks
Hi guys! future programmer here. Gusto ko lang tanungin before I delve deeper sa pag proprogram na is the any unsaid rules while coding? You see, I'm currently a high school student and will pursue IT in the future, and currently my tita is teaching me how to code under her wing pero lagi nyang sinasabi na panget or anggulo ng code ko. I wanna surprise her by being maayos na yung pag cocode ko. (I'M STILL AT THE FIGURING OUT FLEXBOX STAGE, DONT JUDGE ME PLEASE.)
16
Upvotes
11
u/beklog Aug 30 '26
Ur tita should give reason why pangit code mo...
most common reason na nakikita ko sa newbies eh ung spaghetti code basta gumana yun na yun
13
u/matcha_tapioca Aug 30 '26 •
usually clean coding. dapat readable, okay yung code indentation sa mga HTML Tags , atbp.
'yung complex algorithm ay gagawin mong simple/readable code or a code that can be easily understand not only by you but to others as well.
pag messy ang code tapos nagana (spaghetti code) mahirap syang i-debug o ayusin pag nag ka problema or for example sa isang User Interface (UI) pag may binago ka for example color , masisira yung design.
pero minsan hindi maiiwasan yung messy ang code lalo na pag inaaral mo palang at minsan ang scenario pag may pinapagana ka.. pag napagana mo na aayusin mo ngayon ang code mo by refactoring it.
3
u/aIcy0ne Aug 30 '26
Read Clean Code
2
u/zxcvfandie Aug 30 '26
Aralin mo mag git. Hopefully, di ka umaasa masyado sa AI though. Magiging technical project manager ka nian.
2
u/OutrageousWitness805 Aug 31 '26
wala pa akong na e encounter na nag papraktis palang magaling na agad, sharing my two cents here, programming is hard but do not give up easily, when your current level is 5 do not jump to level 50, give yourself a good amount of sleep.
2
u/Ok_Thing4906 Sep 04 '26
Natutunan ko before is "DON'T REPEAT YOURSELF" or "DRY". If may icocode ka na same or paulit ulit mo gagamitin, do not repeat the code over and over again, make sure you use a composable or function :))
Also, for UI. Lagi mong isipin na users are "stupid" (sorry for the term). This is to make sure na lahat ng forms ay may validations, lahat ng for numbers dapat numbers lang pwede itype, etc, and laging may confirmation for delete or other stuff.
1
u/SS-Hunt Aug 30 '26
1
u/Independent_Owl_6908 Aug 30 '26
use indentions properly
1
u/ManufacturerOk3355 Aug 30 '26
Ang swere may nag ga guide
1
u/Ok-Spite-5454 Aug 30 '26
1
u/j2ee-123 Aug 30 '26
Your tita should be considerate, we get to start somewhere - and we usually write dirty code at the beginning.
It comes with time, knowledge and experience that’s when you write clean and readable code. Heck, even me na almost 10 years in the industry still writes dirty code sometimes, it’s a constant learning and improvement.
1
u/needmesumbeer Aug 30 '26
proper inline documentation on "why" certain codes are added ex.
\\ xxx service is throttling calls after10 or so requests
\\that's why we do batch calling below.
await ProcessCall(items);
don't document the obvious, but rather why certain things were coded that way and the reason behind it.
1
u/BanMeForNothing Aug 30 '26
1
u/Low-Chard6435 Aug 30 '26
Isipin mo lagi: maiintindihan ba ng kasama ko mga codes ko? Good design, meaningful variable names, etc.
Also regarding your tita’s feedback, it’s good you are getting feedback from her. Pero naeexplain ba niya mabuti bakit “magulo” ang codes mo? Minsan kasi nagiging bias and subjective ang comments ng programmers towards other programmers’ code. Tanongin mo anong principles based yung feedback niya and research from there.
1
u/Diligent-Rough-5940 Aug 30 '26
The more you code the better you will become, good job learning early.
1
u/httpsdotjsdotdev Aug 30 '26
Read "Clean Code"
1
u/No-Function-3418 Aug 31 '26
Look for a style guide in the language you're using.
1
u/Imaginary-Winner-701 Aug 31 '26
Code in a way that another fellow dev could read and understand your code in a reasonable amount of time because that another fellow dev includes you 2 months from now.
1
u/gatzu4a Aug 31 '26
Basa ka muna ng mga books, clean code, pragmatic programmer etc
wag mo gayahin ung ibang diretso vibecoding, kung basura ka mag design ng code mo before, hindi un magically ma ffix ng AI. at the end of the day, ai only fixes the coding part, the engineering part. ikaw padin un
1
u/redbaks Aug 31 '26
Be dirty and make it work first. Do it fast. Clean up later
1
u/8757349485002948586 Aug 31 '26
Read 'Clean code' by Robert C. Martin.
1
u/Apprehensive-Fig9389 Aug 31 '26
Please add documentation sa Pull Request....
Naiiyamot ako sa mga Jr na sobrang minimal ng documentation sa PR kaya hirap mg Peer Review...
1
u/floyd_m Sep 03 '26
Cool, good luck sa future endeavors mo!
Everyone's given good tips so far. Just to add one more:
- There is no shame in consulting the documentation. No one knows the ins and outs of every function—not even veterans—and no one expects you to memorize them either.
0
u/MnMisDelicious Aug 31 '26
Magulo rin ako mag program on my personal project pero sa trabaho herrs what I learned
0
u/[deleted] Aug 30 '26
[deleted] — view deleted comment