Over a million developers have joined DZone.

Coding Exercise Introduction

DZone's Guide to

Coding Exercise Introduction

· Java Zone
Free Resource

Bitbucket is for the code that takes us to Mars, decodes the human genome, or drives your next car. What will your code do? Get started with Bitbucket today, it's free.

As part of my job, I do a lot of architectural designing, OOD, clean code, TDD and everything that is within my power to have great code and be a professional craftsman.

However, I don’t get to see many problems such as tree traversal, BFS, DFS, lists manipulation etc.

I name these kinds of problems as CS1 and CS2 courses problems (intro to CS , intro to data-structure and algorithms).

I also don‘t have the opportunity to learn new programming languages. We‘re writing in Java and there is no reason at the office to start learning a new language. At least not for business purposes. At least not now.

But as a professional developer, I want to constantly exercise, sharpen, and improve my skills.
So I started a small project:

  1. Do some basic coding that I usually don't do (as I described above, the CS1, CS2 coding exercises)
  2. Learn a new language
As for task #1, I already wrote some Java code to problems I thought of, and will try to add more during the weeks to come.

As for task #2, I decides to start learning Ruby. Why Ruby? No particular reason. It’s different from Java and good in the market.
Once I get comfortable with Ruby, my plan is to do the same problems in Ruby.
I’ve uploaded the initial code to bitbucket, which is Git hosting by Atlassian. Why not Github? Well, I wanted to get familiar with a different Git hosting then I already know.
Some of the code has nice written tests, and some, sadly to say, I just played around, it is not REALLY, AUTOMATICALLY testes. This is something that must be fixed as well.
These are the problems I already written:
  • Factorial
  • Fibonacci
  • Reverse a list
  • Anagram
  • Palindrome
  • BFS tree traverse

Here's the repository location:


Bitbucket is the Git solution for professional teams who code with a purpose, not just as a hobby. Get started today, it's free.


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}