He received his basic education from ELS, which he continued to middle school (MULO) 1928 - 1933, and AMS (High school) majoring in Classical Western civilizations from 1933 to 1936. In 1930 Hamid affiliated himself in Jong Islamieten Bond (JIB) in Surabaya, a youth organization initiated by nationalist activists such as Agus Salim. He moved to Batavia in 1936 and became student in the "Recht Hoge School" (RHS, law school) in Batavia, but unable to finish it because the University was closed by Japanese occupation in 1942. After the Indonesian Independence and with the initiative of Prof. Djokosoetono (the first Dean of Faculty of Laws at Universitas Indonesia and co-founder of Indonesian Police Academy), he was able to earn his "master in de rechten" (MR, Master in Law) in 1952. He was the first Arab-Indonesian who entered the university. At the university, Hamid was active in youth organizations within or outside campus, such as at "Perhimpunan Pelajar-Pelajar Indonesia (PPPI," Indonesian Student Association")", "Indonesia Muda ("Young Indonesia), "Studenten Islam Studie Club", "Unitas Studiosorum Indonesisensis" and "Baperpi (Badan Persatuan Pelajar Indonesia," Indonesian Student Association Board")". His youth career was such as being an editor of USI magazine and as vice president of "Baperpi".