CST 338 Journal Entry 1

I just finished the codingbat exercises and as much as I should have, I didn’t really plan out my approach before starting; I just jumped straight into writing code and testing as I went. Since many of the problems were fairly simple at first, I felt confident experimenting and seeing what worked. I tried to be strategic with the lines of code I wrote, placing them where I had an idea of the outcome based on my past programming experience. This made the trial-and-error process more controlled and less random than it might have seemed.

One thing that slowed me down was that CodingBat doesn’t allow for logging or printing intermediate results, which was frustrating. Without the ability to see what was happening inside my code, I had to rely entirely on reasoning and anticipating potential issues before running my solutions. This forced me to slow down and think more carefully about how each piece of logic would behave, which was a good exercise in itself.

For most of the exercises, my code worked on the first try, which was encouraging. Only the more challenging problems required two or three attempts, but these were relatively rare. When I did run into issues, I leaned heavily on patterns and logic I had seen in other languages and applied them to Java. However, learning and getting used to Java’s syntax was a slight hindrance at times; small differences, like how loops, conditionals, or string methods are structured, occasionally caused mistakes that weren’t logical errors but syntax errors. That being said, I was pleasantly surprised by the for loop, it is very similar to javascript and that was nice. Borrowing from prior experience still helped me quickly identify potential pitfalls, and once I adjusted to the syntax, I could fix errors efficiently and move forward.

Overall, this coding session was a mix of experimentation, strategic thinking, and applying past knowledge. Even when simple trial-and-error worked, I found that stepping back and thinking about the logic before running the code often saved me time and frustration. It was a good reminder of how experience from other languages can transfer and how careful reasoning can often replace the need for immediate debugging tools.

Comments

Popular Posts