I have interview with a local ecommerce company that’s super stoked on me because I come from a larger company - I don’t know what they’re all excited about, I think we just copy what the big guys are doing anyway.
numbers they’re throwing at me already are nearly 2x my salary, it’s a cool website, so I’m like uhh yea let’s do it. one of those roles where’s it’s like line by line a perfect description of what I’m already working on.
problem i learned last round of interviews is my programming is super rusty and slow, which they dont seem to care, this is more of a pure ops job - which is kind of a red flag, in my opinion, but if you can program at all in those environments it kinda makes you the defacto “guy.”
GL - MS is one of the few big techs left that I’d feel morally okay working for. Job satisfaction always seems high there if glassdoor can be trusted.
a big lesson I learned in the last 3 years though is these big corporate environments seem to be absolutely covered in red tape at every turn. stuff like - a task that takes actually 15 minutes can drag into weeks because you need to figure out how to get access to the thing you need and then jump through all those hoops to get it, etc. I don’t think it’s for me, I hate that crap
There’s also an O(1) space optimization (which I believe is explained in Cracking the Coding Interview). That optimization can then be generalized to finding up to k elements that appear at least n/k times in O(n) time and O(k) space.
Didn’t go great, asked some async stuff I wasn’t quite prepared for so have to work on that. I got somewhere but not good enough I’m sure. Oh well back to the grind. No async on leetcode so have to go find that. Fun.
The former i.e. write functions/loops that are mixed with setTimeout to not fire all at once/fire next one on resolve etc I couldn’t quite remember how to set that up, wonderful. Oh well there’s always drinking heavily at 4pm instead.
You could always work through fixing your game to get more comfortable with async stuff. That poor one node instance you’re working to death will thank you.
We may all be out of jobs soon. Could have done promiseArray = urls.map() though.
But in all seriousness. This thing could be a pretty powerful tool to get started on stuff like this where you remember how to do it… but promises are weird and how did that work again?
Use the Star Wars API to get a list of all the planets in the Star Wars Universe. Note, the api is paginated, so you will need to pull multiple times to get all the planets.
Display all of those planets in a list on the front page of your app. You may choose to show all the planets, or paginate them for the UX experience.
Add a text input at the top of the page that allows a user to search the full list of planets. The filtering should NOT re-call any api calls.
When a user clicks on a planet, they should navigate to a new page that shows a list of the residents of the planet fetched from the Star Wars API.
When a user clicks on one of the residents, they should navigate to another page that shows the personal details of that resident.
Include a header with breadcrumbs. Something like All Planets / Planet Name / Resident Name. Each breadcrumb section should be clickable to navigate to the appropriate page.
Include a service file that contains all the api urls and gets. Your React components should not contain any url references.
Style up the application as you like. The whole thing doesn't need to be perfectly polished, but we do want to see that you can implement a UI design. Even though we aren't giving you a design to implement. 😆😆 Our advice would be to give the app a decent layout that makes sense and then pick one piece of UI and give it some love ❤. This could be the planet list items, the search input, or the individual residents.
Bonus Points
Every company does things a little differently. The closer you get to our stack the better we'll be able to assess how you work with it. So, extra credit if you use any of the following:
Mobx and Mobx State Tree for state management.
Sass for styling.
React Router for routing.
Optimizing
various features are as fast as possible.
Re-use of components
Worse or better than being stared at while trying to solve LC mediums?
I swear to god i’m seeing versions of this same problem everywhere. query some api that returns paginated results and we’re gonna put some annoying rate limit on it and see what you do.
lol couple weeks. I’m almost done but its gonna be like 8 hours total to make it not terrible and do the “optional” parts (hint: they aren’t optional). At least its for principal. api is garbage though lol can’t infer anything. IDK whatever
Are you using Mobx and Sass? I’ve never used Mobx so that would slow me down. CSS would slow me down but presumably that’s a requirement for this job. Are you using something off the shelf like react table for pagination and search?
I’m debating whether or not to use mobx. Never have before but it can’t be much different than redux. SASS support comes with create react app. All HTML baby any dipshit can throw mui at stuff is my thinking here.
I’m still my high school self - my boss boss wanted me to prepare a presentation to solve some problem we’re facing with ssl certs, i’ve been in bed with fever for 3 days and finally got up to do it (it’s in 3 hours) and buried in my drive i found a full blown presentation i’d made on this exact topic 2 years ago.
jackpot, reminds me of when i used to recycle old A+ papers in english class.
I have a Python question. I want to take a list and replace elements with an empty string if the element repeats the previous element. For example, I want to turn
['a', 'b', 'b', 'b', 'c', 'c']
into
['a', 'b', '', '', 'c', '']
One way to do this is
new = old[:1]
for i, o in enumerate(old[1:]):
new.append(o if o != old[i] else '')
This seems a little kludgy, but I can’t think of a more elegant solution. Any ideas?