![Red Black Tech](/img/default-banner.jpg)
- 60
- 133 738
Red Black Tech
Registrace 12. 10. 2021
This channel is a place for me, a Software Engineer of Observability at Disney+, to capture my computer science ideas into consumable videos. I cover lots of topics, from technical analyses of video games to algorithms that you'd see on LeetCode.
What is an API?
What is an API?
In software, the API is a widely used acronym. I'm convinced many people don't exactly know what they mean when they say API, and that they have this vague hand wavy idea when they speak about APIs. Take a look at the Lex Fridman LinkedIn post where he basically says everything in the world is an API... (pls notice me Lex 🥹).
First off: the definition. In computer science: "interface" literally means a set of functions or capabilities. Therefore an API is simply a set of functions meant to be used in an application, which is a computer program.
Next up: where are these functions defined, in what language are they defined, yada yada yada. These functions can be defined ANYWHERE and in ANY LANGUAGE. They can be in a remote virtual machine served by an HTTP Server / HTTP API, they can be in your computer under a specific directory that Python looks at when it imports code, and they can literally be spread across pieces of paper in the form of punch card programs.
Again, an API is simply a set of functions, so the possibilities of where these functions exist are endless, so long as they're accessible by a computer program.
Why are API's useful? For one, they define a set of capabilities of a system. For example, if I make an e-commerce app, then I will make an API that defines actions that can be taken in the app, such as "add to cart", "buy now", "list for sale", etc. The capabilities are probably doing a lot of work behind the scene, but to the user of such a system, all they need to know is my system's interface. This also enables interchangeable code. If I decide to replace my system's code from Python to C++ or to Javascript, then I can, without the user noticing at all - all they need to know is the input and the output to my interface functions.
#tech
#faang
#career
In software, the API is a widely used acronym. I'm convinced many people don't exactly know what they mean when they say API, and that they have this vague hand wavy idea when they speak about APIs. Take a look at the Lex Fridman LinkedIn post where he basically says everything in the world is an API... (pls notice me Lex 🥹).
First off: the definition. In computer science: "interface" literally means a set of functions or capabilities. Therefore an API is simply a set of functions meant to be used in an application, which is a computer program.
Next up: where are these functions defined, in what language are they defined, yada yada yada. These functions can be defined ANYWHERE and in ANY LANGUAGE. They can be in a remote virtual machine served by an HTTP Server / HTTP API, they can be in your computer under a specific directory that Python looks at when it imports code, and they can literally be spread across pieces of paper in the form of punch card programs.
Again, an API is simply a set of functions, so the possibilities of where these functions exist are endless, so long as they're accessible by a computer program.
Why are API's useful? For one, they define a set of capabilities of a system. For example, if I make an e-commerce app, then I will make an API that defines actions that can be taken in the app, such as "add to cart", "buy now", "list for sale", etc. The capabilities are probably doing a lot of work behind the scene, but to the user of such a system, all they need to know is my system's interface. This also enables interchangeable code. If I decide to replace my system's code from Python to C++ or to Javascript, then I can, without the user noticing at all - all they need to know is the input and the output to my interface functions.
#tech
#faang
#career
zhlédnutí: 457
Video
Alternate Pokémon Starter Types (& Graph Theory)
zhlédnutí 651Před rokem
Alternate Pokémon Starter Types (& Graph Theory)
System Design Interview Prep: Queue vs PubSub
zhlédnutí 2,2KPřed rokem
System Design Interview Prep: Queue vs PubSub
Leetcode 426 | Binary Search Tree to Doubly Linked List
zhlédnutí 151Před 2 lety
Leetcode 426 | Binary Search Tree to Doubly Linked List
I would really love the book 🥺
Exceptionally well explained; thank you!
this came in clutch for my lab due tn
Just subscribed the channel...
thanks
you're welcome
great advice, i needed this
im glad 🫡
You HAVE to know what your doing when using gpt, or else how will you know when it gives you right info from wrong info. Once you can tell what is right or wrong in your subject matter. It's an incredible tool for learning. Even if you have to repeat your question 3-5 times. Do not ask for answers. Ask your questions on how to get your answers. Ask it to explain it to you. Not give you the answer because many times it won't and will you know when its right from wrong. Ask ur questions and its a god send sometimes.
that's spot on! id add that you can test whether or not you used it well by asking yourself whether or not you understand the solution it gave you
@@redblacktech 100%. It's imperative when you know its right vs wrong. Or else your in trouble/in for a ride.
MongoDB has it's own language model to assist you in creating queries and exploring and it's very good! You can use it with Compass.
I wouldn't trust simple scripts too much on GPT. Theres been times where i tried that and each time i had to re-correct GPT a few times. I like its use 1. for documentation as it can summarise api's which is great, but at the same time software development evolves a lot - and GPT will be summarising previous versions. I like it for filling out dummy data for tests, when i have to write unit tests but i'm not too imaginative i can give it some typescript interfaces/types and ask for a few mocks of some objects that i can then use in my jest tests
in terms of writing scripts, in my experience it works well for very simple ones like "parse a csv for the second column", or "test a tcp connection on port 9092" etc. using it for tests sounds like a great idea, but to be honest I haven't done that yet. i'll try it out.
When using APIs, definitely use Microsoft Copilot because it has the same power but is always up to date
The thing about chatgpt is it will often make up npm/pip packages, try to use packages that were deprecated 7 years ago, or even make up new functions/api calls for existing packages
yea fair point, same thing happened to me a few days ago at work. i tried correcting it, but im not sure how effective my attempt was
The algorithm to solve the Rubik's cube on your pfp is R U' R'
@julienfowler8274 👏
Nah I am good with Google 😅
understandable. i plan to use both, mostly google though
I’m so blessed, my data engineering friend sent me 14 O’Reilly data science books and this was one of them
14!?! *spits out cereal 😦*
My anxiety when I was seeing you draw the chat gpt symbol📈📈📈 (It looked like a symbol from WW2)
bro that wouldve been so out of place on my channel 😭
Now Big O. Its showtime!
Unfortunately, the giveaway has ended, but stay tuned for more (I'm currently reading "Design Patterns" by the "Gang of Four" 😉)
Understanding database is the best skills to ever have
wow
I would love the book :D
Im learning how to code, and whenever i use ai i feel like its cheating 😅
i suggest tutorial videos when first learning, and eventually changing to reading docs and textbooks. reading becomes elite when you get comfortable
@@redblacktech I just use it to catch those stupid errors I make 😔
@@invalidlol something like "stupid errors" do not exist! every error you make can turn into a learning experience which will bring you a long way overall ;)
@@redblacktech I don't think it's cheating. It's really useful when you have to write long code. I work in an IT company. My boss asked me to check the vulnerabilities of our company's server, exploit them, and write a pentest report. If not for anything else, it greatly improves your work speed. I had to write a simple XSS script for stealing a cookie session with JavaScript. Otherwise, I had to look online or write tons of jibberish code without sufficient results. I don't think it's cheating!
@CthRage8946 I see what you're saying, and now I agree - I don't think it's ALWAYS cheating anymore. It's very useful for increasing working speed I've noticed. I have a lot to say about this - I should make a video about it 😉
Good initiative
React is actually a library
can you explain what makes you say that? i'm curious because someone else has said the same thing, but that seems incorrect. theres inversion of control going on in react - another giant piece of code is running the code you provide.
Thank you for introducing this book!. :) Cheers!
I recently moved into a new role, at work, and topics like these are frequently discussed. I think I’ll be giving this a read even if I don’t win the giveaway.
i highly recommend it. i've worked with big data for a while now, and i don't know how i got away with some things that i didn't know until i read this book. in my experience, this book represents a clear improvement in my career.
Great going sir , this book is very much needed
The shorts are taking off. Keep up the good work 🎉
Thank you for your support! 🚀
This cool
Understanding Distributed Systems by Roberto Vitillo is also a great beginner-friendly book on distributed systems
Congratulations 🎉 You've been selected for the sweepstakes of the Martin Kleppmann book! Though there is one more detail I need to confirm before I consider the book yours. Contact me by visiting my channel page and reaching out through one of the many associated social media links.
Thanks @@redblacktech, I received the book in the mail today and started on it!
🎉
Good content 🔥
thanks 🙌
can we do it via checking the right and left of wall, to the near hugest wall, and determine that the supporting and the nearest wall will contain water to the value of nearest wall level. Only if sup wall is greater than nearest wall?
Okay it took me few attempts to view it and understand
nice! anyway to answer your previous question: yes but that may lead to an inefficient answer. imagine the case where the input is 2 walls, one at the beginning and one at the end, and nothing else. let me know if i misunderstood the question
First sweep for avg fill? 2nd swipe of weird fill, i dont get it?! Like we never took minimum fill a wall can have based on the amount and duration of rain on the walls And we didnt take the maximum case as well, where one space from higher walls might spill over to the sides? Could you explain this, i didnt understand
"And we didnt take the maximum case as well, where one space from higher walls might spill over to the sides?" actually, this is exactly the idea. we're sweeping so that we can find all walls that are high and may spill over to the sides. then we repeat in the other direction to calculate how much will NOT be spilled pretty much. there's no averaging going on
happened to me a lot of times, but i didnt acknowledge it as a issue, thanks for giving me another view 😂, how noob of me
Fuck shit and here my manager convinced me that im a dev ops engineer while i was just done with the code dev, and he wants me to integrate test and deploy once all is done
yea often times in the industry the line between roles is very blurry. i dont know your exact situation, but that experience to do the testing may be nice to have anyway
Best explanation of the solution! I only had to watch to 4:42 to see the solution and took me 2 minutes to write the code from there! Thanks for the awesome content!
I'm glad to hear the video had a clear impact!
For newbies in programming, Framework is for Scripting language - which is usually used for Web Developing, not Kernel, Game Developing.
agreed. framework is indeed commonly used in the context of web dev like you say, and through this video I'm hoping to break that unnecessary coupling of ideas.
Saludos desde Mexico, Gracias por el estilo simple y sencillo.
Gracias amigo🔥
That scared me
welp, that went wrong 😂
And that’s why I’m not a web dev 😂
ah man hopefully that didn't discourage you
I always figured it was based on the standard abbreviation for “Signals Intelligence”, which is also SIGINT
Ya know you're not the first person to mention that and you may be right. Cheers to the internet teaching people cool facts!
It's even explained by Sigint in the game as such. Probably the first thing people would think about to in a game with its backdrop being the cold war
@carlfoulkes26 dude i vaguely remembered it being related to computers (i shoulda confirmed). in any case hope people learned somethin
bro did not upload the omega video
oh yea - i'll do it soon thanks i forgot
🌈 'promo sm'
Starblood
Starbytes
Are there any good resources that provides a list of free http apis that could be used for python projects?
Few things: 1. there's no single collection of all APIs, but this is a good start: rapidapi.com/hub 2. these http APIs are not limited to only python, as http is independent of any specific language
#5 is only true on python’s implementation of async await, because it is task based. In JavaScript a function runs as the promise is created, you are only waiting for it to end.
Question: in the case you run JS on a single thread, would a promise run asynchronously? In python it would, but I wasn't able to test it in javascript.
Why does this have so less views? Good and crisp explanation. Exactly what I was looking for! Thanks!
thank you so much, thats what i love to hear! how about ya help spread it and share to friends 😁👍
This is amazing, thank you!
thank you for the feedback!
❤