programming challenge

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

Re: programming challenge

Post by pretentious on Tue Nov 05, 2013 2:07 am
([msg=78047]see Re: programming challenge[/msg])

hellow533 wrote:Bitch please, if you don't check to make sure something works before giving it as a test to others, you're just hurting yourself. Working or not, you should check. I do program sometimes, and I can't imagine submitting a database management system update to my boss without first checking to make sure it works.

Fair enough bro but this was ten lines of python, not a database management system and you are not my boss 8-) but don't worry, I'll be slightly more careful in the future ;)
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

IF you feel like exchanging ASCII arrays, let me know ;)
Can you say brainwashing It's a non stop disco
User avatar
Posts: 1195
Joined: Wed Mar 03, 2010 12:48 am
Blog: View Blog (0)

Re: programming challenge

Post by -Ninjex- on Fri Nov 08, 2013 2:03 pm
([msg=78094]see Re: programming challenge[/msg])

It was something funnish I suppose; thanks to Project Euler for making think of good one liners lately. Substitute s for the string
Code is in Ruby 1.9.3p0
Code: Select all
puts s.split(/[^0-9]/).map(&:to_i).inject(:+)

Output: 128434
For those that know
K: 0x2CD8D4F9
User avatar
Posts: 1691
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests