Cixak95211's Posts
Nairaland Forum › Cixak95211's Profile › Cixak95211's Posts
1 2 3 4 5 6 7 8 9 10 (of 13 pages)
Karlebolu:30days . . Have had my fair share of burnouts, even acute CVS . I'm "glassified" as we speak |
No sleep, no hibernate
|
You wanna buy him a shot of Tequila? |
@naijasensei: Nailed it!!!! However case amount === 0: case amount === undefined: can be better rewritten as case !amount since ! will evaluate the same for falsey, null, zero and undefined same goes for amount === 0 || amount === undefined. |
End of story !!! |
Karleb:Case 0 returns 0. If you look well, you'll see the cases are stacked which is a valid switch expression Parenthesis are redundant. A smart code editor, once again, will remove the parentheses if you add it. Prettier will also remove it. Try again. |
Ques 3: What is the problem with this block of code? What is the fix? const calculateFee= (amount) => { |
naijasensei:* push line 23 is not necessary as you can return the increased length on line 22. * unshift line 42 is not necessary as you can directly assign this.stack to [value, ...this.stack] depending on some school of thought, it's best to outline each line seperately, but you'd be wasting memory declaring variables that are really not necessary a smart code editor e.g. any of the JetBrains family, would have also warned you about it. Its amazing we have smart minds here, so why did y'all allow this place to be overran by some "website for 20k" minds? |
Jummate:1 2 3 4 images
|
Jummate:Very nice. The push method will always return the new length . . so there is no need put it inside in a branch thus causing you to have multiple return statements which do exactly the same thing. You could do your conditionals and then return the increased length at the end of the ops. Plus it's perfectly okay to have [undefined, 3, undefined] in an array, exactly as Karleb as pointed out. Doesn't make the array house 1 item as you might have thought but rather 3. I would use your codes anyday anytime. It's clean. |
Karleb:Nope |
Question: 1. Design an algorithm(s) for the following array operations: "push, pop, shift, unshift" using object oriented programming practices. 2. Design an algorithm that will find the longest common subsequence between two arrays, plus the time complexity for your solution. |
You could do a traditional for loop [reverse] which should run in O(n) const reverse = (a) => { |
chingle5:How sure are you about the bolded? ![]() |
KaluwisxPRO:Obviously, you are still stuck in the Sagem myx-5 era and have not written a line of code in your life. Please SCRAM!!! ![]() |
JohnCloud:I have never said backend was harder than frontend, only a newbie will say that. I am only trying to clear the assumptions of "backend is easier" Also, no matter your project, even if the frontend will just show random pictures of cats uploaded by a guest, zero logins, you shouldnt put that logic there. Worst case scenario, spin up a cloud function in seconds and allow the function do the upload and retrieval of cat pictures. The frontend should be used for what is is strictly, user interface and experience. Game over! |
CSTRR:Have you done anything relating to f r a u d detection ? if yes, then you'll know backend engineers rarely sleep well especially those in fintech. |
JohnCloud:Business logic and frontend SHOULD NOT BE USED in the same sentence. If you're adding business logic to your frontend, then your design is pretty flawed and should be rewritten. You're always warned to avoid adding even a line of business logic to the frontend, Even at the the backend, the business logic has to be split into layers with each layer inside its own interface and independent/separated from other layers. |
BigDawsNet:False. Most heavy duty APIs dont have a GUI and are used by millions of people. Can you call that useless? Using gmail as an example. with the API, backend only , i can login, read emails, save emails, send emails delete emails perfectly. With just the front end alone and backend disconnected, I cannot even login to gmail. Can only view the landing page, which says welcome to gmail , thats all. so you tell me which one is useless? |
emetisuccess:Sheybi Google maps is nothing much, only fetching, updating of DB, mongodb, mysql abi?? ![]() lol, seems like you don't know what is called advanced data structures & algorithm . . . even Frontenders often beg to be excluded from such tests during technical interviews If i ask you to write an algorithm that fetches the shortest interconnecting flights between 2 or more airports, they will say am wicked. Or perhaps if i give you my family tree, 10 generations backward and ask you to chart the nearest path between a specific great raised to power N grandfather and my unborn child, they will say am brutal. The internet is your friend. |
I'll be back. |
airsaylongcome:Cant blame him . A programmer only opens an editor, writes code and closes it. It takes beyond a programmer to understand the SDLC (software dev life cycle) and the business behind it. MY advise to OP. . collect your money in milestones for each significant delivery. Deliver login button, get paid, deliver landing page, get paid lol . . Create a dictionary, get paid lol . . |
manando1:localStorage p.s. it can only store strings for each key => value pair. So dont forget to JSON stringify and JSON. parse when storing and retreiving or better still use serialization which is better and more performant than JSON strin/parse Goodluck |
^^ Empty pride, which makes it worse. I can bet my life he cannot explain in his own words the difference between == and === ![]() |
@gimakon You're at stage 2. carry on . . you're doing well. Let us know when you get to stage 5 . . . 12 years a
|
@gimakon Going through your post. I can authoritatively deduce that you've been a developer for "12 days" and NOT "12 years" as you claimed. 1 day of professional coding == 1 year of "on the couch" coding. Nobody with even 2 years of professional coding experience will ask these kinda questions you just asked. Feel free to refute my claim with evidence and I'll hook you up to a remote job, guaranteed !!! |
The5DME:May the force be with you. |
Karleb:Yes sire! |
@The5DME Many thanks for the honorary title conferred on me, alas, I am "not the only one here with the breadth of wisdom to advise you". Many will tell you otherwise so take my advise with a pinch of salt. Yes there is a diff. Programmers focus only on code, SWEs focus on design and engineering from client to business needs. All SWEs are programmers but not all programmers are SWEs. If you have the means, pls get a C/S degree, coming from someone who also majored in Biochemistry before my transition into Maths and C/S , I think have enough knowledge in that area to advise you. Some will advise you otherwise that you can learn DSA on your own. Yes true, but you will struggle, practically. Yes, if you practice for 8hrs per day for a couple of years, you'll be a guru. But that's just for DSA. How about other parts of computing? If you have 2 years to spare, why not add an extra 2 and get the whole cow instead of just the milk? If they want to to prove you wrong, just tell them to "pass" even the Upwork coding certification or any proctored whiteboard interview and tell you their experience. You can be as many things as you want, engineer, scientist, doctor, but you should try to excel in one by a long shot. Jack of all trades, master of . . you know the rest. Cheers. My DM is open for more conversation, hoping the bot spares this post. |