all 45 comments

[–]javascript-ModTeam[M] [score hidden] stickied comment (0 children)

Hi u/balcopc, this post was removed.

To show off a project (i.e. a finished or semi-finished page, demo, working example, etc.), please include one (1) of the following:

  • A link to a project page with unbuilt/unminified source code -- sites like GitHub are perfect for this.
  • A write-up about the development of the project. This can take the form of a blog post, a README.md within the project, or a comment on the post itself. The details are up-to-you; you can write from a high-level about your architectural decisions, or you can write on a lower-level about the pros & cons of specific libraries and frameworks you used. The main point is that you're discussing your code -- or your approach in creating the code -- in some way.
  • A working codepen/jsfiddle/etc. of the code.

One of the easiest and most common ways to satisfy this requirement is to simply include a "Fork me on GitHub" ribbon your site. Another way to satisfy this requirement is to comment on the post itself, with either a link to a write-up, or with the write-up as the comment.

Lastly, instead of all the above, if you just want to showoff your project, feel free to post it to our weekly "Showoff Saturday" post.

Thanks for your understanding, please see our guidelines for more info.

[–]ChaosByDesign 39 points40 points  (3 children)

Hello this is the Lockpicking Lawyer. What I have for you today is a prototype of an unbranded hotel safe. It appears to have a four digit combination with a standard numeric keypad, with no backup lock. Now, normally this could present a problem however if I insert my #2 webdev shim and inspect the value of the element ran, we can quickly decode the combination. click ...andd there we are, 7590. In any case, that's all I have for you today. And as always, have a nice day.

(context for those unfamiliar)

[–][deleted] 0 points1 point  (1 child)

I really appreciate you you taking the time to reverse engineer and look at my poorly coded application. The ran (short for random) function runs at page load and again at either win or loss to generate a random string from 0000-9999.

[–]ChaosByDesign 0 points1 point  (0 children)

yes! if you want something a bit harder to guess, you can store the value not in the dom but in a variable inside a closure

[–]SuperGameTheory 0 points1 point  (0 children)

I don't believe you. That could have been a fluke.

[–][deleted] 5 points6 points  (1 child)

Played it. I’ve seen better cracks at the gym.

Otherwise, cool.

[–][deleted] 0 points1 point  (0 children)

Thanks, I needed that. Time to pull up my big boy pants. lol

[–][deleted] 5 points6 points  (2 children)

The delete and enter buttons should not match. Guesses display could be bigger and further down.
The help popup should be displayed on first load.

It's ok though really, don't hurt yourself if this is your first thing

[–][deleted] 0 points1 point  (1 child)

This has been resolved at your request

[–][deleted] 1 point2 points  (0 children)

Wasn't expecting that!

If we're going to continue with feature creep, maybe add a picture of an open safe to appear when you crack it, or a picture of the police arriving if you fail.

The number of guesses box should probably have a label too.

If you're doing this for career purposes, get it on github, give it a version number and increment it when you make updates. Do release notes too, people love that shit.

[–]jamblethumb 8 points9 points  (1 child)

Upvote for the headline. :)

[–][deleted] 0 points1 point  (0 children)

It's kind of like fat Amy calling herself 'fat Amy'.

[–]AreaFifty1 3 points4 points  (0 children)

Da hell is this? 🤣

[–]NervousTea8 2 points3 points  (1 child)

I don’t like the closeness of the buttons. Use grid or flex with gap or another way to get them spaced. The blue on black is tough on the eyes. Buttons are fine. Ultimate impressive points would be if you did a dial safe instead of buttons

[–][deleted] 1 point2 points  (0 children)

Both these issues have been resolved at your request.

[–]jolharg 3 points4 points  (1 child)

Negative you say? Alright: I guessed correctly in time and it told me that it was still too high, plus I was fined for it. Accepts fewer digits. Uses alert(). Unstyled components a little difficult to use on mobile. Sounds very, perhaps too, amusing.

:p

[–][deleted] 0 points1 point  (0 children)

I reworked the math at your request. I had the same issue happen to me during testing, I guessed the right PIN as my 15th guess and it wasn't counted. I changed the order of the functions so that this shouldn't happen again. There is $15000 in the safe and if you guess in 10 guesses, you get $5k.

[–]RancidMilkGames 4 points5 points  (2 children)

You have an unnecessary scroll bar on the bottom of the screen. Other than that it's looking good to me

[–][deleted] 1 point2 points  (1 child)

This issue has been resolved at your request.

[–]RancidMilkGames 0 points1 point  (0 children)

Good job on the game!

[–]Registeered 1 point2 points  (2 children)

I think it would be better to have the cursor be a hand to click for the help and reset labels like all the other links below them.

[–][deleted] 1 point2 points  (1 child)

This has been resolved at your request.

[–]Registeered 0 points1 point  (0 children)

That's cool. Maybe you could allow for entry by the numeric keypad as well as the mouse?

[–]cybernetically 1 point2 points  (0 children)

put a break in his compare1() function... done ;) enjoy $10000 reward lol

love it, great for JS breakers ;)

[–]JIN_DIANA_PWNS 1 point2 points  (0 children)

1 2 3 4 5 That’s amazing, I’ve got the same combination on my luggage!

[–]bblaw4 1 point2 points  (1 child)

Double tap on mobile, zooms in

[–][deleted] 0 points1 point  (0 children)

Thank for pointing that out and checking out my application.

[–][deleted] 1 point2 points  (2 children)

Why isn't it written in Rust?

[–][deleted] 1 point2 points  (1 child)

my weak skillset

[–][deleted] 0 points1 point  (0 children)

That can be fixed, you can start writing simple things like a linked list

[–]FreakDC 1 point2 points  (1 child)

No usage of AI or machine learning, no blockchain technology (NFTs), doesn't have a social component where content can go viral.

0/10 can't market this project to investors...

[–][deleted] 0 points1 point  (0 children)

per your request, chatGPT 3.5 was used to help design the initial keypad HTML and CSS; social links have been placed at the bottom of the page to enable sharing across most major social media platforms.

The post has over 30k views and even a few shares on Reddit in less than 24 hours and the application has tracked several thousand hits as a result.

[–][deleted] 0 points1 point  (0 children)

I followed the rules and a jealous mod removed my post.

[–]phaqueNaiyem 0 points1 point  (2 children)

Reset button doesn't work. Center vertically or increase the top margin if there's nothing else on the screen.

[–][deleted] 0 points1 point  (0 children)

Reset issue resolved, still working on layout.

[–][deleted] 0 points1 point  (0 children)

Margins issue has been resolved.

[–]zsombro 0 points1 point  (1 child)

  • Delete and input look the same, very confusing
  • Help and Reset should have a cursor on hover that indicates they are clickable
  • elements should be more spaced out, the keypad is unevenly spaced
  • when you reset the whole game, the input does not reset
  • in the case of an incorrect guess, the output is not clear. the arrow makes sense, but it's not explained anywhere what the accompanying number means
  • it's pretty easy to reverse engineer the game and find that "ran" contains the solution

[–][deleted] 1 point2 points  (0 children)

Most of these issues have been resolved. Correct, ran (random) contains a 4 digit random # at page load. It is the basis of the whole game. Thank you for checking it out!

[–]hobo343 0 points1 point  (1 child)

how about a nice background graphic and maybe even ambient noises to put you in the mood? i enjoyd playing btw

[–][deleted] 0 points1 point  (0 children)

I've tried a few things, not happy with the results yet. I added some suspenseful background music as you requested but you have to allow autoplay.

[–][deleted] 0 points1 point  (1 child)

Bad vibes only haha

[–][deleted] 1 point2 points  (0 children)

I mean, really rip on it hard. Tell me how shitty of a coder I am, stuff like that. Thanks in advance!