Coding Challenge

Friend of mine, , thought of an interesting way to flex the programming muscle.
Well, he might not have complete came up with it himself (:P), but he suggested that myself and try out these little programming tasks from http://www.rubyquiz.com/.
The idea is to complete the task within a certain time-frame(I think we chose a week) and post your results.
We opened up to more than just ruby (since I don’t know the language at all, it would take me more than a week to do most things…maybe), so I did my first quiz (http://www.rubyquiz.com/quiz76.html) in PHP.
It works, but it’s damn ugly inside:
http://test.thesidekick.ca/php.html
http://test.thesidekick.ca/php.txt – the actual code

The idea here is that it mungs up a quote or string of text. Mine works, and it’s only been one night, so I might spend the rest of the week making it look better and in general improving the code.
But that’s the way it goes; get it to work, then get it to work well.
So right now it works, I’ll get it to work well later ^_^

Right now, my brain hurts from training today. It was a z/os “boot-camp”, and I tells ya, it feels like my head was booted.

So, for the rest of the night, I’ll spend my time watching Dr. Who. Well, the next hour anyway.

Laters.

3 Comments

  1. thinkschematwo
    ·

    Hey!

    Congrats on getting the quiz up and running!
    (Especially on the tail end of a z/os boot-camp.)

    Had a look at the code, and have to say it looks like PHP. 🙂 I didn’t have too much difficulty getting the gist of things. I can’t say that I could replicate the code, but hey… that’s part of what this thing is all about. 🙂

    Kinda neat to see the similarities in the languages (ie. split, shuffle, etc.) They exist as stock functionality in Python, Ruby and PHP. Wonder if those kinds of parallels will continue…

    Oh, I’ve already pegged a second challenge… just feeling out the waters right now. Good news is it took about 15 minutes to get something functional (but then I started experimenting with a GUI… Tkinter and I aren’t getting along just yet).

    I hope to post something about the 1 week mark.

    Reply
  2. sidekickca
    ·

    I don’t think any reasonable coder could reproduce my code, they would be writing something better ^_^

    That being said, it does work, but I want to spend time making it work better.

    I wouldn’t doubt that, moving forward, the various languages will start looking more and more alike…

    Reply
  3. thinkschematwo
    ·

    Getting it working is where it all starts. And, let’s face it… It’s never really done, it just ends up done enough. These quizzes aren’t really about producing commercial grade software (I suspect there’s little demand for a commercial text munger… unless you specialize in spam advertising, but…).

    I was amused by the implode() function. 🙂 (Less exciting upon further review, but still a good name.)

    Anyhow, what are you using for PHP development? LAMP? I’ve never truly been satisfied with a windows setup (It I was using XP Pro, I’d have IIS as an option… Apache I just don’t like… Not for ease of development anyway.)

    I’ve set up Pi3 as a webserver, and it includes PHP 4.0 out of the box, but other than that I’ve had varying degrees of success with other webservers (my criteria are small, fast and easy to configure).

    Anyhow, I’m chomping at the bit to get the second quiz posted, but by my calculation there’s about 2 more days before that will happen. It’s a simple one, but should be fun!

    (After that I’ve got ideas… I’m having a look now to see how tricky it might be to accomplish. Should be both fun and useful! :-))

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *