Skip to main content

Posts

Showing posts with the label my notes

Komunikasi Berkesan

As leader, jangan assume orang lain faham communication kita Ciri-ciri komunikasi efektif: Kejelasan make sure objective tercapai kinda like MRT - Measurable, realistic, timebound Kelengkapan 5W1H. why when where who what how Contoh: Tolong buat report tentang umur pengguna sistem A dari tarikh B ke C, dalam bentuk excel, submit by isnin pukul 4. Data ni nk guna utk marketing ke pengguna. Keringkasan Jangan panjang sangat, elakkan ayat berbunga. Straight to the point Kukuh/Konkrit Kena cakap based on bukti/data. Data tak boleh terlalu general, kena specific. Contoh teruk: Ramai kata sistem slow Contoh baik: 17 user dari semenanjung dah comment yg sistem slow pada pukul 8-9 pagi Kesopanan Most of the time kena sopan. Kalau nk push dari comfort zone kena kurang sopan, tapi jangan biadap pulak Ikut scenario Konsistensi Pastikan kalau nk tukar fikiran/arahan, mesti ada justifikasi. Tak semestinya tak boleh kalah, ikut scenario. Feedback Buka ruang persoalan/maklum balas Kena quick to respo...

How to get solution when you’re stuck

  How to get solution when you’re stuck ask people when? people is available. always ask your tablemate first.   first question should always be ‘nak tanya boleh tak?’ if you’re stuck for more than 30mins, try to ask even when people are busy. simple (yes or no answer/where is this?) specific to the environment (ask about smap/urusbisnes) no data online (explain about one_model, one_helper) how? provide context - what task you are doing, what error you got, who you dont like in the office show proof of your findings/solution search online when? people visibly busy answer available online. eg: issues with CI3/PHP/MySQL how? copy paste the entire error message (not the whole text, just the message). usually this works for old systems like CI3 where there are lots of forums discussing the errors search based on keywords. y say many when few do tricks? eg: ’ios notch in app browser issue’ add forum names at the and of search text. eg: ios notch in app browser issue reddit/stackove...

Perbezaan Product / Project / Customization / Whitelabel

Perbezaan Product / Project / Customization / Whitelabel Product - Kita sendiri hasilkan. Kita jual pada customer. Subscription based payment untuk guna product. Project - Customer minta kita buat sistem. Customer nk guna, atau customer nk jual pada orang lain. Payment one-off atau beberapa payment. Customization - Kita customize product kita untuk certain customer. Guna repository & server sama as normal product, cuma ada checking, kalau organization tu ada customization, dia akan keluar menu/feature baru. Whitelabel - Product sedia ada, kita jual kepada customer untuk kegunaan organization diorang. Whitelabel guna repository sama dengan product. Tapi ada server sendiri, asing dengan product.   Example:   product - app.smap.my   whitelabel - ppa.smap.my

HMVC vs HAVC vs MVC

  HMVC vs HAVC vs MVC MVC lama2 boleh jadi serabut sbb semua module dalam 1 folder sesuai projeck kecil - sederhana contoh: controller Programs Members model program_model member_model view program list form member list form HMVC lawa sikit, satu folder module yg dalam dia ada folder controller, view, model sesuai projek sederhana - besar contoh: modules program model program_model controller Programs view list form member model member_model controller Members view list form HAVC basically HMVC, tapi M tukar A sbb asset instead of model. takde model. segala benda resouce dia letak dalam asset, tak kira model   ke apa unique dkt trongate contoh: modules program asset images js css program_model controller Programs view list form

PHP Short Code

ternary vs coalescing null operator checks for null values example: echo isset($item_name) ? $item_name : NULL; echo $item_name ?? NULL; ternary vs elvis operator (ternary shorthand) checks for truthy values example: echo !empty($item_name) ? $item_name : NULL; echo $item_name ?: NULL; using ternary vs (coalescing null operator & elvis operator) example: echo isset($item_name) && !empty($item_name) ? $item_name : ‘default’; echo $item_name ?? $item_name ?: ‘default’; spaceship operator used to compare 2 values and returns either -1,0,1. mostly used to compare dates example: var_dump(1 <=> 2); // returns int(-1) var_dump(1 <=> 1); // returns int(0) var_dump(2 <=> 1); // returns int(1)

Test Guideline

  Test Guideline understand the requirement fahamkan title, desc & requirement task take note access utk user test lebih dari 1 organisasi try masuk sanitised live account utk test listkan main point utk di test create a test plan take note possible scenario try buat flow dari awal ikut flow yg legit cari page lain yg mungkin affected, contoh: satu view mungkin diguna untuk beberapa function perform testing functional testing - test function & mencapai goal atau tak non functional testing - ux, performance, security, usability test result focus on one test, takut lupa. then proceed with next one Conclusion: Test sehabis baik, try untuk cari bug sebelum sampai ke tester/production. 

Other useful things I sometime use but always forgot

  🐘 Useful PHP functions One line year array // will get the past 3 year including current year. eg: 2021,2022,2023 for ($i=-2; $i <= 0 ; $i++) $data['year'][date('Y')+$i] = date('Y')+$i; Unset attribute in array of array object $body_list[$count] = array(             'attr' => array(                 '1' => 'one',                 '2' => 'two',             ),             'data' => (object) array(                 '3' => 'three',                 '4' => 'four',             )         ); unset($body_list[$count]['data’]->{‘3’}); // will remove attribute ‘three’ Merge/combine array with duplicate keys while preserving the values // use this inside loops where + won...