Data Science - Learn to code for beginners

with deeplizard.

Using code to interrogate textual data | I’m a STRING. Ask me anything! | Coding tutorial

April 30, 2018 by

Q&A

In PowerShell, the "endswith" function is specified using all lowercase letters while in Javascript, the "W" is capitalized for the "endsWith" function. What's up with this difference?

The answer here illustrates an important feature of programming languages in general. PowerShell is case insensitive which means either way will work, i.e. "w" or "W". The difference that we see is a result of how the code was typed out. Since PowerShell is case insensitive the code still works. Even though PowerShell is case insensitive, we usually still capitalize each word in a function to make the code more readable. JavaScript on the other hand is case sensitive. If the code is not typed out exactly, the code will not work, and we will see an error telling us that JavaScript doesn't know what we want to do. Being able to spot details like this is a critical skill in programming! Sometimes very subtle things like this can be the cause of issues or bugs within code.


Description

What’s going on everyone. In this video 🎥, we will use JavaScript and PowerShell to see how we can build and interrogate strings using code 💻. Textual data inside computer programs is represented using sequences of characters that we call strings. So far in this series, we seen how strings can be used to do things like, define a log message or define an id for an element on a web page. Now, we will see how we can interact with strings using code. With code, there are two powerful things we can do. 1) We can use code to build strings. 2) We can use code to interrogate strings. To do this, we will work in PowerShell and JavaScript side by side. Let's get to it. Notebook for this one: https://beta.observablehq.com/@deeplizard/using-code-to-interrogate-textual-data Follow deeplizard: YouTube: https://www.youtube.com/deeplizard Twitter: https://twitter.com/deeplizard Facebook: https://www.facebook.com/Deeplizard-145413762948316 Steemit: https://steemit.com/@deeplizard Instagram: https://www.instagram.com/deeplizard/ Support deeplizard on Patreon: https://www.patreon.com/deeplizard Checkout products deeplizard suggests on Amazon: https://www.amazon.com/shop/deeplizard Support deeplizard by browsing with Brave: https://brave.com/dee530 Support deeplizard with crypto: Bitcoin: 1AFgm3fLTiG5pNPgnfkKdsktgxLCMYpxCN Litecoin: LTZ2AUGpDmFm85y89PFFvVR5QmfX6Rfzg3 Ether: 0x9105cd0ecbc921ad19f6d5f9dd249735da8269ef Recommended books on AI: The Most Human Human: What Artificial Intelligence Teaches Us About Being Alive: http://amzn.to/2GtjKqu Life 3.0: Being Human in the Age of Artificial Intelligence https://amzn.to/2H5Iau4 String methods: PowerShell - https://msdn.microsoft.com/en-us/library/system.string_methods(v=vs.110).aspx JavaScript - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#Methods Playlists: Data Science - https://www.youtube.com/playlist?list=PLZbbT5o_s2xrth-Cqs_R9-us6IWk9x27z Machine Learning - https://www.youtube.com/playlist?list=PLZbbT5o_s2xq7LwI2y8_QtvuXZedL6tQU Keras - https://www.youtube.com/playlist?list=PLZbbT5o_s2xrwRnXk_yCPtnqqo4_u2YGL Music: Crypto by Kevin MacLeod East_of_Tunesia by Kevin MacLeod Investigations by Kevin MacLeod Ave Marimba by Kevin MacLeod YouTube: https://www.youtube.com/channel/UCSZXFhRIx6b0dFX3xS8L1yQ Website: http://incompetech.com/ Licensed under Creative Commons: By Attribution 3.0 License http://creativecommons.org/licenses/by/3.0/