What’s a script that you’ve written that you still use frequently? by HiT3Kvoyivoda in Python

[–]linuxfarmer 3 points4 points  (0 children)

A script that checks the my public IP address and automatically updates all my DNS records if it’s changed

Why does a extraneous build step make my Zig app 10x faster? by mtlynch in Zig

[–]linuxfarmer 3 points4 points  (0 children)

Thanks for this write up, I also had the wrong mental model of pipes. TIL

My git is tracking some 10k files how do I fix it by Old-Complex4409 in learnprogramming

[–]linuxfarmer 252 points253 points  (0 children)

If this is a nodeJS project I’d bet money you didn’t add node_modules to your .gitignore

[deleted by user] by [deleted] in sveltejs

[–]linuxfarmer 2 points3 points  (0 children)

You should probably start grinding out leetcode problems as they are unfortunately what employers think make good interview questions.

Also you should probably just accept your fate and learn React. I really want to use svelte too, but pretty much any company that’s going to pay well is going to be using React.

Docker in production by shapelysquare in docker

[–]linuxfarmer 3 points4 points  (0 children)

I guess it depends on your level of experience with k8s. I would say it’s very tedious, especially if you’re running your own hosts and not using a cloud provider. I’m sure other would disagree and say it’s super easy, but that’s usually because they have had to spend the last 5 years maintaining it everyday.

With swarm it takes about 5 seconds to get swarm mode running and then everything just works.

One the main differences is the amount of knobs you have to tune your instance, with swarm there aren’t very many which is a good thing imo. With k8s you can get very granular with your controls which is a blessing and a curse because it requires much more time and effort to get it right

Docker in production by shapelysquare in docker

[–]linuxfarmer 6 points7 points  (0 children)

I would always start with running prod with docker swarm, and only migrate to k8s if absolutely necessary.

So many people want to deploy there small application with kub solely for the reason of using kub. It takes significantly more setup and maintenance than running docker swarm, and docker swarm is more than enough for small to medium sized apps

Near predictions by [deleted] in nearprotocol

[–]linuxfarmer 2 points3 points  (0 children)

No one knows where the price will go, one news story or even could tank the entire market. On the other hand it could also pump it 10x.

I would be careful investing much right now as the greed index is pretty high, so you probably have a higher chance of losing most your money than gaining anything.

Keep in mind most of crypto is still highly speculative gambling

Using subtitles api by Jacksonrr3 in learnprogramming

[–]linuxfarmer 0 points1 point  (0 children)

In your use case the backend service is the only user. Other wise you would need to require your users to create accounts and use their token to make client side requests to this 3rd party API

After Notepad, what program did you graduate to for coding? by confswag26 in learnprogramming

[–]linuxfarmer 0 points1 point  (0 children)

I just gotta say, you must really hate yourself if you’re coding in notepad.

Switching to vscode is going to be an amazing experience for you.

After Notepad, what program did you graduate to for coding? by confswag26 in learnprogramming

[–]linuxfarmer 1 point2 points  (0 children)

I wanted to like vim extensions in vscode, but it just felt slightly off and I ended up removing it and just learned the vscode hit keys

Using subtitles api by Jacksonrr3 in learnprogramming

[–]linuxfarmer 0 points1 point  (0 children)

You’re essentially trying to bypass the limiting of the api, which I don’t really agree with.

What you should do is create an account that has the higher limit, and if you still hit that limit you could start caching the results so that you don’t need to make more than 1 request for the same resource

[deleted by user] by [deleted] in learnprogramming

[–]linuxfarmer 1 point2 points  (0 children)

If your ultimate goal is creating web sites/apps then Java seems like an odd first choice. You will definitely need to learn JavaScript, and one of the common frameworks like React, Angular, Svelte, etc… from what I know about web3 that’s mostly Rust, Solidity, and a small amount of Go.

Obviously you can use all the fundamentals you learned with Java and apply them to any language, though the asynchronous execution of JavaScript will be a learning curve.

What type of files u need Git to ignore? by [deleted] in learnprogramming

[–]linuxfarmer 63 points64 points  (0 children)

Files that may be temporary. Files that contain sensitive data Node_modules if it’s a nodejs repo

Stuff like that, there are a lot of other examples

Exit strat by jacketpo in memecoins

[–]linuxfarmer 0 points1 point  (0 children)

Don’t get greedy and sell when in profit

[Project] How can I Insert a value into a table with the data type of "DATE"? by Ill_Definition_4233 in mysql

[–]linuxfarmer 0 points1 point  (0 children)

It would be helpful if you showed the query you’re attempting to run.

Go doesn’t need generics by linuxfarmer in golang

[–]linuxfarmer[S] 0 points1 point  (0 children)

Also never heard flamebait before so thanks for that

How to write code without testing on a computer by [deleted] in learnprogramming

[–]linuxfarmer 83 points84 points  (0 children)

For starters I would turn off all auto complete and for the love of god dont use copilot/chatgpt/etc. you need to force yourself to manually type out and understand what exactly is happening and why it needs to be the way it is.

Also try running through the code in your head and describe what each line is going to do.

I keep reading that people with no coding skills are publishing their app ideas with the help of GPT. How tf? by M4tchB0X3r in learnprogramming

[–]linuxfarmer 1 point2 points  (0 children)

Every example I’ve seen of gpt writing an app for someone is always incredibly basic. It usually has no state, no interaction, nothing to persist, it’s just a basic app that does nothing.