6

Alright guys question time, I have been given a coding challenge by a company for a junior dev position and as someone who is new to programming I was not able to figure it out on my own and turned to stack. So I found the answer and its acctually for the exact same company & challenge. They literally named dropped the company. I am slowly figuring out what the person has done, but its in php which is a langauge I have never used and I am entirely certain I would not have figured it out on my own. Also, I am a n00b. I am obviously going to modify the code and like see if I can change/improve it - but should I even bother freaking sending it, if I had no clue how to figure it out myself. I am at a loss. I don't know if I would be able to keep up there or if I would be cheating or overselling my abilities. I am from a bootcamp and it seems they typically prefer people with computer programming backgrounds but I do have some of the skills mentioned in the ad and their big thing is culture and cover letters which I slay at. Idk. Fuck me.

Comments
  • 3
    These challenges 99% of the time won't reflect the actual work you'll be doing. Try sending it, just change it up a bit (variable names, spacing, etc) so they don't notice you copied it from SO.
  • 1
    @neeno That is kind of what I was thinking too, but I wasn't sure. God knows that things usually end up entirely different from what you expect the outcome so who knows...
  • 3
    @bonegarden just out of curiosity, what's the challenge?
  • 1
    @C0D4 So I have to make a function which takes four different strings and only masks out the credit card, cvv and expiry date with asterisks. The strings are all in a different format, and it must return it all back in a string, not an array or other data structure, and asterisks have to be in the same format as the original format. So 4444 has to be **** etc.
  • 0
    Also just to elaborate the strings have a shitload of other info like date time account etc
  • 3
    I mean, you do have the skill to look up your exact problem.
  • 0
    @kescherRant lolol I guess so. My google sleuthing skills are pretty top of the line 🤣🤦‍♀️
  • 2
    Sounds like a regex problem to me.
  • 0
    @C0D4 yup I was dicking around with regex got it to mask the credit card - not sure how to make it check for three others. Ill keep trying...
  • 3
    1. Do you understand what and why was done in the php algo you found in SO?

    2. Could you implement the same algo w/o looking at the one in SO?

    3. Have you discovered at what point your line of thinking failed you while trying to find a solution before SO?

    If all of the above are YES - go ahead, apply for the job. You should be alright. A bit overwhelmed at first ofc, but that's all natural.

    If either of the above is NO - I am sorry, but it might be a difficult start. You'll probably need a good mentor. It might be hard, but if you walk extra miles, work hard, spend your free time to figure things out - you should be fine eventually.
  • 3
    Make sure you do understand the code you send.

    Searching the net for a solution is quite common even once you have s job, I meen, they hire people to get things done.

    But if they are any good at recruiting they are going to ask you questions about the code.

    And if they do not, well, thats their problem ;)

    And even if you do not get it, its very good practice to participate in such a session.
  • 1
    @Voxera @netikras I really appreciate these responses thankyou!
  • 4
    @bonegarden

    Checkout https://regex101.com

    It's saved my ass a lot plus let's you add your test data to prove the regex is working.

    But yes, as the others have said, make sure you understand what it is you submit In case you are questioned about it.
  • 3
    @C0D4 I fucking love regex101
  • 0
    TIL that you can apply for a job without having all the knowledge listed in the requirement section of those ads and by being a newbie.

    I think that you're not from Germany because here that scenario would not be possible (or very rarely possible).
  • 2
    @C0D4 try regex crosswords 😁 and you won't need rgx 101 😁
  • 2
    @netikras that hurts on so many levels.
  • 1
    @C0D4 why? 😁
  • 0
    @-ANGRY-STUDENT- nah, I am from canada - they are probably more lenient here.
  • 0
    @C0D4 thanks man, I appreciate the response. I am familiar with regex101 - I had to write validation for an email component for my practicum. It's extremely useful. I am just trying to figure out how I can use multiple replacements with preg__replace/preg_match.... OR something, not sure...
  • 2
    @bonegarden ouch, do not use regex for email validation. Either you have it so general that anything with an @ gets through or you end up blocking valid emails.

    There used to be an regex that could do it, before they added IDN, international domain names.

    It was over 4000 chars long. With IDN I have not seen a new working one.

    So basically, verify that you have an @ and something on both sides.

    If you need more, either get a library that does it, like cobisi’s email verifier, or send a verification email and only accept it if they click the link in the email.

    Regex seems fine ti begin with.

    But just don’t.
  • 1
    @Voxera Hmmm interesting... maybe my boss is not aware of that. It is a super generic input - it was mostly just for practice for us, I think
    It basically takes in anything with an @ symbol and something.something format...
  • 1
    @bonegarden if its super generic it probably works for 99.9 % :)

    But just don’t let it grow.

    The best reason is that a customer that cannot use their email, wont’t stay a customer :)

    And most businesses do not want to turn customers away.
  • 0
    @Voxera no doubt! Thanks for the insight 👌
  • 2
    @bonegarden I did the mistake of trying to use regex, and then when I found it lacking I tried to build my own library. It was better in validating, but it was a beast to build and maintain and most definitely not worth the time and effort I put into it.
  • 0
    @Voxera that is hardcore. I don't think you should say it wasn't worth the effort I feel like that would give you some cred somewhere or at least self satisfaction to know you can do something like that.
Add Comment