[Machine] The Messenger of Allah sent me to Yemen, so I said, "O Messenger of Allah, you send me to a people where I must pass judgement among them and I am young and have little knowledge of judgement?" He said to me, "O Ali, when one of the two disputing parties comes to you, listen to what they have to say, but do not pass judgement until you have also heard from the other party, just as you have heard from the first one. Then, it will become clear to you how to pass judgement." I continued to be a judge like this, as narrated by Hatim ibn Abi Saghira.
بَعَثَنِي رَسُولُ اللهِ ﷺ إِلَى الْيَمَنِ فَقُلْتُ يَا رَسُولَ اللهِ تَبْعَثُنِي إِلَى قَوْمٍ أَقْضِي بَيْنَهُمْ وَأَنَا حَدِيثُ السِّنِّ لَا عِلْمَ لِي بِالْقَضَاءِ؟ فَقَالَ لِي يَا عَلِيُّ إِذَا أَتَاكَ أَحَدُ الْخَصْمَيْنِ فَسَمِعْتَ مِنْهُ فَلَا تَقْضِ لَهُ حَتَّى تَسْتَمِعَ مِنَ الْآخَرِ كَمَا سَمِعْتَ مِنِ الْأَوَّلِ فَإِنَّهُ يَتَبَيَّنُ لَكَ الْقَضَاءُ قَالَ فَمَا زِلْتُ قَاضِيًا كَذَا فِي رِوَايَةِ حَاتِمِ بْنِ أَبِي صَغِيرَةَ