coding have ethics too

Salam! 

today, I feel like sharing what my boss always shares with me—his knowledge or tips in the programming world. a little bit of context: I am a programmer. It’s a little bit hazy/vague to say that without explaining, because my work is more than that, but let’s put it simply that way. however i am still early in my career and not very good at it yet. tbh I did it because it’s merely my job and im not going to make my job my personality but i know someone who codes as a hobby, im not one of them. Out of millions of my hobbies, coding is just not one of them. so i don’t really like like it, but I don’t hate it either. but i guess it’s cool, and I want to be ‘cool,’ lol whatever that means.

Coding is basically doing maaaagic~~~uuuu~~ bcs we created the digital world without u even knowing what we did at the back. the simpler the site is, the more complex it is to do. if only you know how much does it cost to create a single button. you just click it and expect whatever to be done in a blink. just like how architects’ dream are engineers’ nightmare, the web designers’ dream are nightmares for programmers. The shorter the code is, the better it is (depends). lol i remember the very first programming group project i had when i was in my foundation, we used to compete on who wrote the most lines of code. we used to think its genius to write thousands of lines of codes like the hackers in the movie but in fact, it is soo bad. i lose anyway (which technically i won). 

me when I got my code done: thinking of expanding my career and being the greatest programmer. i love my job. im smart

me when I got errors: im quitting for good. 

now why am i explaining this to you? i’d leave right way if its not of my interest. im sure those who continue reading are my friends who are also programmers, who are most probably far more skilled than me. hi. 

or if you like me, you’d read till the end (i see u). kidding. 

lets just say im talking to myself. 

anyway, first

1. Those theories are true. 


ngl  i hate theory classes back then. i cant help getting so sleepy and bored cause its just 2 hours of talking. but i had to get through it cause im a nerd i need my A so i forced myself to understand it. or, if i cant, i’ll just memorise them. rather, i really love hands on programming classes cause i can play with it. (used “Kim hanbin” in every testing prints). 

the point is, those programming theories are true. Object Oriented concept, polymorphism, inheritance, abstract, interfaces, classes, libraries, etc you name it. 

you didnt really see its good only after you step out of school and start doing it in real world. 

it was such a mess back then that these people had to come out with these concepts to make much more readable, robust, and effective codes. It does make us live, basically in luxury. My boss is jealous.

for example, abstraction. 

say that you have a task to create a drop down search button. right, its one single btn, meh, you can do it, confidently. done and dusted. 

but you have 5 of the same buttons per page. and you have 15 pages to do. the fastest way is to just copy and paste it. but it’ll come back to you after 2 years later when your boss asked “okay lets change the look of it”. dang you’ll have to change every buttons you pasted probably 30s of it. plus, no one remembers what they did 2 months ago what more 2 years ago? you dont even remember where were those buttons for! you can ctrl+f it away but it’ll consume a good 2 hours while it can be 10 seconds if you use abstraction concept.

abstraction means to create one general class that is veeery abstract (literally) so we can just call it every time we need it. you did the code work once, and you apply it everywhere. and if there’s any change, you can just change it at one place in seconds! magic~~~~ and your boss will be very impressed. 

sorry i cant show you example cause im lazy forgive me. 

these genius academics who created the concepts are those who suffered the most. so we should thank them. 

try to learn more on the theories, look up on the internet on how to code efficiently, the best practices and apply it. its there for a reason. i agree, its a bit more work than copy pasting but its an investment to your time and mental health in the future. you dont want to see yourself after working hours sweating bullets fixing all of the buttons only ended up with the client pointing out  “YOUVE MISSED ONE BUTTON”. 

go cry. 

2. you are accountable for what you write



say youre a cook in a fine dining restaurant and youre cooking for an order. you cooked it, you tasted it, its not the usual 5 michelin star taste! omg its done but its not good. maybe youve put in too much salt. the customer’s waiting but you can’t just send out the salty one you did just now? you gotta be responsible. gotta re-make it and send it out. even if it costs you grumpy customers. waiting for good food is better than for bad food. 

same like coding. each programmers have its own style of writing. One logic can be done with many algorithms. If your focus is to just get it done however it is, “looks good to me, done” it and you’ll most likely to send out a bad code. the client doesnt care, they dont even know what you did at the back. but when error pops out, they’ll find you till lubang cacing! (till the wormshole?). they gotta find you and you’ll have to face the music and fix it right away.

so make yourself easy. think further down instead of that present. write good code, test it, and send it out. respect yourself too. By “good” is your own judgement really. If you think that code is robust and maintainable and secured, well i guess its good. or if you have something easy but you make it very complicated, thats bad too. idk you do the judge. what i’ll do is to let someone review it. and, do structure your project correctly. you’ll never want to see those classes lying around everywhere. you have to know where everything is. add comments to your codes cause ppl dont have time and energy to understand your code. 

just like how casio watches got tested with navy forces (step into it, throw it under water, pressure test etc) while its users are just typical white collar workers who did nothing and just be in the air conditioned office, IN CASE they did fell into the deep sea for weeks bcs the boat they rode got flipped upside down (true story), casio company can lift their shoulders up and said it’ll not broke. thats how you gotta test your code! test of every single worst scenarios! 

ps: testing is the part i hated the most

3. when you think its bad…


someone once had an experience coding something for hours just to ctrl+a, delete and start again. ive coded something for a week and i think its not going anywhere i ctrl+a and deleted it all too. im sure all programmers have done that. and its okay. not every day is a good day. 

-when youve spent hours on something and you feel like its not going anywhere. stop. 
-even when youre done then you sit back and see it again and thought  “this is crap”, just delete and do it all over again.

 my boss said a good programmer is the one who can catch bad codes. 

sometimes, when you think thats the best solution, its really just not. theres something else, you’ll just need to google it again. 

sometimes, the method is right, but theres something that stuck, its just you need rest or a reset. your brain is just fried and tired. Deleting everything and starting again with a clean sheet sometimes help. 

when youre trying so hard to solve an issue, at one point, you just need to bail out, and take another route. move on! 

i have more but i think its getting too long. 

so to conclude everythings up: 
1. pay attention to concepts
2. dont stop learning
3. read blogs and watch youtube 
4. dont trap yourself
5. make a good judgement call on your codes
6. think further down the timeline
7. know when to stop 
8. put comments 
9. respect yourself

as ive said this earlier, these are all reminders for myself. bcs im so obsessed with the “cool” concept i need to be one. hahaha. no. 

i mean, i need to be responsible in my code. and im still learning everyday so its very important for me to remember these basics. i mean, after all its for my own good. i will be forever grateful for my boss for always sharing me his wide knowledge. he’s so cool. #ilovemyjob

after all, i think Allah really helped me a lot in my coding journey. i am a nobody. just someone who have Allah on my back giving me ideas, moving me to write. sometimes when i have coding issues, and i cant settle it and its getting on my nerves, i’ll just stop and go to sleep and pray for Allah for ideas. ideas comes mostly when i pray (keja setan), when im walking, or, in the toilet lol. i’ll quickly write it down on a post-it and try again. in most cases, thats how it got solved. semua dari Allah. alhamdulillah. Depend on only Allah guys. 

i hope you guys can benefit from it a little. even if youre not a programmer, i think this will apply to your job too in someways. 

thanks for reading. i’ll write about how i learn korean next. stay tuned lol. 

Comments

Post a Comment

Popular Posts