The present research is part of the government funded project called Young Engineer's Workshop (YEW), a 2-week-long summer camp for youngsters to stimulate their interest in coding, electronics and robotics subjects in particular and STEAM fields in general. The YEW curriculum included basic electronics, block-based programming and robotics through Scratch and Arduino, and student projects on building robotics systems. This experimental study aimed to investigate the cognitive and affective consequences of YEW on the development of middle and high school students' computational thinking (CT) competences. The research methodology was based on a one-group pretest-posttest model within a quasi-experimental design. Participants were 17 students from grades 5-6 and 15 students from grades 9-10 in a southwestern city of Turkey. Both quantitative and qualitative data were collected through the YEW application form, a scale for CT, a satisfaction questionnaire, and student diaries. The results showed a significant increase on algorithmic and critical thinking factors of CT whereas no significant changes in creativity, cooperation, and problem-solving factors of CT. Students reported affective gains including high satisfaction and enjoyment of YEW activities, increased interest, and career planning in programming and robotics fields, and improved self-confidence in robotics project development. In conclusion, the study suggests that teaching programming can be an effective way to foster CT to some extent but not an adequate or complete solution. Educators need to seek more suitable teaching methods for a more comprehensive learning of CT that can be transferable to noncomputing contexts.