image of a soldier and info on a dogtagEach week I look through hundreds of Pens on CodePen, looking for what I feel is the best. Things I look for are creativity, innovation, simplicity, functionality, etc. This week for our favorite Pen of the week we bring you a World War 2 Soldier Profile Generator. In essence, this Pen generates a fake profile of a WWII soldier with all of the information from the soldier's portrait to a fake military ID number. In case anyone was wondering, this is shameless self promotion for one of my latest Pens. As lame as that may be I still think it's worthy of a mention and a spot on our favorite Pens of the week list.

The Pen

See the Pen World War II Soldier Generator by Nick Santini (@npsantini) on CodePen.

What we like about it

Although I may not be the best when it comes to Javascript, I managed to compile what little I do know in order to create a pretty cool text generator. It utilizes an array of information like names and street addresses then randomly selects one item for each variable. For what it's worth, it works fairly well and is a nice little tribute to those that actually did serve in the military during that time. Although, like most of my work, there are still problems and more work to be done.

Improvements to the code

There are a few things wrong with this Pen and i'm not afraid to admit it.

First off, it's not responsive. I mean come on, it's 2015 and it's not responsive? I know, I need to get with the program.

The second thing that needs to be added is way to make sure that you don't have information repeated. For instance, because the array items are randomly picked and not removed, there is still a chance that information will be displayed multiple times in a row. This is mainly due to my limited amount of Javascript knowledge. I will fix this issue though.

Conclusion

In conclusion, this weeks favorite Pen of the week has been nothing short of shameless self promotion. It may not have been the actual best Pen of the week but I think it was good enough to mention. In order to make up for that, I may post another favorite Pen that isn't mine...

If you know of ways to improve on that Pen let me know in the comments below or simply fork it on Codepen.

Think it wasn't worthy enough to be a favorite pen of the week? Drop us a comment below and let us know how you really feel...

On a serious note, if you read this, please go thank a Veteran for their service!

About the Author:

@SANTINI_IO | NickSantini.com

Nick Santini is a web developer and college student from Louisville, KY. Aside from his work as a web developer, he is also the man behind SANTINI.IO, a blog dedicated to technology, web design/development, self improvement, and more.

Leave a comment