Skip to content

Chapley Watson

The Word Guppy
  • Home
  • Stories
    • The Black Box
    • Truth
  • Poetry
    • A Writer’s Storm
    • Anxiety
    • Balloon Haiku
    • Do you know me?
    • Jealousy
    • My Name
    • Plight of the Guitar Player
    • The Addiction
    • The Bridge
    • The Drummer
    • The Green Monster
Ruby

Roman numeral converter

Posted on September 24, 2018 by Chapley Watson / 0 Comment

In all my years, as a developer, I’ve never had a project that required converting Roman numerals… that project, wherever it is out there in the wild, sounds like it would be an entertaining one.. class RomanNumerals DIGITS = { 1000 => ‘M’, 900 => ‘CM’, 500 => ‘D’, 400 => ‘CD’, 100 => ‘C’,…

Continue reading →

Rants

Posted on January 18, 2015 by Chapley Watson / 0 Comment

I fear for the English language. Tomorrow, it will look like a bad episode of “Wheel of Fortune” where no one can afford to “buy a vowel”.

Continue reading →

Rants

Amnesty and Immigration Fix

Posted on June 20, 2014 by Chapley Watson / 0 Comment

Immigration is a very big issue in this country with both dominant party lines split right down the middle. The easiest way to address this issue, and many more, would be a new program called “polls with consequences”. In a nutshell, a poll would be issued to an area of people, say D.C; if that…

Continue reading →

Advice/Crazy

RIP Tracy Morgan

Posted on June 12, 2014 by Chapley Watson / 0 Comment

Funny man Tracy Morgan has passed after being involved in a horrific multi-vehicle accident last week. Fans are spreading the word via social media. Mr. Morgan’s family released a statement thanking the fans for their support during this trying time.

Continue reading →

Advice/Writing

I will be an Entrepreneur later

Posted on May 22, 2014 by Chapley Watson / 0 Comment

Based on the question: I always wanted to be an entrepreneur and tried a couple of ideas, but failed. Is it a good idea to switch back to a job for now and plan for a startup some time later? “I really want to do this, but due to circumstances I’ll have to get back…

Continue reading →

Advice/Writing

I will be an Entrepreneur later

Posted on May 22, 2014 by Chapley Watson / 0 Comment

Based on the question: I always wanted to be an entrepreneur and tried a couple of ideas, but failed. Is it a good idea to switch back to a job for now and plan for a startup some time later? “I really want to do this, but due to circumstances I’ll have to get back…

Continue reading →

Ruby

Coogle Code Jam “Magic Trick” solution

Posted on May 13, 2014 by Chapley Watson / 0 Comment

Yup, this is still very much alpha and can be refactored. I’ve broken it apart into multiple files, had other plans and ran out of time, but the meat of the code is in guessing_game.rb.

Continue reading →

Ruby

Coogle Code Jam “Magic Trick” solution

Posted on May 13, 2014 by Chapley Watson / 0 Comment

Yup, this is still very much alpha and can be refactored. I’ve broken it apart into multiple files, had other plans and ran out of time, but the meat of the code is in guessing_game.rb.

Continue reading →

Ruby

Google Code Jam “Cookie Clicker”

Posted on May 13, 2014 by Chapley Watson / 0 Comment

This example was given as a spin-off to the Google Code Jam “Cookie Clicker” challenge. class Investor def initialize(*args) @c, @f, @x = args @income = 2.0 @seconds = 0 end def solve return proper_seconds if (@x-@c)/@income < @x/(@income + @f) @seconds += @c/@income @income += @f solve end def proper_seconds (@seconds + @x/@income).round(7) end...

Continue reading →

Ruby/Writing

“FizzBuzz” code test

Posted on May 13, 2014 by Chapley Watson / 0 Comment

Here is my simple answer to a typical test given during interviews class FizzBuzz FIZZ = ‘Fizz’ BUZZ = ‘Buzz’ def FizzBuzz.fizz_it(iterations = 100) (1..iterations).map do |i| fizz = FIZZ if i % 3 == 0 buzz = BUZZ if i % 5 == 0 (fizz || buzz) ? “#{fizz}#{buzz}” : i end.join(‘, ‘) end…

Continue reading →

Posts navigation

1 2 3 Next »

Recent Posts

  • Roman numeral converter
  • (no title)
  • Amnesty and Immigration Fix
  • RIP Tracy Morgan
  • I will be an Entrepreneur later

Categories

  • Advice (9)
  • Crazy (2)
  • Misc (9)
  • Rants (4)
  • Ruby (5)
  • Writing (5)
    • Poetry (1)
    • Stories (1)

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



© 2023 Chapley Watson
Powered by WordPress | Theme: Graphy by Themegraphy