Programming capabilities are important to the new professionals. Although several initiatives all over the world haves been proposed for teaching programming to people at all levels. Many undergraduate students still fail in the programming courses. Proposed strategies have included visual programming and automatic evaluation of exercises. Nevertheless, there is still a lack of knowledge about students' perceived difficulties in using these strategies in practice: that is, their challenges to learning how to program. In this paper, we report a study aimed at understanding these difficulties and strategies in a STEM course. We used an environment comprising a visual programming tool to introduce algorithms, iVProg with iAssign, and the virtual programming lab (VPL) to introduce programming in C, both with automatic assessment integrated to Moodle. We report quantitative and qualitative results and future directions. Teachers and tool designers can leverage these results to better support programming learning.