Win a copy of Java XML & JSON this week in the XML and Related Technologies forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Open ended interview question - How to tackle  RSS feed

 
Ranch Hand
Posts: 35
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was given this question as an assignment for Junior/Mid Level Full Stack Developer role.

(The interview process is long over but I want to try and gain as much as I can from the assignment)

Step 1: Shopping cart

  • You are building a checkout system for shop which only sells apples and oranges.
  • Apples cost 60p and oranges 25p.
  • Build a checkout system which takes list of items scanned at the till and outputs the total cost.
  • For example: [ Apple, Orange, Apple ] => £2.05
  • Make reasonable assumptions about the inputs to your solution; for example, many candidates take a list of strings as input



  • Step 2: Simple offers

    The shop decides to introduce two new offers
  • buy one, get one free on Apples
  • 3 for the price of 2 on Oranges

  • Update your checkout functions accordingly



    The only request was to use Git throughout the process to show your work.

    It can probably be created as a Java program in about 15 minutes, but that wouldn't show off any abilities with frameworks, databases, REST etc.

    After a bit of thought, my approach would be

  • Create a spring boot application that generates a webpage
  • Use javascript buttons on the webpage to mimic the scan of an apple/orange (and automatically update totals inc. discounts)
  • Save the details of each sale/transaction to a Google FireBase database


  • This alone would take me a few days to figure out as I am not very experienced with this type of project.

    I would like to know what approach people would take to answering this and what would a company be specifically looking out for knowing that the applicants are Junior/Mid Level.

     
    Marshal
    Posts: 62801
    203
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    How long did they give you for this exercise? Did you ask you to create it during the interview? Where did you have your Git repository? How long did you take to create that app? I presume you didn't get the job?
    I would worry a lot about somebody who didn't try to have a working prototype in 15 minutes. They want to see the way you handled the task, your code style, etc. Adding all those other things would worry me too, becuase it would raise suspicions about whether you are going to spend all your time doing extraneous things which add nothing to the value of the product. Also the way you wrote raises suspicions that you are trying to work out implementation details before deciding what to do.

    Your thread title “Open ended interview question - How to tackle” doesn't tell us what the thread is about.
     
    Kevin Mckeon
    Ranch Hand
    Posts: 35
    3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Campbell Ritchie wrote:How long did they give you for this exercise? Did you ask you to create it during the interview? Where did you have your Git repository? How long did you take to create that app? I presume you didn't get the job?
    I would worry a lot about somebody who didn't try to have a working prototype in 15 minutes. They want to see the way you handled the task, your code style, etc. Adding all those other things would worry me too, becuase it would raise suspicions about whether you are going to spend all your time doing extraneous things which add nothing to the value of the product. Also the way you wrote raises suspicions that you are trying to work out implementation details before deciding what to do.

    Your thread title “Open ended interview question - How to tackle” doesn't tell us what the thread is about.



    Hey !

    Their was no time limit, the sent the email with the spec on a Thursday and asked to send them on the repository link the following week. So a couple of days or a weekend.

    I withdrew from the job application the following week as it meant moving to the London, which I wasn't prepared to do.

    I never attempted the question - partially because I had turned down the application and it was Christmas week, but mostly because I dont really know what to do.

    I dont really know where to start, what tech to use, what they are looking for, how to organize unit testing, how to turn a Java function into a REST web API, How to link a front end with an API, how to tag Git commits .

    If this was a simple Java question, I could do this in 5 minutes - write a method that takes in an array, loop through array, keep a count of the total cost and apply discounts where required etc.

    I want to complete this exercise and learn all the above but its difficult to do this without sitting down with a developer and talking it out. (hence the thread)

    I would like to know how other developers would tackle this question. What tools / methodologies / patterns they would use. What an examiner would be on the lookout for.

    I would have no problem solving a medium/difficult hackerrank question or Java exercise but how or where does one learn to develop simple software after becoming proficient in the Language  
     
    Marshal
    Posts: 6491
    441
    BSD Linux Mac OS X VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I don't see anywhere you were asked about all that fancy stuff you are mentioning: REST API, Spring Boot, FireBase...

    Campbell is right. You were asked pretty clearly what you need to do, why you don't start from there? (a core of the system)

    Fairly recently I was working on my personal project called Conway's Game of Life, the whole project consists of 3 source files + 3 source files for tests, so 6 in total. It took me a month of discussions with guys here to discuss it, refine it, write it, over-write it countless of times, so now you could take this little project somewhere further: add fancy desktop GUI, build it as a web app, persist some of the pieces somewhere in DB for some reason, etc...

    The company you were interviewed at, aren't looking for evidence of your proficiency in frameworks, tools, etc.. it seems they were about to test whether you can program in general, see the quality of your code, whether you write tests (maybe even whether you write them first), etc. So they asked you to use Git and commit often, so they'd see how you tackle problem, what you take on first, and similar things.

    So if you want to try to attempt this project, start from a "Step1: Shopping cart".

     
    Kevin Mckeon
    Ranch Hand
    Posts: 35
    3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks for the advice. From reading the above, what I think what I am looking for more than anything is help creating a Project Plan.
    Once I know what I should be doing, I can start.
    Here is what I came up with so far :


    PROJECT PLAN  
    1. Learn how to use GIT from command line and learn how to TAG Commits for each working release,
    2. Learn how to set up Unit tests and continually test each part of the project (fully test each commit),
    3. Adhere to best coding practices throughout (Naming conventions, GIT commits, Commenting, Separate code and data, Keep it object orientated etc),
    4. Create a database that holds ITEM Names and prices. Use the Application to extract the data and compute it and expand database when required,
    5. Turn the function into a web API, probably REST,
    6. If creating a front-end, consume the API rather than having everything coupled



    Part 5 and 6 are where i will get stuck as it will be about process as opposed to actually solving a problem. I have no idea how i would turn a function into a Web API or what it means to consume an API.

    Also a couple of other short questions, should i be using Maven from the beginning ? Is this a case for a Maven Project ?
    Should i try and use something like Jira to keep track of issues, bugs and my testing cases ?
     
    All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
    RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
    https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!