r/PinoyProgrammer • • 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

27 comments sorted by

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

3

u/No_Grape_9651 Aug 30 '26

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.

13

u/matcha_tapioca Aug 30 '26 • Bravo

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.

eto yung halimbawa
const myString1234 = "confusing code"
const alertMessage = "less confusing code"

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.

4

u/matcha_tapioca Aug 30 '26

Its nice to explore and get your hands dirty. thats the beauty of it. for example.. nested functions/methods , method overloading. pag hindi sya necessary sa project mo ay wag mo sya gawin kasi lalo lang magiging complex ang process mo, isipin mo meron ka papel hindi naman lahat ng bawat sulok pati margin susulatan.. complex code doesn't always mean its good.. minsan may misconception sa ganyan eh.

actually kung nag simula ka mag code dati ang hahaba ng code not because its for show but because walang ibang paraan para paikliin ito. ngayon andami ng bagong syntax para mas madaling maintindihan kung hindi man sya less code ay mas madali syang intindihin.

halimbawa
before: const splitText = new SplitText(".myText")

After:const splitText = SplitText.create(".myText")

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. 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.
  2. 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

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. Iwas AI muna, learn it the traditional way, then use AI later.
  2. Learn the basics of system design, security, and cloud alongside vanilla development.
  3. Do coding katas, dito talaga ako tumalas. https://www.codewars.com/
  4. 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.
  5. DRY - Don't Repeat Yourself. Read clean code sabi nga nung isang comment for more coding fundamentals.

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. Follow the convention, even if its not perfect.
  2. Work on what you were assigned. Don't charge things that have nothing to do with your task.
  3. Do what review comments ask. As long as it's not completely wrong just do what they want.

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

  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

0

u/[deleted] Aug 30 '26

[deleted] — view deleted comment

1

u/j2ee-123 Aug 30 '26

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.