For the former, mainly the coding process involves the skills and knowledge that a programmer currently possess. This makes sense, because the safest option is to apply the established and proven. The latter, on the other hand, allows for an opportunity for try out new things, say, a programming language that nobody uses just yet, and then apply the knowledge as a side project. As a professional programmer, coding for work and coding for recreation needs to be balanced.
As a routine part to keep the creative juices in our programmers’ brains flowing, DyCode conducted an internal programming contest as a means for our engineers to have fun. Open to all programmers willing to take the challenge, this contest is based on a homework question on Quora that asks this question: “how do I provide a unique program that produces the following output?”, followed by a string of this exceedingly simple output.
Smile!Smile!Smile! Smile!Smile! Smile!
Three lines of
Smile! s, from three to one, in descending order. Sounds easy, right? Indeed, it can be solved in hundreds of ways, including the easy ones. However, the challenge here is that in order for them to win this challenge, the solution has to be the most complex, creative, and original as they possibly can. The one that can come up with a Rube Goldberg machine for this solution, will take home cold hard cash, in addition to the respect from their fellow engineers.
After the announcement of the contest, our programmers let their creativity run wild in between their daily projects and began working on their unique solutions. And before deadline struck, five people submitted the projects. Check out their submissions along with the link to their GitLab repository below.
The winner went to Ben (congratulations, Ben!), who implemented Piet in providing his solution. Piet is a stack-based, esoteric programming language that makes, in the words of its creator David Morgan-Mar, “programs look like abstract paintings”. Naming his program “Smilebang”—a play on “hashbang”—, Ben said that he decided to implement Piet just because he can.
“Just because one can” may sound silly, but that is the point of this contest. Programming is all about building a program that can solve a specific task, and the more expertise a programmer has with all the available programming languages that are available, the more efficient and creative a programmer can accomplish a task.
The benefits to coding for fun
Coding for fun may not have an immediate impact, but who knows the inspiration that you get while programming for work comes from when you were coding for recreation?
Bayu Yasaputro, interim CTO at DyCode, remarked that this engineering contest brings a threefold benefits to the programmers. Firstly, it’s an opportunity for them to explore and be creative; secondly, it allows them to share expertise in a certain programming language with others; and thirdly, as some of the people in the Quora thread can testify, it opens up opportunity for coders to show-off their skills.
“Coders love to code, obviously. So it’s important for them to have fun in unconventional ways,” he commented.