Skip to content

u/puddyput

In this archive from Jul 2011 to Oct 2017

1
posts
8
comments
0
media
16
score

Top posts

Top comments

Protocols (HTTP(S), FTP, features and security-danger-zones(think about cookies and sessionstealing)), hashing/salting (how do I store passwords securely? Which passwords should I accept as secure enough?)

How to learn about that stuff... Hmh, to be honest I don't know the perfect way, what I know I learned by poking around and attending conferences

4 points

not a senior coder, but these are my suggestions:

  • reorder parameters for determPwGen::__construct so that the optional parameter rounds comes last. or just get rid of the rounds parameter alltogether and implement setRounds

  • extract the 1000 rounds default as a constant

  • rename determPwGen to DeterministicPasswordGenerator, making the name obvious (otherwise people have to remember the exact way you used to abbreviate the name. minimize situations where developers have to think whenever you can). also it is common to start the name of classes with a capital letter.

  • why is it "generateHash" but "site_label"? yea one is a variable and the other a function, but keeping it consistent increases readability

There is some more you could do, you might enjoy the book "clean code" by Robert C. Martin

edit: reddit syntax ..

3 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.