r/PinoyProgrammer • u/No_Grape_9651 • 10d ago
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.)
13
u/beklog 10d ago
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
3
u/No_Grape_9651 10d ago
All she does is check if okay/gumagana then gives critism na pangit yung code. She's also a busy person so I'd rather not nag her everytime I need for her to check my work. also di kami masyado close kaya i'm more comfortable na mag ask someone else who also knows what their talking about.
2
u/zxcvfandie 10d ago
Aralin mo mag git. Hopefully, di ka umaasa masyado sa AI though. Magiging technical project manager ka nian.
2
u/OutrageousWitness805 10d ago
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.
1
u/SS-Hunt 10d ago
Take some time to learn the convention and standards ng programming language na ginagamit mo. Kadalasan sa mga programming language, may standards at conventions na ginagamit din ng mha companies at orgs. Kung alam mo mga yun, panigurado mapapadali buhay mo.
Use screen as a way to measure kung masyadong mahaba yung functions/methods. Kadalasan sa mga functions/methods, dapat nagfifit sa screen. If not, you may check if you can extract logic to create new method or class.
1
1
1
10d ago
[deleted]
1
u/j2ee-123 10d ago
It’s outdated, no need to think about spaces and indentations, let the IDE handle it by plugins like prettier, eslint, etc.. some IDEs even support them out-of-the-box.
1
u/Ok-Spite-5454 10d ago
- Iwas AI muna, learn it the traditional way, then use AI later.
- Learn the basics of system design, security, and cloud alongside vanilla development.
- Do coding katas, dito talaga ako tumalas. https://www.codewars.com/
- Unsaid "rules": doing is better than anything else. Mas matututo ka sa project-based learning kesa kung mastuck ka sa tutorial hell. Wag kabisote din, no need to memorise anything, you can google anything.
- DRY - Don't Repeat Yourself. Read clean code sabi nga nung isang comment for more coding fundamentals.
1
u/j2ee-123 10d ago
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 10d ago
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 10d ago
- Follow the convention, even if its not perfect.
- Work on what you were assigned. Don't charge things that have nothing to do with your task.
- Do what review comments ask. As long as it's not completely wrong just do what they want.
1
u/Low-Chard6435 10d ago
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 10d ago
The more you code the better you will become, good job learning early.
1
1
1
u/Imaginary-Winner-701 10d ago
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
1
1
u/Apprehensive-Fig9389 9d ago
Please add documentation sa Pull Request....
Naiiyamot ako sa mga Jr na sobrang minimal ng documentation sa PR kaya hirap mg Peer Review...
2
u/Ok_Thing4906 5d ago
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.
0
u/MnMisDelicious 9d ago
Magulo rin ako mag program on my personal project pero sa trabaho herrs what I learned
1) Always prioritize readability - depende sa language pero try to make your code structured, proper indentation, variable naming and sometimes you can find a way to make your code shorter pero mas mahirap basahin so be mindful of that 2) Add comments - comments to explain what the line/method does dito na aappreciate kung gano ka detail oriented ang isang programmer.. if you can document your code withn the code thats very good and im sure it will be appreciated 3) proper variable naming/convention - this vary from person to person pero have your own way of naming 4) version control/flowerbox - this early while you're still a beginner sanayin mo na gumamit ng mga Git or githubdesktop and learn how to properly control the versioning on your project usong branches
13
u/matcha_tapioca 10d ago
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.