Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,159,392 members, 7,839,730 topics. Date: Saturday, 25 May 2024 at 08:16 AM

Makavele's Posts

Nairaland Forum / Makavele's Profile / Makavele's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 79 pages)

Programming / Re: Programming Logic Challenge by makavele: 7:50pm On Feb 02, 2020
2kaybiel:
I only suggest. After all, Big O notation is used to test the efficiency of an algorithm. At least, the problem is mathematical in nature he can make use of algorithm and use Big O notation to test its efficiency.

I think he needs the algo and don't care if it's in constant time
or factorial time . . .
Programming / Re: Programming Logic Challenge by makavele: 5:42pm On Feb 02, 2020
crownedrookie:

Exactly the feedback I was expecting to get. Cos I was surprised seeing such a challenge on the first 70 pages of a JS for beginner book.

Seen that question too many times . . . Recursion is your answer !
But back to the most important stuff here to discuss:

So I found this in a book I'm reading and I'm quite curious how many of our resident developers can solve it.

Well, that wouldn't go down well with some people. I have no qualms with that, (maybe because I am not a developer, as you like to put it, but) because I believe, everybody should have freedom of 'expression' but verily, verily I say unto you, I have breezed through lots of books and materials in software engineering and I will tell you a secret. questions like these, are very good, to test your problem solving abilities, and perhaps scale through some interviews (99%) of the time.

But upon resumption, guess what, it's a different ballgame altogether, and all your BFS and DFS algorithm will go to sh.t
when you face the first issue for which you are to create a pull request.

Cheers.
Programming / Re: Child Threads Handled In Node.js by makavele: 10:53am On Jan 31, 2020
@rohanjoshi0894

Stop pasting google answers.
Show that you really know nothing about the subject in question.


https://www.google.com/search?q=Node.js%2C+in+its+essence%2C+is+a+single+thread+process.+It+does+not+expose+child+threads+and+thread+management+methods+to+the+developer.+Technically%2C+Node.js+does+spawn+child+threads+for+certain+tasks+such+as+asynchronous+I%2FO%2C+but+these+run+behind+the+scenes+and+do+not+execute+any+application+JavaScript+code%2C+nor+block+the+main+event+loop.&oq=Node.js%2C+in+its+essence%2C+is+a+single+thread+process.+It+does+not+expose+child+threads+and+thread+management+methods+to+the+developer.+Technically%2C+Node.js+does+spawn+child+threads+for+certain+tasks+such+as+asynchronous+I%2FO%2C+but+these+run+behind+the+scenes+and+do+not+execute+any+application+JavaScript+code%2C+nor+block+the+main+event+loop.&aqs=chrome..69i57&sourceid=chrome&ie=UTF-8
Programming / Re: Issues With JS For Loops. Can Anyone Help Me Out? by makavele: 9:42am On Jan 31, 2020
crownedrookie:

Arrgghh. I don't really understand generators yet

One day @ a time .

Solved it yet? Else, bundle the code in a zip file and send me the link.
Programming / Re: Issues With JS For Loops. Can Anyone Help Me Out? by makavele: 10:40pm On Jan 30, 2020
Please use a generator function which gives you the ultimate power
to enter, grab items, pause, exit, re-enter, re-grab, re-pause, re-exit, etc . . .
a loop or function expression at will.

Your next element on your UI will just call next() and that loop
will behave like a loyal slave on steroids.
Programming / Re: Child Threads Handled In Node.js by makavele: 10:32pm On Jan 30, 2020
^ Whatsapp ke??

I sent you a PM . . check your Nairaland associated email . .
Programming / Re: Child Threads Handled In Node.js by makavele: 6:49pm On Jan 30, 2020
crownedrookie:

What kind of work are you into currently if I may ask bro

Software Engineering :: Technical Lead
Programming / Re: Child Threads Handled In Node.js by makavele: 3:20pm On Jan 30, 2020
crownedrookie:

I will love to take you up on this offer in a couple of months

You're welcome in advance

1 Like

Programming / Re: Child Threads Handled In Node.js by makavele: 8:39pm On Jan 29, 2020
peterincredible:
pls i dont get your question child thread asin how pls put code so we can understand or explain further with some code am willing to help but i just dont get ure question

^ The question albeit a very advanced part of javascript, is pretty clear and straightforward.

Nodejs doesn't allow the users interfere and mess with the running of child threads. By default, it is a single-thread non-blocking runtime, as we all know.
However, if there is a need to perform any asynchronous I/O task, then Node.js can spawn child-threads.
You can invoke this though, using the 'child-process' module that comes with Node.

I did something like this a while back:

const oldSpawn = childProcess.exec;
childProcess.exec = () => {
Logger.info('spawn called');
Logger.info(arguments);
return oldSpawn.apply(this, arguments);
};


It relies heavily on the child_process.spawn() command and take note, this doesn't block the event loop in any way.
If you wanted to run shell commands in between Node js operations, then you can spawn a child process and use the exec command. I see people do this a lot:

import { execSync } from 'child_process';
execSync .. blah blah blah

Take note, that execSync will block the event loop. Although, it is very good for automating shell scripts.

You could also fork a child, (child_process.fork()), which will create a communication channel between them both i.e parent and child.

=======

I hope I have been of service to you. Cheers.

p.s.: contact me and I can schedule a mock interview for you.
Programming / Re: Issue Which Nodejs And Npm After Installation by makavele: 4:46pm On Jan 26, 2020
npm commands are mapped to something already crafted in your package.json . . .

it cannot find the package.json file to see what npm restart is mapped to.

in other words, you don't have a node project sef to being with . . .

so what are you restarting?
Programming / Re: Nigerian Developers How Did You Master Algorithm And Problem Solving by makavele: 4:30pm On Jan 13, 2020
Guest911:
I've been invited for several interviews the blocker has always been algorithms. How did you guys overcome this? Practical guide preferred

99% of the time they dont' even wanna see you pass the algorithm test except it's a fairly easy and popular one . . like the stock one above, it's all over internet, matter of fact, all of them are . . . so they know you can cram and bulldoze your way through . .

What they want to see if your approach towards it . . did you bulldoze you way through and dropped an algo that runs in 0(n!) time?
or you refined your approach and ended with an O(1) algo . . . or you dropped both solutions and explained why the latter is better than the former?
etc

I'll pick solution #3, then #2 ... while #1 would be leaving the interview desk in any minute
Programming / Re: Web Development: How Much Will It Cost To Learn? by makavele: 3:23pm On Jan 13, 2020
@Maskyy

You are combining 2 looping operations ( take one item in Z and loop over Obj 3 times) into one which puts your time complexity at O(n2).

array z has 3 items . . O(32) = O(9) . .

therefore, your algorithm will run 9 times, come rain come shine . .

if you replace the else condition with continue; you only get 2 print outs . . for Ben and Julie . . which will make you believe it ran twice . .

Nope, it still ran 9 times . .
Programming / Re: How Does Banking Software Works? by makavele: 6:03pm On Jan 03, 2020
stanliwise:
...

If I may ask do you have a github account? or any code repo online

Sure thing, send a PM
Programming / Re: How Does Banking Software Works? by makavele: 5:23pm On Jan 03, 2020
stanliwise:
if you understand multi-threading, then you should understand thread resource allocations. except you don't know multi-threading. Your windows file explorer or internal file operations uses the lock and key mechanism. Haven't you noticed you can't delete/move a file that you're copying?
This happens because a lock has been placed on it.
But you can play a video you're copying, that is because a read key can be given to multiple threads at a time

For the hell of it, we even use multithreading in Node js .. except it's a bit fancier over here, but still the same concept; so yes i know and i know it well and have written apps to take advantage of it abeit Node running in a single thread out of that factory. . . Still hammering on your lock and key model, which I repeat, at least, in the Nigerian banking sector does not work . . .I should perhaps blame in on how the apps were engineered, then . . . Then i pasted a screenie, and you said i switched to "sync' or what have you . . and till this moment, synchronisation hasn't still completed on that screenshot, it's almost 4 months old . . .
Let's talk about something else, sire !
Programming / Re: How Does Banking Software Works? by makavele: 5:07pm On Jan 03, 2020
stanliwise:
Have you ever coded in Java or kotlin. before? if not don't bother, we ain't discussing further. because if you have you should have known about multi-threading and how it operates in your Android app everyday using locks and keys.

you arr only caught up in your Node/Js world, you think JS New mechanism hype is the best right?.... But I say it is just technology like others and has it relevance where it is needed and nothing more.

I have never argued the superiority of one language over another and will never do . . .
i leave that to newbies to kill themselves over
But come to think of it; all bank apps are written in Java or C ( and its descendants) these days? Hmmmmn !!!
Java no; kotlin no; C yes and i know how multithreading works, amigo
Programming / Re: How Does Banking Software Works? by makavele: 4:47pm On Jan 03, 2020
stanliwise:
...How many banking softwares have you ever created.

Solo = 1 [ not a full-blown bank app of course, but one for a facet of the banking industry ]

Participated in = cannot count

Neither did you answer my question . . if the lock and key were in effect, definitely that screenshot would never exist today . . .
so your lock and key proposition is so 1865; only used by those who resist change; and at best; still doesn't work . . .

Anyways, we'll discuss this at length some other times . .

Happy 2020
Programming / Re: How Does Banking Software Works? by makavele: 1:45pm On Jan 03, 2020
stanliwise:
[s][/s]
The straw man fallacy.

And the image above? undecided undecided
Programming / Re: How Does Banking Software Works? by makavele: 1:34pm On Jan 03, 2020
stanliwise:
...

[s]Data integrity is needed in bank transactions, so as not to corrupt data e.g if two banks make a request simultaneously to you account and lets say you account is N5M and first bank wants to pay N2M and gtbank wants to pay 4M. now if you don't use synchronization techniques, if FirstBank transactions finishes you get 7M, and if Gtbank run same time as first bank and credit your account you get 9M but at the end of the day you should have 11M. This is what happens with data corruption. Many times write request are queue but not read request.[/s]

In summary, that is why Ledger Balances were introduced !!!
Programming / Re: How Does Banking Software Works? by makavele: 1:30pm On Jan 03, 2020
So much for data integrity . . . Explain it using the lock and key model
How did a debit more than the account balance happen and succeed . . .

Programming / Re: How Does Banking Software Works? by makavele: 12:34pm On Jan 03, 2020
stanliwise:
You can't be serious I guess, a basic cpu can compute about 1840 massive mathematical calculations before you blink your eye, if I then make it core I5, before you think of sending a nerve charge into your brain, it would have completed 5 transactions. So please tell me something else.

LOL, Okay I'll tell you something else . . Bank transactions are mostly asynchronous calls . . . Telling a cpu to list a Fibonacci sequence up to 1 billion which it would probably do in seconds, is waaaay different from asking it to fetch the account details of a user in so so and so bank.

One returns a promise, one does not . . The cpu knows when one will be done, in the other case it has no idea at all. I don't wanan go back to the fundamentals of programming.

So I will probably blink 30 times and more for a simple fund transfer to complete . . When you try to use your debit card at the ATM, does the transaction happen under the blink of an eye after you've selected the amount to withdraw. It say's. . . " Processing,,, please wait". At that moment, it's making an asynchronous call and even the ATM doesnt know if it will succeed or not; or when it will complete.

Going by the logic of lock and key, at that moment when the machine is asking you to please wait, which of course, we all know can take up to 30 seconds to 1 minute on a bad day, it means, you cannot make any other transaction on your bank account . . which the node js guys happily refer to as blocking the event loop ... a bye-product of quack engineering

Even if the transaction will occur in 1ms (a thousandth of a second), it should not wait for one to finish before another is fired (which your lock and key appraises). . . It should rather, send each process to a different queue. Have you ever wondered why bank accounts have[b] "ledger balances" [/b]. . whic[b][/b]h at odd times, don't even correlate to the transactions that happened on your account? or your main balance?

since your average cpu can do 1840 computations per milliseconds . . then why do we need ledger balances? afterall all transactions will be instantly credited and debited before i blink, according to your logic.?

I could talk about this all day !!!
Programming / Re: How Does Banking Software Works? by makavele: 7:40pm On Jan 02, 2020
dandylass:
OK thanks, in that case they use dedicated server and not shared server? Also what do you mean by lock and key?

Dedicated servers of course
both on premise and in the cloud
Programming / Re: How Does Banking Software Works? by makavele: 7:39pm On Jan 02, 2020
stanliwise:
locks and key is a simple technic. for example if I have a box and I don't want people accessng it simultaneously, so that I can maintain data integrity. I just lock it with a key, if anyone want to use the box, he must ask for the key, and until he is done, no one else can use the box except him. if he decides to stay with the key for 2years, no one else can use the box.
it is a simple method to bring about synchronizations to resources accessed simultaneously. since only just one key exist

what u mean is that if i am making a transfer online, then i must wait for completion b4 i can use a debit card or use ussd?

which is false. bank relies on acidity of transaction plus making sure no transaction is marked as completed until it returns a success or failure response.

1 Like

TV/Movies / Re: Aside From Money Heist, Which Series Movie Is The Best? by makavele: 10:39pm On Dec 27, 2019
Papadoh:
People are funny sha, we're talking about Money Heist and people are bringing trash like Designated Survivor, Queen Of The South, 12 Monkeys into the conversation. You better do yourself a solid and go watch Money Heist ASAP.

Breaking Bad 1 - 5 murders Money Heist by all ramifications

4 Likes

Romance / Re: Curvy Lady Mobbed At Ghana Airport (Pictures, Video) by makavele: 6:22pm On Dec 27, 2019
TissuePaper:
Na shit shit full inside undecided

You prolly skipped Biology class; huh?

1 Like

Programming / Re: Please Who Can Help Me Submit My App To Google Play Store by makavele: 1:30pm On Dec 26, 2019
send a PM . .

question though . . why should anybody use this app over the millions in the playstore? why do you think yours is unique?
Programming / Re: A Nairaland Design Upgrade Concept by makavele: 1:29am On Dec 20, 2019
0luwatope:
People would say i'm hating but this isn't it... This is like twin brother of nairaland... Not good enough, do better next time

True that . . the original Nairaland is waaay better . . .
But he tried though there is still room for improvement . . .
Programming / Re: Please Help , After Installing Nodejs, Npm Fore My React Native Setup by makavele: 11:31pm On Dec 19, 2019
Lesson #1: never run npm install or any other npm commands using sudo . . big security issue . . .

Programming / Re: Continuous Deployment On Godaddy, Ionos Etc by makavele: 6:50pm On Dec 17, 2019
Yes
Sports / Re: DSTV Not Broadcasting Anthony Joshua Vs Andy Ruiz Rematch by makavele: 3:08pm On Dec 06, 2019
so ?

1 Like 1 Share

Phones / Re: Summary Of The First MTN 5G Network Trial In Abuja, Nigeria by makavele: 12:20pm On Dec 02, 2019
dustmalik:

Which network is this?

dedicated main one line
Phones / Re: Summary Of The First MTN 5G Network Trial In Abuja, Nigeria by makavele: 12:15pm On Dec 01, 2019
LeoThaGreat:

I'm looking forward to experiencing the same...or something better. But I'll be a doubting Thomas till then

experience this; 270Mbps

1 Like

Programming / Re: My Future Is At Stake! Expert Advice Needed by makavele: 5:08pm On Nov 30, 2019
MountainView:


This guy just answered your question

As in , he took his time and over-answered it . . .

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 79 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 52
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.