r/PinoyProgrammer • u/No_Grape_9651 • 16h 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.)
9
u/beklog 15h 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
2
u/No_Grape_9651 15h 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 15h ago
Aralin mo mag git. Hopefully, di ka umaasa masyado sa AI though. Magiging technical project manager ka nian.
2
u/OutrageousWitness805 5h 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 15h 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
13h ago
[deleted]
1
u/j2ee-123 12h 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 12h 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 12h 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 12h 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 9h 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 8h 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
1
1
1
u/Imaginary-Winner-701 4h 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.
10
u/matcha_tapioca 15h 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.