This week's learning focuses on JavaScript lessons, coding challenges, and understanding more of the syntactical differences between Python and JavaScript.
One difference is the location where both can be run from. JavaScript can be run in web browsers and runtime environments like Node.js, while Python can be run in desktop applications, web servers, Integrated Development Environment software, and web frameworks like Django.
The DOM: Document Object Model allows JavaScript code to interact with the structure and content of a web page. It gets loaded when a web page is loaded and represents all elements on the page.
JavaScript has a spread operator. An example is return Math.max(...numbers);. The "spread" operator (...) expands an array into its elements. In this case, it is being used to take the variety of numbers passed in and develop it into individual arguments for the Math.max function, which allows it to find the maximum number among the array elements.
Another method I learned and used when solving coding challenges this week was the hasOwnProperty method. This is a method belonging to the Object prototype. It allows you to check if an object has a property defined on itself (not on its prototype chain). It returns a boolean indicating whether the object has the specified property.
Both Python and JavaScript have functions. You have now seen how to write them! Python defines a function using the "def" keyword, and JavaScript uses the "function" keyword.
Throughout this course, we have used analogies and explanations to describe what a function is, including:
Nearly everything in Python is an object:
What can you do with objects?
Lexical scope describes how nested (or "child") functions have access to variables defined in parent scopes.
This is the idea behind anonymous functions, which do not need a name because you will never directly reference them by their given name.
JavaScript is a language that lets you do multiple things at once without stopping other parts of the program. This is called asynchronous programming, and it is excellent when you are waiting for information from a server because you do not have to stop everything else you are doing. Instead, you use tools like callbacks, promises, and async/await functions to keep the program running smoothly while you wait for the information. This makes your program faster and more pleasant to use.
In JavaScript, a Promise is an object representing an asynchronous operation's eventual completion or failure. It allows you to write asynchronous code that looks more like synchronous code, avoiding the need for deep levels of nesting and callback functions.
A Promise has three states:
Async needs to be in front of await for the code to work.
The JSON method returns a promise.
Value Objects don't have an identity; you can only refer to them by their properties. If I remember correctly, we have the names and abbreviations for states.
JSON Web Tokens (JWTs) are digital signatures used to represent information between two parties securely. This information can be used to identify a user or to grant them access to specific resources. JWTs are encoded in a way that is compact and safe to transfer over the internet and is signed using an industry-standard process.
Cookies are small pieces of data that websites save on a user's computer. This data stores information about a user's activities on a website, such as login sessions and user preferences. Engineers use this data to make the user experience better. Advertisers can also use cookies to track user behavior and show ads tailored to their interests.
Cross-site scripting, or XSS, is a type of security vulnerability in web applications that allows attackers to inject malicious code into web pages viewed by other users. When this code is executed, it can give the attacker access to sensitive information, such as session cookies. XSS attacks occur when an attacker sends malicious code, usually in the form of a script, to the end user's browser, which the browser then runs without knowing it should not be trusted.
Cross-Site Request Forgery (CSRF) is an attack that tricks an authenticated user into doing something they didn't intend on a web application. This could be something like transferring money from their account or deleting files, and it works by exploiting a website's trust in the user.
The React frontend framework is built on JavaScript and uses the concept of components. Components are blocks of code that allow developers to split up the application into independent and reusable pieces. The components hold all data and functions necessary to render the UI and define what should be generated. Each component is then rendered into the DOM (Document Object Model), and any changes to the component trigger a re-render in the DOM. The React framework then keeps track of any changes made and updates the DOM accordingly to ensure a seamless user experience. React supports data flow through unidirectional data binding, allowing developers to debug and test their code efficiently.
Keys help React identify which items have changed, added, or removed. Keys should be given to the elements inside the array to provide the elements a stable identity: const numbers = [1, 2, 3, 4, 5]; const listItems = numbers.
Before incorporating React functionality into our Fearless Frontend project, we learned the React basics from the React documentation and the React tutorial for making a tic tac toe game.
This week I also completed the Linked Learning Course What Generative AI? by Pinar Seyhan Demirdag. My takeaways from this and where I view Artificial Intelligent with Generative AI are as follows.
Generative AI has been garnering attention as an advancing technology in digital transformation. Its significance is rising as it empowers machines to fabricate virtual objects or images with seemingly authentic characteristics. This article delves into Generative AI's potential and implementation across various industry sectors.
Remarkable strides have been made in Generative AI technology recently, with predictions estimating its impact on businesses to reach a staggering $3.9 trillion by 2022. Notable instances of Generative AI applications encompass commercial image generation services like Midjourney, DALL-E, and Stable Diffusion that excel at rendering virtual images with incredible realism.
The scope of Generative AI is limitless, offering utility across diverse industries such as film production, fashion, urban planning, engineering, and architecture. Its vast potential encompasses enhancing traffic patterns, forecasting material, and product outcomes, and devising novel products.
While Generative AI holds promise for revolutionizing an array of industries, it is imperative to acknowledge the pivotal role humans perform in its conception and utilization. Human experts manage the development and supervision of AI algorithms to ascertain the proper production of desired results. Consequently, it is vital to appreciate the importance of human involvement in AI development rather than attributing creations solely to artificial intelligence.
As Generative AI progresses, we must remain at the forefront and brace ourselves for upcoming advancements. The rapid growth and breakthroughs in AI technology assure a continual stream of new developments. Thus, engaging with these evolutions and preparing accordingly ensures we are primed for future challenges.
In summation, Generative AI can transform our lives and professional environments. Its applications are far-reaching and increasingly vital across an assortment of industries. However, it remains essential to appreciate the fundamental role of humans.
To summarize, this week was another great week of more profound insights from learning the technologies of Python, Javascript, React, and Docker. A positive for being enrolled in the Hack Reactor boot camp is the consistent daily work to improve your skills as a programmer and also understanding how to read code to incorporate new technological tools propelling society forward with efficiency.
Last, I had an informational interview with Joyce Ma, who has worked as a Software Engineer at Twilio for over three years. She is a former Hack Reactor alumni who finished the program back in 2019, and I'm very grateful for her providing 90 mins of her time to have a video call with me and discuss topics of what a healthy and empowering work environment looks like to ensure positive feedback that leads to growth and professional advancement. I enjoyed learning about what aspects of Javascript she worked with to improve the API usage with Twilio clients. I consider her a precious source to understand and get more familiar with the industry as a Software Engineer. I highly recommend her as a knowledgeable source for Software Engineer and respect her for her explanations and personalization regarding teamwork and collaboration.
Hack Reactor/Galvanize is on a company the comprehensive week of spring break the following week, and we will be starting week ten on April 17th. I'm looking forward to this spring break week by making more time for meditations, sleeping in an extra hour, taking advantage of more family outings, and spending time reflecting on everything I have learned up until this point in the course and also spending my time this week sharpening my skills with React.
The volcano Nevado del Ruiz still has yet to erupt and is being monitored closely and is expected to explode potentially within the next couple of weeks. This coming Saturday, my family and I have been invited to a barbecue of friends we recently met who live just north of Santa Rosa de Cabal and are from Alaska. I look forward to providing video footage of this meetup and documenting another area around the Santa Rosa de Cabal. Ciao for now!
I'd be happy to discuss your project and how we can work together to create unique, fun and engaging content.
Go ahead and click here to be taken to my business service page and see what I can do for you. Book a call with me now. Looking forward to chatting soon!