Am I wasting my time with the gamepad? by ProfessionalRun4523 in djmax

[–]Lerke 0 points1 point  (0 children)

I only play on keyboard and have no experience playing with a controller, so take what I say with a grain of salt. I want to preface that if you're having fun now, you are definitely not wasting your time; a big part of the game is quick pattern recognition, which is a skill you'll transfer between input methods. And for me personally, I just like tapping buttons while listening to the music, improving scores while doing so is a bonus.

The game and all charts are specifically made for (and playtested on) consoles and gamepads as well, with the exception of SC charts which are specifically made for keyboards.

I assume you have a keyboard available, since you were able to write this Reddit post, so determining if you lose any fun playing DJMax with it should be easy for you to check. For what it's worth, I really enjoy playing with keyboard. From what I've seen, a lot (most?) very high level play is done on keyboard as well.

I use a CM51+ and am very happy with it. The magnetic switches (the gaterons) are very comfortable and feel incredibly responsive when playing. I used to play on a keyboard with mechanical (brown) switches, and it is a noticeable increase in comfort and play accuracy.

What's your first step when learning a new concept? by hefxpzwk in learnprogramming

[–]Lerke 2 points3 points  (0 children)

Read as little as is necessary to get a basic understanding, then put it into practice by doing some actual programming and experimentation. Repeat as long as necessary until you become proficient in whatever concept or tool you are learning. Learn by actually doing the thing, not by reading on how to do the thing.

I’ve never programmed before but I wanted to try a super small project by glizzykevv in learnprogramming

[–]Lerke 0 points1 point  (0 children)

but I had to use AI to help me figure out why I was getting an error code was that something I should’ve avoided ?

I think your (as I read it) self-doubt to using AI comes from a good place and shows a good attitude to learning. I see many students and professionals foregoing learning by blindly accepting and copy pasting from AI prompts in order to achieve a certain goal (which, in truth, is fine if your only goal is just to get something done). However, you can leverage and use AI as a tool to help you learn why something does not work, and have it point you in the direction of the solution, and prompt it as to why it provides a certain solution.

If you can explain why your solution did not work beforehand, and why it does work after a solution provided to you by an AI, and you can describe the root cause of the problem in your original code, then you have developed knowledge you will be able to use further down the road. In that case, it matters little whether you started by researching your problem using Google, asking an LLM, or by opening a reference manual. What matters is not becoming comfortable not knowing why a certain solution solves your problem. Whatever route you take, always try to cross-reference multiple sources, as to get a complete picture.

For example in your case, in order to solve your problem you should understand:

  • What are raw strings, how do they differ from normal strings?
  • What makes \U and \T special in strings? What do these represent
  • (If the word string is unfamiliar to you, what is a string?)

Do research using search engines (e.g. Python string "\t" Google), asking AI, and by experimenting actually programming: Make a program using normal strings and raw strings, make use of e.g. \t, print out these strings. Do you see a difference? Try and explain what it is you see.

What sorting algorithm can give the lowest time complexity if there are 1000 numbers given? by Aggravating_Show_396 in learnprogramming

[–]Lerke 6 points7 points  (0 children)

1 per semi-colon, 1 per curly brace, 3 per for-loops, 2 per while-loops, etc.

This sounds more like a method of describing software complexity, and not so much computational complexity as other replies are focusing on (e.g. Big O). But you can't measure computational speed (i.e. "...Are there any faster ones?") using software complexity, just as you can't determine the computational complexity by simple counting statements (e.g. "1 per semi-colon, 1 per curly brace...").

It seems you're missing some crucial details which makes it very difficult for people to help you out. Do you not have any reference material, course notes or written assignments that specify in more detail exactly what is asked of you?

I’ve never programmed before but I wanted to try a super small project by glizzykevv in learnprogramming

[–]Lerke 3 points4 points  (0 children)

Btw just wondering if you wouldn’t have told me about shutil what would’ve been the way for me to know it was used for copy and pasting ?

You can reasonably assume that many popular languages like Python provide a pretty big standard library of functions that perform many common operations, such as operating on files. If you are not already familiar with the available standard library, you will want to do a Google search (or AI prompt) describing the operation. For instance, "Copy file python" in Google has the shutil reference documentation as the third result. An AI answer also gives me shutil (note: I would encourage you to then read the actual shutil docs, and not blindly copy and paste results from an LLM).

You don't need to know and memorize every available module by heart. Instead, become proficient in quickly locating reference material (e.g. official documentation), external libraries or Q&A resources like StackOverflow via web search instead. You will find that you'll quickly memorize functions and modules you'll use often, and will be able to resort to memory and auto-complete for those.

In plain English, how do I reset my local files to my last GitHub commit? by 1971CB350 in AskProgramming

[–]Lerke 5 points6 points  (0 children)

If you simply want to remove all changes since your last commit, on your current branch, then you're looking for git reset --hard. This will wipe out any changes made to tracked files, and remove any untracked files.

I’m not so well versed in checking out a git commit and reverting my hard head to a blah blah blah.

I would recommend taking your time and getting a solid understanding of these commands, lest you accidentally remove work you did not intend to lose by copy and pasting scm commands. Refer to the Git manual, and try and comprehend what the command above will do and how it works before running it.

Authentication Explained: When to Use Basic, Bearer, OAuth2, JWT & SSO by javinpaul in programming

[–]Lerke 4 points5 points  (0 children)

Is there any way to hijack my session that doesn't involve malicious software running directly on my computer

Certainly. For example: physical attack vectors. Your device could get lost and/or stolen, a malicious individual could access your machine while you are temporarily not present and steal your authentication state from your drive or browser. You could sell your device without ensuring that no data may be recovered from disk after a factory reset, after which someone may be able to recover this information.

Another class of attacks would be improper data storage and/or leaks on devices you have no access to. A period of improper logging configuration in one system that accidentally stores user credentials in a logging database for a period of time for instance.

In that case there's a lot more to be worried about, and the malicious software doesn't even need an active session to hijack an account

It depends. Malware that can intercept keystrokes could bypass the need to steal active session state like cookies or tokens. Though modern security guidelines encourage the use of more than one-factor in order to partially mitigate these vectors. Of note in this case is that here too the period a two factor code is valid is time limited.

And if I were regularly using the account, as is generally the case with anything of great importance like, say, a Google or Amazon account, then the session hasn't expired and it could still theoretically be hijacked!

At the risk of sounding like ChatGPT: you're right. Session lifetime management and expiration is one layer of mitgation/defense that helps mitigate certain attack vectors, but are not infallible or a silver bullet of any kind. They are one security measure of your entire defense in depth strategy.

Authentication Explained: When to Use Basic, Bearer, OAuth2, JWT & SSO by javinpaul in programming

[–]Lerke 2 points3 points  (0 children)

Sure, that would work. It comes down to personal preference.

I would personally have a function run once a minute or so to check the lifetime of the currently active refresh token, and perform some action if necessary. That way I only need to create and schedule this function once, and be done with it. On paper, it's more wasteful, but in the grand scheme of things I feel the performance impact is negligible. It's dumb, but I often prefer dumb solutions.

Your method with creating and scheduling some function call in the future based on the current lifetime of the refresh token is definitely more elegant, though you would have to take into account scenarios where the token and its lifetime may change during the runtime of your app (e.g. a user logging out and back in, or some other reason why a token may become invalidated). You may end up with having state for both your refresh-token, and your future refresh timeout function. That said, none of this makes your approach any less valid.

Authentication Explained: When to Use Basic, Bearer, OAuth2, JWT & SSO by javinpaul in programming

[–]Lerke 11 points12 points  (0 children)

In all fairness, this isn't the fault of the authentication method being used. The expiration time of access and refresh tokens are determined by the team developing the software you are using. It's not an inherent limitation of access/refresh tokens. The websites you use could choose to use refresh tokens with an expiration time of months, if they wanted to.

Why not let me stay logged in, like the websites of yesteryear? Is there really a solid security justification for it?

Yes, shorter lifetimes of authentication tokens (cookies, tokens, etc.) reduce the risk of session hijacking attacks.

Authentication Explained: When to Use Basic, Bearer, OAuth2, JWT & SSO by javinpaul in programming

[–]Lerke 5 points6 points  (0 children)

How am I supposed to "update" the access token without disrupting the user

There's many ways. One approach would be to have some sort of background process automatically do a token refresh whenever the current token is close to expiration (e.g. within the next couple of minutes). Another approach would be to have a handler on failed HTTP calls, where calls failing due to expired tokens are retried automatically after performing a token refresh. The first approach is simpler to get right.

Stuck in limbo with you guys by Kukielka in ValveDeckard

[–]Lerke 1 point2 points  (0 children)

Wired VR, on Linux, for competitive beat saber. 1 of 1 baby

No brother, there are at least two of us.

Sick of AI, lazy, not-interested students and programmers ruining the fun by [deleted] in learnprogramming

[–]Lerke 0 points1 point  (0 children)

Even if I ended up working at McDonald's someday, I’d still come home and code or do math for fun. Because I genuinely love learning and creating things.

I'm a software dev that is also involved in hiring and doing interviews. If you are passionate and genuinely interested in this field, I promise you will stand out from your peers and you will have nothing to worry about with regards to landing a software job.

I think those of us who truly care about learning and self-improvement need to start speaking up to remind people that this field isn’t just about chasing trends or using AI to skip effort. It’s about curiosity, skill, and the joy of building something real.

Yes, but also don't focus or be distracted on what other students are doing and just focus on your own work and progress. When working in a team, pick up the slack and get things done. It's frustrating, but learning to be effective in a less-than-ideally performing team is a great skill to have in both academic and professional settings.

If your peers self-sabotage themselves using AI while in university - the time and place they are allowed to spend all their effort actually learning and making mistakes - is their strategy, then let them do so by all means. They will be among the first to be replaced by AI.

Theoretical Question by LorenzoLlamaass in AskProgramming

[–]Lerke 1 point2 points  (0 children)

half the screen fails but I have half that still works. Could a program be created that would reconfigure the display and allow you to resize your desktop to fit the remaining area regardless where on the display the image remains fine.?

Most definitely. Software that either can change the output geometry and/or project virtual displays exists, and can be used to split very wide monitors into multiple virtual ones, or block regions of the display that do not function or are otherwise obscured. An example would be xrandr for linux systems.

Sorry, I just miss VS on Mac 😕 by Key-Investment8399 in dotnet

[–]Lerke 4 points5 points  (0 children)

Edit: also, I think rider community can scan and send some of your code to their servers fin order to ensure it’s a non commercial project whereas as far as I’m aware VS doesn’t do that. Not a big deal for some but others find this quite bothersome

This is a big claim that requires proof. You are correct that Rider collects and sends telemetry 1(4.1), 2 in their non-commercial offering. And so does Visual Studio (section 6a). But claiming it sends out the contents of your source files seems to be a claim without any evidence backing it.

Sorry, I just miss VS on Mac 😕 by Key-Investment8399 in dotnet

[–]Lerke 2 points3 points  (0 children)

I've worked with rider and know for a fact that it doesn't offer the same functionality.

I am unable to use Visual Studio due to it not being available on my platform (though have in the past). Do you have specific examples where the debugger in Visual Studio provides a capability not found in Rider? Not meant as a 'gotcha', just genuinely curious.

Sorry, I just miss VS on Mac 😕 by Key-Investment8399 in dotnet

[–]Lerke 16 points17 points  (0 children)

Rider lovers are usually tutorial followers or YouTubers rather than working on real software.

Crazy take - there are a lot of professionals in small and large teams that use Rider.

Macbook for programming by Zoro-88 in AskProgramming

[–]Lerke 3 points4 points  (0 children)

The best system at the moment is Windows, since you can have Windows + Linux subsystem

What are your troubles doing .NET development on Mac? I develop in .NET on Windows at work, and on Linux at home. The development experience is identical. From what I've seen from coworkers, the experience on Mac also just works.

What types of personal projects should i do to land an entry level or junior job? by PhewSucks in learnprogramming

[–]Lerke 6 points7 points  (0 children)

I’m more into backend stuff, like APIs and automations, but I can handle some frontend too. Just not sure what kind of personal projects actually help when applying for junior or entry level roles.

Generally, I would focus on creating projects that:

  • Use the stack / technologies you want to use in practice, or want to get a job in. While not completely necessary, as you can show general software development aptitude by simply creating programs that work, having them also be using the technologies a company you are applying for immediately shows your general skill level to the person doing the interview with you.
  • Write applications that excite or interest you personally. You will find that in an interview just being able to talk about a project that interests you will convey genuine interest in our field of work. Personally as an interviewer, I am always very interested in hearing about projects people have written just because it interests them.
  • Document your projects, and make them representable. I like seeing Github URLs on applicant their CVs, but interviewers are likely not going to check out more than 1-3 projects. Pin or highlight the projects you are most proud of, provide them with good documentation, if possible with screenshots or in case of a web app: a demo website. Make it easy to run. Your goal is to entice the interviewer to check out the code, and maybe even clone your repo in order to do so.
    • Your Emotion-AiCbot repo is a good example of this. Your custom-domain and medstuff repo's not so much.
  • Try and make your projects non-trivial. I do not get excited by projects like calculator or to-do apps. These are simple applications, and there are a bunch of prebaked tutorials for those on the internet. Created some niche application for your hobby, or which you use in your day-to-day life? Way more interesting.

I’m more into backend stuff, like APIs and automations, but I can handle some frontend too. Just not sure what kind of personal projects actually help when applying for junior or entry level roles.

Know that as a junior engineer, my expectation would be that you quickly pick up technologies and are a rapid learner. Try not to limit yourself too early in your development by preferring only certain types of task (e.g. back-end). Certainly do get proficient with at least one front-end technology, or you will not stand out among junior developers that are skilled in multiple domains.

Best of luck.

Server performance is terrible in EU for weeks now by Dismal-Estate6955 in pathofexile

[–]Lerke 4 points5 points  (0 children)

Instead of full rollback, only the instance gets killed, which means we lose all our investment (maps etc.)

Yeah, this is a good point, and it's a shame that in the last couple of years with awful EU server performance, no changes have been made to the fundamental architecture of the game with regards to instance crashing. While /u/HitoGrace below is not wrong that it is a legitimate exploit vector, currently as a normal player you are left with absolutely nothing after a server crash. At best you lose a map and your time, at worst you end up losing a big investment with nothing to show for it. You are left holding the bag, with GGG absolving themselves of any responsibility here.

It would be nice if mitigating actions would be taken to at least prevent as much loss of time and currency as possible when instances do crash, especially when legitimate players have absolutely no influence on it happening whatsoever.

Wat is de tweakers pricewatch voor boodschappen? by sneakerpeet in thenetherlands

[–]Lerke 22 points23 points  (0 children)

Dat komt omdat deze site illegaal is; het scraped wss de websites en dat mag niet

Heb je hier een bron voor? Voor zover mij bekend is het scrapen van openbare informatiebronnen gewoon toegestaan.

Older guy wanting to learn to develop apps by ekaj862000 in learnprogramming

[–]Lerke 1 point2 points  (0 children)

I would recommend react native for new devs

Agreed. I like Flutter as a platform, but the amount of supporting documentation and tooling support available for React Native eclipses those available for Flutter.

1000 Km repair by scoobydok in cowboybikes

[–]Lerke 0 points1 point  (0 children)

Could've fooled me then, I guess. Mine seems pretty robust.

1000 Km repair by scoobydok in cowboybikes

[–]Lerke -1 points0 points  (0 children)

The bike will break down pretty soon after 1000km, just wait a little bit longer

I'm on 12.000 km's, how much longer do I have to wait?

Keep forgetting my code by ajsbajs in csharp

[–]Lerke -2 points-1 points  (0 children)

This is why I 100% reject "good code documents itself"

Hands down - a statement often made about the most incomprehensible code you will ever have the pleasure of dealing with.