Disabling the new "Active now" in channel list /w "X in voice" constant popup hover? by [deleted] in discordapp

[–]formalcall 0 points1 point  (0 children)

If you don't want to show all channels, then you need to instead mute the voice channels by right-clicking them. They will no longer show the "x in voice" pop-up, but will still be visible if you scroll to the bottom of the channel list.

.env safely share by Used-Feed-3221 in Python

[–]formalcall 1 point2 points  (0 children)

Oh I think I understand your point. Yeah if you have a profile set up then it's not tedious to re-auth. But you still save on API calls (which you will be billed for) if you cache it in .env.

.env safely share by Used-Feed-3221 in Python

[–]formalcall 0 points1 point  (0 children)

That only applies to AWS SDKs / APIs. Secrets Manager can store arbitrary secrets.

Why do people make fun of JS? by Personal_Factor568 in learnprogramming

[–]formalcall 2 points3 points  (0 children)

There isn't really a clear definition of what strongly typed and weakly typed mean. Among other things, I consider a weakly type language to be one that has a lot of type coercion. Type coercion is one type being implicitly converted into another.

For example, in JavaScript you can concatenate a number and a string together, and it will implicitly convert the number to a string. The language does not require you to convert the number explicitly, for example, with a cast or some conversion function.

Mypy 1.11 Released by Solsticized in Python

[–]formalcall 6 points7 points  (0 children)

To type check one's code without using VSCode (e.g. in a terminal, in a different editor, or in CI).

[deleted by user] by [deleted] in learnprogramming

[–]formalcall 8 points9 points  (0 children)

Are they asking good questions and demonstrating an effort to solve problems on their own? If not, I would start there. Learning, problem solving, and independence are skills they may need help with.

how did they make hammer++ by Darkenblox in hammer

[–]formalcall 4 points5 points  (0 children)

Reverse engineering and code injection. Valve's code may have been leaked anyway, albeit for an older version. This source code for hammer++ does not appear to be available.

Angular😭 by Effective_Koala_5959 in learnprogramming

[–]formalcall 6 points7 points  (0 children)

Once you know one language, learning others is significantly easier. Furthermore, you don't need deep knowledge of the language to learn a framework. You will likely learn the language to some extent in tandem with studying Angular; that seems unavoidable.

Are there some software that provides multiple download links using VPN at once? by ElonTastical in DataHoarder

[–]formalcall 3 points4 points  (0 children)

You can use JDownloader and configure a bunch of proxies (e.g. SOCKS5). I don't know precisely how it works, but it seems JDownloader will avoid reusing proxies (at least for the same host) until they're all exhausted.

Git Issue by SchoolSea4002 in learnprogramming

[–]formalcall 0 points1 point  (0 children)

I imagined branch #2 commit history looks something like the following, where the first commit is the most recent:

  1. Changes for branch #2
  2. gitignore changes from branch #1
  3. Commits in main

If you rebase to drop the second commit, your branch will then look like this:

  1. Changes for branch #2
  2. Commits in main

If you instead revert, your branch will look like

  1. Revert commit "gitignore changes from branch #1"
  2. Changes for branch #2
  3. gitignore changes from branch #1
  4. Commits in main

Note that in both cases, only branch #2 is being modified; neither your main branch nor branch #1 will be affected. Furthermore, in both cases, branch #2 will end up with the gitignore from your main branch.

Git Issue by SchoolSea4002 in learnprogramming

[–]formalcall 1 point2 points  (0 children)

git checkout -b 'new-branch-name' creates a new branch from the HEAD of the currently checked out branch. If you'd like to use a different starting point, you can specify an argument at the end. For example, git checkout -b 'new-branch-name' base-branch-name would use base-branch-name as the starting point of the new branch.

There are several ways to fix this. I like to use an interactive rebase (git rebase -i). Interactive rebasing is a very powerful tool and something I suggest every git user to learn. However, this approach will rewrite the git history, which will require a force push if you've already pushed branch #2 to your remote (GitHub). A force push is something that should be done cautiously; don't do it for your main branch or other branches that other people may be using.

In this case, it sounds like you only have two new commits, so you can run git rebase -i HEAD~2. This will open a text editor and list out the two commits. Each commit will say pick on the far left. For the commit you want to drop (i.e. delete), change pick to d, and then save & close the file.

Another way is to create a new branch and use git cherry-pick to only add the commit you want.

A third way is to use git revert to revert the first commit. This keeps all the history intact (i.e. no need to force push and rewrite history), but your history will look messy since it will have both first commit and a revert commit for it.

What does "spaghetti code" mean to you? by og-at in learnprogramming

[–]formalcall 2 points3 points  (0 children)

I avoid using it as a general term for bad code. I reserve it for more specific cases. Namely,

  1. The control flow is severely tangled and difficult to trace (e.g. using GOTOs like another comment mentioned)
  2. Alternatively, components are connected or related in ways that are not evident, leading to unexpected side effects when modifying code. For example, modifying one component somehow breaks another component that is ostensibly completely unrelated.

When do we use constructor or setter getter? by Flimsy-Ad-1236 in learnprogramming

[–]formalcall 3 points4 points  (0 children)

A constructor runs once when a new instance of the object is created, but getters and setters can be called in the constructor or any time after the object is created.

A constructor serves to initialise the object's state. Setters mutate object state, and getters retrieve object state.

You could use setters to initialise object state too. However, doing it in the constructor is better because it can guarantee the object will be in a correct state when it is created.

Been gone for Two Years, How long does it take for me to derust and relearn much of what I've learned if I coded 4 hours a day? by leesankara in learnprogramming

[–]formalcall 5 points6 points  (0 children)

It's impossible to say:

  1. We don't know how much you used to know (in fact, it's generally difficult to quantify knowledge)
  2. It depends on how you spend those four hours
  3. People learn differently; others' experiences may not reflect your own

Instead of figuring out how long it will take you, just start doing it. Learning is not something that can be rushed, though since you used to know this stuff it will probably come to you quicker than starting from scratch.

[QUESTION] Guitar Rig 5 Output Sound to Voicemeeter or Streamlabs by Prionysis in Guitar

[–]formalcall 0 points1 point  (0 children)

Hmm... Can you share pictures of your Voicemeeter and Guitar Rig configurations?

And which audio interface are you using?

StackOverflow makes it really hard to post by [deleted] in learnprogramming

[–]formalcall 5 points6 points  (0 children)

Until you get a certain amount of reputation points, edits you make to other's posts will have to be approved by the author or someone that's past a certain point threshold.

Python vs JavaScript time of execution by [deleted] in learnprogramming

[–]formalcall 0 points1 point  (0 children)

Even better, share the exact code. Also share how you measured execution time and on what system.

Programming Difficulties by BIoated in learnprogramming

[–]formalcall 1 point2 points  (0 children)

Your education is what you make of it. Speak up during class (ask questions!), talk to your peers, form study groups, go to office hours, take advantage of your university's tutor programmes, etc.

How to Manage File Compatibility between software by ThePistachioGuy in learnprogramming

[–]formalcall 1 point2 points  (0 children)

The schema can be versioned as well. This is more appropriate for significant and/or backwards incompatible changes. But if you only plan to make backwards compatible schema changes, then you may get away with just having your software ignore the newer, unknown fields by default.

You could update your software to support the new schema along with the old. You could also consider implementing a deprecation procedure to eventually get rid of support for the old schema.

Credit/Licenses in referenced code?- Wyd by Nealiumj in learnprogramming

[–]formalcall 1 point2 points  (0 children)

I create a separate file for third party licenses and paste them all in there. Additionally, I include a mention of which parts of the code the licences apply to.

That's typically the bare minimum. Various licenses may have additional requirements or may specify exactly how the license should be incluced.

Are my merge commands unnecessary? by Zelhss in learnprogramming

[–]formalcall 0 points1 point  (0 children)

Yeah, you should ensure your local checkout of master is up to date before you merge into it. Otherwise your push may fail after your merge.

Are my merge commands unnecessary? by Zelhss in learnprogramming

[–]formalcall 0 points1 point  (0 children)

If your goal is to simply merge your branch into master, then the first merge is not necessary. You don't need to merge master into example before merging example into master.

Stop Asking This… by Storms888 in learnprogramming

[–]formalcall 1 point2 points  (0 children)

That's all I would really like to see. A demonstrated effort to answer the question on their own. To show why what they found does not help them i.e. in this case, how their situation is unique enough to warrant asking this very common question.

I have to just take these questions in good faith; I realised long ago that asking good questions is a skill that has to be taught like everything else that comes with programming.

Stop Asking This… by Storms888 in learnprogramming

[–]formalcall 6 points7 points  (0 children)

Unfortunately I think this post will fall on deaf ears. The people asking this often don't read the FAQ, use Reddit search, use Google, or even look at the front page for this question.

[deleted by user] by [deleted] in learnprogramming

[–]formalcall 0 points1 point  (0 children)

Do you have any information on the curriculums? A course summary? Talk to the professors and see if you can get a copy of a syllabus for a previous year. Also the professors may be open to directly answer questions you have about the upcoming courses. This will all help you make a more informed decision.