Grow your coding skills one day at a time with weekly live streams and videos about programming, including tutorials, Q&A sessions, algorithmic problem-solving, full application builds, and more.
If I'm not mistaken, vue magic lies in <script setup>. And if you don't like that magic, you can just create plain script and define everything there. You just have to return object with setup function inside. Or a bunch of fields if you prefer vue2 style.
Wow! Only 21 comments in 12 months. Okay, so I wanted to watch this video just for fun, but I don't know JS well. I do code in other languages, and one of the things that I always try to do is keep my code readable. By that I mean: if ANYONE were to sit there & read my code, no matter what their skill level, then they should be able to follow along. The reason I am commenting here is that I was easily able to follow this beginners' JS example, UNTIL we got to the Array.with part ... looking at that code just baffles me, and although I think I understand it, why American2050 would we want or need to complicate things by doing it this way? Also, if the function STARTS with return, then why is there ANOTHER return at the END of the function?
The last solution is a more functional approach. The callback function gets called for every value up to n. The return value of the function will be the resulting value at that index in the new array. The function passed to Array.from is essentially a map function. You can read more about it here: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#mapfn It is very similar to array map: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
Great video - appreciate you sharing this with us! Question - what value in the websocket response are you using to derive which Emoji to use (ie - how can you tell if last change was higher/lower vs. previous price)? Thanks in advance!
On each socket update I compare the current price with the previous price to get the direction. github.com/CodingGarden/stonk-ticker/blob/master/src/App.js#L50
Great video! Laravel’s out-of-the-box functionality is indeed impressive. You should definitely try out Livewire! With Livewire, you can achieve real-time page updates using AJAX behind the scenes without writing any JavaScript-just PHP with minimal code. For example, you can create new chirps and display them without a page reload, or use wire:navigate to get a SPA-like experience where the page doesn’t reload when you visit the edit page. It’s super easy to use and feels like magic! Plus, since Laravel has officially adopted Livewire, they work together seamlessly. One tip for improvement: Using an event with a listener for this scenario adds unnecessary complexity for handling model-specific logic. Observers are preferred as they encapsulate the logic directly related to the model’s lifecycle, making the code more readable and maintainable. Given that you’re only observing a single event, it’s even more efficient to override the created method within the model itself. This keeps the logic concise and directly tied to the model’s behavior.
00:05 Creating a URL shortener using Node.js and Express 02:27 Setting up middlewares and basic routes in Express app 08:06 Building a URL Shortener using Node.js + Express + MongoDB + Heroku 11:25 Deploying the URL Shortener through Versal 17:42 Configuring SSL and DNS settings for deploying a URL shortener on Heroku 20:26 Creating schema for short URLs with Yup in Node.js 25:53 Error handling and URL creation with Node.js + Express 29:03 Setting up MongoDB database connection for URL shortener 34:33 Implementing a unique index for ensuring URL uniqueness 37:25 Generate a nano ID instead of relying on database integrity. 43:36 Setting up front end for creating links with view J S 46:31 Creating and deploying a URL shortener using Node.js + Express + MongoDB + Heroku 52:43 Successfully built and deployed a URL Shortener with Node.js, Express, MongoDB, and Heroku in 3133.7 seconds 55:42 Creating a redirect loop in a URL Shortener Crafted by Merlin AI.
It is in Colorado USA called Red Feather Lakes / Dowdy Lake Campground. www.fs.usda.gov/recarea/arp/recreation/camping-cabins/recarea/?recid=36653&actid=29
One thing I’ll add. Coming from a self taught background. If you’re fairly new to programming, pick a couple of tools, JS/Python, Svelte/Django, Polars/Pandas, Postgres/MySQL/DuckDb/Sqlite and REALLY read as much of the docs as possible. Go start to finish and only skim through the bits you have high familiarity with. Learning to learn is hard and it’s only made harder if you regularly skip over the things you don’t yet know.
Could one of you document proficient people make a tutorial on how to read the docs? I mean basic examples of how to navigate and test commands as a new user would.
Awesome video dude. I was really struggling on how to learn to code and I also think that the better way is going through the documentation and trial and error. There's no magic!
3:42 - You must mention here, that Migrations are actually not to create tables only. The purpose of Migrations is to make changes in your database using artisan utility. And you have ability to rollback those changes.
Great productivity software advice! Just wanted to mention Immersive Translate. It’s a free tool that’s essential for translating online productivity content.
I didn't know Laravel was so fringe for a lot of people. I use node mainly but I read the docs on Laravel to learn high level concepts when doing backend development. The only reason I don't actively use it is that I just plain never feel comfortable with PHP as a language - and it's a shame because the framework and the community is great
Glad I'm not the only one who is confused by the whole load/data fetching on route load paradigm. Feel like you need to have a PhD in order to understand how to use it correctly. Apart from that SolidJS is a great choice but I really don't like the whole load thing..