Going back to next is a term often used in computer programming to refer to the act of moving from the current iteration of a loop to the next iteration without completing the current iteration. This can be useful in situations where you want to skip over a certain set of instructions based on a certain condition, or when you want to break out of a loop early without executing all of the code in the loop.
In many programming languages, there is a keyword or command specifically for going back to next. For example, in languages like R and Fortran, the keyword "next" is used to skip to the next iteration of a loop. In languages like C and C++, the "continue" keyword is used for the same purpose.
To understand how to use the "next" or "continue" keyword effectively, let’s consider an example. Suppose we have a loop that iterates over a list of numbers and we want to skip over any negative numbers and only process positive numbers. We can achieve this by using the "next" or "continue" keyword.
Here’s an example in Python:
numbers = [1, -2, 3, -4, 5]
for num in numbers:
if num < 0:
continue
print(num)
In this example, we iterate over each number in the list "numbers". If the number is negative, we use the "continue" keyword to skip to the next iteration without executing the remaining code in the loop. This allows us to only print out positive numbers from the list.
It’s important to note that the "next" or "continue" keyword only affects the current iteration of the loop. It does not exit the loop entirely. If you want to exit the loop completely based on a certain condition, you can use the "break" keyword instead.
Here’s an example of using the "break" keyword:
numbers = [1, -2, 3, -4, 5]
for num in numbers:
if num < 0:
break
print(num)
In this example, we iterate over each number in the list "numbers". If the number is negative, we use the "break" keyword to exit the loop entirely. This means that once we encounter a negative number, the loop will stop and the remaining numbers will not be processed.
In conclusion, going back to next or using the "continue" and "break" keywords can be powerful tools in programming, allowing you to skip over certain iterations of a loop or exit a loop early based on specific conditions. Understanding how and when to use these keywords can help you write more efficient and clean code.
GO WATCH CODY'S VIDEO https://www.youtube.com/watch?v=mt1ZCai1G-I
time for the daily dose of L takes from my favorite soydev
The funny thing is that I very often disagree with something Theo says, but in this video I agree 100%
i think next.js is the best framework ever
Error handling in Go is still the GOAT!
trpc is the shit. T3 is the shit. t3 turbo is the elephant shit. Fucking love it.
Theo keeps saying 'modern webtools and technologies' strictly to refer to the gospel of react. Arguably HTMX is more modern. It is so modern it is still developing very fast.
Dude… 2 weeks and he is complaining about having skill issues. I guarantee you 2 weeks into any major framework journey you will still be feeling the sharp edges of any platform you switch to. Especially when you are a master at your old one with decades of experience
He even acknowledges his lack of skills.
I give him credit for the acknowledgement of the fact he is coming in as an 'Indy hacker'. I take most of it back because I am sure he is contributing to a lot of projects that are meant for wider use.
Developer velocity is as important a consideration as raw performance.
Astro > Next
So much easier to work with and manage. And if you need a fully featured application with different roles, permissions, interactivity, etc, then you still shouldn't be using next.
SSG/SSR The portions of the application that don't require a login. And devlop the bulk of the application as a SPA
I was a Next.js fan in the past. I liked it and was good at using it. Then I started using different languages than JS (C#, Kotlin, C, Go, Rust, …) and fell in love with Go. Now I can't use Next anymore because it makes no sense to me. Next feels less like a framework and more like a working web server that I can configure using JS code. It's challenging to describe that more precisely.
I don't have his problems with dev experience, using Air for dev and Docker for prod. I switched from Neovim to Goland which fixed all my language server issues.
I can see the rest of his pain points. The reason I like Go more than JS is that I hate the JS ecosystem enough that I would use anything to stop using JS, and Go is the thing I hate the least.
Didn’t watch the whole video, just sharing my two cents. I believe Golang is better than Node. However, I didn’t like Htmx either. I am used to SPA way of handling things.
Not I have used Htmx extensively, I’m just not enjoying it.
So, maybe, just maybe, React + Golang could be a better combo to take a journey in?
I liked this video a lot. Actually, I liked very few of Theo's videos. Still, I respect his work and use it to check my understanding of the less-known areas.
Here is my take on golang. The usage of golang for frontend development is not a good choice. If you abuse golang with frontend duties where HTML+CSS+JS has to be treated with care and respect. For tasks, where precise UI and UX behavior is demanded, XHTML or any templating package/technology/tool will fail to produce acceptable results.
Golang is best used for the backend and CLI. Where it shines. I love and use golang as my primary language, but please do not use it for the frontend. That is just silly.
If you want a smooth experience and a transition path from frontend to backend, you have to land on one language. That one language obviously is JS or TS, because there is only one language in the browser (wasm left out for the time being). To bridge the frontend with the backend you have the freedom to choose anything built on JS/TS. There is no other choice, at least for now. That is more related to IDE support of multiple languages and the ability to connect those into one smooth experience.
Most of those guys who buys the js hypes generally never developed a real web app. HTMX shows we do not need more js to achive most of web app`s functionality in internet.
Almost all the stuff he had to add to make HMR work is related to JavaScript, and that why people complain about. If you just want to start a project and add some good practices to it, you’ll need TypeScript, Eslint, Prettier, at least in the backend side. As of Go you’ll need to basically install the VSCode extension and Air for hot reloading, the tooling in Go is much better.
I went from JS to Go 2 years ago, the reason why you guys have problems with Go is because you are trying to bring your JS Experience to Go. Go is great for Cloud Services and CLIs, that being said, I wouldn't use it to built a UI unless I am fine with as shown in this video worse UX and longer development time. You are simply using a tool that was not designed for the use case, just like JS that was never designed for the Backend
Hold on, command click is not used by all programmers? What's wrong with you people???
That button loading issue is all the reason I need to avoid the HTMX/Go stack like the plague. The UX is a top priority for me and something like this would drive me insane.
Nothing he said about go is a legit issue. He is so deep into js he cant think beyond js ecosystem. I understand that cause i was there too.
Stop using Next and use true backend solutions (Laravel, Spring, Rails) and true front (Solid).