Cleaner Code, Lighter Load

I promised that the Code Room would be seeing some love this year. I intend to walk through a few languages [A-Z] to

  1. learn more about the languages myself
  2. identify common traits and differences
  3. keep the Code Room alive.
  4. remind myself who I once was and will forever be. (recursion_man)
  5. share my journey with my millions of fans across the universe, imaginary though they might be.

Before I commence that journey down the road that will lead me to my “personal legend”, I’ve decided to make myself vulnerable by putting some code I wrote, hacker style, out for all eyes to see. I wrote an application to help myself and some friends to manage an online scrabble league and will today make it public.

Scrabble has been my good friend and has introduced me to some wonderful people. I was happy to help to minimize the administrative load by automating away the mundane. For my efforts, I was knighted many times over. Sir Dale, they said, which swelled my head. I’m sure if they saw the code they’d take it back.

My favorite go to language for non-professional development then, was PHP. I tried my best to keep what existed before my arrival intact, which meant keeping the Google Spreadsheets back end. That meant that I would be learning how to post to Google Spreadsheets, and that I did. There were a few other things I eventually added to the application to make the lives of my scrabble buds easier. This included the ability to post game links that retrieved scores automatically from XML based web services, used by the developers of a few variants of the original scrabble game. This helped to lessen the QA load, since the scores no longer needed confirmation. I included proxy services to consume these services and send JSON back to the front end.

Now, this was fun. But the code was certainly not clean. There were duplicated methods across files and though it has been a while I’m sure there were methods that could have been consolidated in each file. There was a lot that could have been done differently but I just needed to see it GO. I just wanted to see the smiles.

I’m still on that thread with my admin friends from South Africa, The UK, Canada, and the US. I still get a virtual pi inspired birthday cake every year on my special day. Though we’re separated by many miles and years, I still get to joke around with my friends who loved Sir D’s app. Thanks Facebook!

As I said recently on that little blue app Mark and his friends wrote.
“Write code, even if it’s not the right code and at first can’t handle the right load. It might even not link the right node. Just write code”

So I wrote code, and now I’m pushing it to github. After that, I hope to allocate some time to refactor what is there. That does not automatically mean using a framework but I will do that. I’ve heard great things about laravel, so I’ll take a stab at it.

Here is the repository: https://github.com/dalevross/scrabtourneyasst.

The app: http://scrabtourneyasst.herokuapp.com/manageleague.php , which requires access to the appropriate spreadsheets.

The main pages used for tournaments were managetbreak.php and manageleague.php with everything linking from there.

It was suggested that I record my attempt at refactoring. That should be fun.

Proudly powered by WordPress   Premium Style Theme by www.gopiplus.com