- Color Converters and Delta E Calculators

I’m still putting together my 2013 goals, but I do know that one of them is to launch more sites.

I’ve been doing this whole internet thing for a long time now, I really aught to have more to show for it.

Knowing that perfect is the enemy of good enough I’ve opted to take a release early and release often approach to launching sites.

First up is It’s a simple site that wraps a small color library I wrote.
Continue reading

My Top 4 JavaScript No-No List

These types of posts have been done ad nauseam, but I’m putting together my own short list for a presentation so I thought I’d share.

They’re not such a big deal in the grand scope of life, the universe and everything, in fact, these are far from the worst missteps you can take in programming.

However, seeing these same problems year after year drives me crazy. It’s like fingernails on a chalkboard.

It makes my soul hurt.

So without further ado, I present to you: My Top 4 JavaScript No-No List
Continue reading

Project Euler : Problem 39 in Ruby

I had an easy time with this one, which makes me feel a lot better about all the ones I had problems with!

No fancy-pants recursion or math short-cuts here, just a straight forward logic problem. The only “trick” here is to realize that since a <e; b < c, we only need to check values of a and b up to 499.

I’m sure you could whittle that number down by crunching the numbers, but it’s good enough for me!
Continue reading

Project Euler : Problem 38 in Ruby

40 problems down, 10 more till level 2!

The real trick here is to cut down on the numbers you check. Since the problem gives you 918273645 as an example we know the answer must be greater than or equal to it…meaning we only need to check digits that start with 9!

I don’t actually do it because I couldn’t figure out an elegant way to do, but it runs in just a few milliseconds so it’s fast enough in my book.

Another important factor to note is that you only need to check numbers up to 9_876 since this is the first ‘half’ of the largest pandigital possible.

Those two tricks will cut down the calculations you need to run to just a few thousand.

Problem 38

What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1,2, … , n) where n 1?

def get_pandigital? n
  nums = []
  (1..9).each do |digit|
    nums += (n * digit).to_s.split ''
    return 0 if nums.size != nums.uniq.size || nums.include?('0')
    return nums.join('').to_i if nums.size == 9

solution = 0

(9..9_876).each do |n|
  # could do better by only looking at 9's!
  result = get_pandigital? n
  if result > solution
    solution = result

puts solution

Check out all of my solutions on bitbucket!

Project Euler: Problem 37 in Ruby

It’s been a while since I’ve done one of these, so I was afraid of being rusty but it worked out alright. I used the generator I made a while back to create the primes (pre-filled to the example given in the project) and used procs to take care of the truncation.


Problem 37

The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can work from right to left: 3797, 379, 37, and 3.

Find the sum of the only eleven primes that are both truncatable from left to right and right to left.

load 'prime_generator.rb'

def prime? n, truncate
  return false if !$primer.is_prime?(n)
  return true if n < 10
  prime?, truncate

left = { |n| n / 10 }
right = { |n| n % 10**Math.log10(n).to_i }

$primer = 3_797
n, sum, found = 0, 0, 0

while found < 11 do  
  if (n += 1) > 10 && prime?(n, left) && prime?(n, right)
    found += 1
    sum += n

puts sum

Also, I’ve finally moved my project euler solutions over to bitbucket. Long live Mercurial!

Audio Automata with Otomata

I don’t normally like to blog links, Twitter and Google Reader are much better platforms for that, however this was so cool I just had to shout it out.

Read more about it, and check it out yourself: Otomato

The rules for the automation are simple, but the hypnotic patterns that emerge are truly beautiful and interesting. The user interface is both easy and fun to use, and it does a great job of showing the simple beauty of what you’re listening to.

The music reminds me a lot of one of my favorite bands Boards of Canada, so if like the sound of this then check them out, it makes for great programming music.

Reflections on Orlando Code Camp and BarCamp Orlando

In the last two weeks I’ve had the great fortune to attend two fantastic conferences here in Orlando.

Both completely free events, and both were fun, inspiring, and eye-opening in their own ways. I came away feeling inspired, invigorated, and with a couple of new nerdy (read: cool) t-shirts!

Orlando Code Camp
Orlando CodeCamp was incredibly educational and informative with it’s tech-heavy, hour-long formal presentations. I can’t imagine all the hard work put in by the speakers and volunteers to have such a large and superior quality event run, and run so smoothly.

There was a definite collegial vibe (taking place at the beautiful Seminole County College campus didn’t hurt!) but oh how I wish my university experience was as interesting, efficient, relevant, and productive.

Team Foundation Server
Special thanks to the ONETUG president Esteban Garcia for patiently and thoroughly answering all my inane TFS questions. I’ve avoided TFS talks in the past because I thought they would be boring, but boy was I wrong! It really cool to see everything up and integrated like that!

Also another special thanks to SubMain for the CodeIt.Right licensce I won. I’m already putting it to good use!

BarCamp Orlando
If CodeCamp felt like school, then BarCamp felt more like…Woodstock. The event took place in the Wall Street Plaza, with talks taking place in local venues like One-Eyed Jacks, Slingapours, and The Gibson Showroom. The presentation times and topics were updated throughout the day on a giant white board, and there was a great little mobile site for keeping track of the ever evolving schedule the on your iPhone. (I’m an Android fanboy, but I don’t think I’ve ever seen so many Apple products in one place before!)

The talks ranged from the technical to the artistic to the entrepreneurial, and there were strong revolutionary, community and outside-the-box undercurrents behind most talks.

The session that most picqued my interest was done by Stan Schultes, Microsoft MVP and organizer of the BarCamp Sarasota. He led a ‘birds of a feather’ style centered around software start-ups, and what cities like San Francisco, Boston and New York have that we in the “Greater Central Florida Region” don’t….and how we can organize to fix it!

The biggest take-away for me however is getting to see and meet so many inspired and passionate makers, shakers and enthusiasts out there trying to make a difference.

Topics and Times

Photo Credit: Nick Pettit

I’m looking forward to checking out recently discovered entities like Orlando Coding Dojo, Urban ReThink, and Familab events in the near future.

Big shout out to ONETUG, ORUG, and Envy Labs for being such big drivers behind these events and a big thanks to all the organizers, sponsors and community. Fantastic job!

Oh, and I almost forgot to mention the best part about these two events: They’re recurring!

I’m looking forward to seeing you all again soon!