Code Golf! Password Generator

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

35 Replies - 6699 Views - Last Post: 30 June 2015 - 08:35 AM

#31 ybadragon  Icon User is offline

  • Home Owner
  • member icon

Reputation: 571
  • View blog
  • Posts: 2,647
  • Joined: 11-May 12

Re: Code Golf! Password Generator

Posted 23 June 2015 - 09:35 AM

So this wouldn't pass any security test at all, but I don't recall you saying we couldn't force the position each character class was in, nor that we couldn't force how many of each character class there were. So my submission

Spoiler


--EDIT : Added explanation in comments
Spoiler

This post has been edited by ybadragon: 23 June 2015 - 09:58 AM

Was This Post Helpful? 0
  • +
  • -

#32 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 5921
  • View blog
  • Posts: 20,243
  • Joined: 05-May 12

Re: Code Golf! Password Generator

Posted 26 June 2015 - 06:02 AM

Anyway, as a quick aside, remember that private is the default modifier. There is no need to use it if you don't need it. That should help some people save a few more characters.

I'm hoping to get a bonus for not even using line 7 from the original template.

Spoiler

Was This Post Helpful? 0
  • +
  • -

#33 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Code Golf! Password Generator

Posted 29 June 2015 - 09:06 AM

Sorry guys, I've been on vacation for a few days, and haven't been able to score these. I should be able to do so tomorrow! Thanks for participating.
Was This Post Helpful? 2
  • +
  • -

#34 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Code Golf! Password Generator

Posted 30 June 2015 - 08:05 AM

View Postybadragon, on 23 June 2015 - 11:35 AM, said:

So this wouldn't pass any security test at all, but I don't recall you saying we couldn't force the position each character class was in, nor that we couldn't force how many of each character class there were. So my submission

Spoiler


--EDIT : Added explanation in comments
Spoiler


This code passes, though I had to add the "public" modifier back to the Generator class for the tests to see it.

Score: 268
Was This Post Helpful? 0
  • +
  • -

#35 ybadragon  Icon User is offline

  • Home Owner
  • member icon

Reputation: 571
  • View blog
  • Posts: 2,647
  • Joined: 11-May 12

Re: Code Golf! Password Generator

Posted 30 June 2015 - 08:25 AM

yay it passed :D
Yeah I forgot default was private, my bad.
Was This Post Helpful? 0
  • +
  • -

#36 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Code Golf! Password Generator

Posted 30 June 2015 - 08:35 AM

View PostSkydiver, on 26 June 2015 - 08:02 AM, said:

Anyway, as a quick aside, remember that private is the default modifier. There is no need to use it if you don't need it. That should help some people save a few more characters.

I'm hoping to get a bonus for not even using line 7 from the original template.

Spoiler


Sure, you still get the same number subtracted from your overall, so you get "bonus points".

Score: 176

View Postybadragon, on 30 June 2015 - 10:25 AM, said:

yay it passed :D/>
Yeah I forgot default was private, my bad.


Classes default to internal, but the unit test is in a different assembly and I chose not to set the InternalsVisibleTo attribute as to not encourage removing that part of the template.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3