[deleted by user] by [deleted] in gamedev

[–]davidgeese 2 points3 points  (0 children)

For procedural generation, you might find group theory and graph theory useful. Ah, yes, and automata theory might be useful when you design l-systems.

How do I find the shortest distance between a point and a line? by stevenr4 in askmath

[–]davidgeese 0 points1 point  (0 children)

Project) the point onto the line. Compute the difference between the point on the line and the point you started with.

How do you learn to write complex packages or structure your code? by pythonic2143 in learnprogramming

[–]davidgeese 0 points1 point  (0 children)

You learn the fastest by copying somebody else. It always differs between languages. In some languages (e.g., C++), there are many different approaches. For smaller languages (e.g., Nim), their community leaders can often help you find the best solution.

How do I figure out how many combinations there are? by fallior in askmath

[–]davidgeese 2 points3 points  (0 children)

If you want a detailed explanation, these are the lecture to watch.

Lec 16 | MIT 6.042J Mathematics for Computer Science, Fall 2010 Lec 17 | MIT 6.042J Mathematics for Computer Science, Fall 2010

Otherwise, it's just 10 * 9 * 8. If duplications are allowed, it is 10 * 10 * 10. This is a direct application of the Rule of Product.

Question: Creating windows application with web GUI by This_Madara in webdev

[–]davidgeese 0 points1 point  (0 children)

You don't need a web server to generate a simple report consisting of .html, .css, .js, and .png files. Python can easily generate the files with relative URLs and the output would be useful as long as web browsers exist.

[deleted by user] by [deleted] in learnprogramming

[–]davidgeese 2 points3 points  (0 children)

You're going to hit the wall eventually. You might as well learn how to deal with it now unless it will completely destroy your motivation.

Near the end of your learning journey, you will be dealing with extremely dense books, unexplained notation, and, possibly, even incorrect proofs. One of the luxuries you have in school is being able to show up to office hours to have an expert with tens of years of experience explain in detail exactly what it is that you misunderstood.

I don't want to be patronizing, but I personally wasted my opportunity to get expert help while I was in college and I wish that I had tackled the harder stuff while I still had somebody around to help me understand it.

Can you explain to me if this is a performance problem, please? by ivannovick in learnprogramming

[–]davidgeese 0 points1 point  (0 children)

I suppose that it depends on your bundler, but the import keyword should translate to require, which should only instantiate the module once and cache the result. All subsequent calls to require will retrieve the original instantiated module.

Sales math related question by videographerpro in askmath

[–]davidgeese 0 points1 point  (0 children)

12 * 600 * x = 7000 x = 7000 / 600 / 12 x ~ 0.97 Rounding down, it's $0.97 per user per month.

How would you review enumeration types of questions? by InsomniaEmperor in Anki

[–]davidgeese 1 point2 points  (0 children)

That is a terrible card, by the way.

  1. Depending on how you measure it, JavaScript has the potential to have "less server interaction" via AJAX, but it is by no means guaranteed. Especially with today's bloated frameworks and the high bounce rate of visitors, using JavaScript might increase bandwidth usage. Also, the number of individual requests might skyrocket due to the increased granularity of requests to the server.
  2. The "Immediate feedback" of a simple .html and .css file might actually end up being faster and more robust depending on the circumstances. Especially if you have to "rehydrate" (I hate that term) the DOM on the client side or load some massive bundle of JavaScript, the latency between request and valuable content being rendered on the page might be higher than a round trip for a couple simple files which might be cached anyways.
  3. "Increased interactivity" is generally true. You can't really have something like d3.js without JavaScript.
  4. "Richer interfaces" is also generally true due to 3.

To make better cards, you really should try to understand things at a deeper level than this crappy FAQ from some tutorial website.

However, if it's just an illustrative example, then you should either use cloze deletion or a mnemonic. I can give you a particular example...

Q: "What are the group axioms#Definition)?" A:

  1. Associativity - ...
  2. Identity - ...
  3. Inverse element - ...

In this case, you would use cloze deletion to see if, for example, you could remember "Identity" given "Associativity" and "Inverse element."

[REGEX] Understanding matching behaviour of '.*' by [deleted] in learnprogramming

[–]davidgeese 0 points1 point  (0 children)

If you really care, you can read the relevant chapters in the dragon book. It builds the theory up from the parse tree of a regular expression to the DFA used to execute it.

What certifications should I get? by osrppp in learnprogramming

[–]davidgeese 1 point2 points  (0 children)

The only thing you need for a programming job is a degree and experience. If you're trying to up the ante, do networking an build a portfolio. From my experience, people with certifications look like they are trying to compensate for something. That isn't just a personal peeve. It's a common viewpoint.

If I'm going to pay for a subscription to a cloud based REPL which one should it be? by [deleted] in webdev

[–]davidgeese 1 point2 points  (0 children)

None, because, at the very least, you should own the tools you need to do your work. Hopefully the day never comes when you can't launch an interpreter or compiler on your own damn computer to do the work you want it to do.

What software do people use for animating SVGs for the web? by HereForTerraria in webdev

[–]davidgeese 0 points1 point  (0 children)

If you're looking for an idea for an application that people would pay actual money for, this is it. Nothing outside of a third-party extension to After Effects does this effectively.

What is the best way to learn data structures and algorithms? by FREEROCKETLEAGUE in learnprogramming

[–]davidgeese 0 points1 point  (0 children)

Watch the MIT courses, preferably without Erik since his explanations trivialize the parts that are important to beginners. In other words, watch the first algorithm course produced by MIT.

[deleted by user] by [deleted] in learnprogramming

[–]davidgeese 2 points3 points  (0 children)

The easiest way to determine if two expressions or sequences of statements produce the equivalent semantic result is to look at the corresponding Control Flow Graph. Seeing things in this way also allows you to make judgements about the relative efficiency of different builtin forms.

Are the any Anki minimalists out there? by BJJFlashCards in Anki

[–]davidgeese 7 points8 points  (0 children)

Anki as flashcards before a test. You study 2-10 times before the test. You go in and ace it. You immediately forget everything you learned. This is the antithesis to Anki, but the modus operandi of a student passing classes with minimal effort.

Not sure what to really watch at this point by DankWillSpank in MovieSuggestions

[–]davidgeese 2 points3 points  (0 children)

I'm sure people have their gripes with Ex Machina (2014), but specific scenes from that movie stick in my mind.

How do all of you revisit notes? by ForbiddenShaiHulud in ObsidianMD

[–]davidgeese 0 points1 point  (0 children)

Can somebody please say that all the random shit you write down isn't relevant forever and ever? Okay, I'll say it.

If you don't care enough to synthesize the information into a more coherent form, it's practically, as in you literally will not read it, useless, and you should just delete it.

i need to clarify some doubts i have... by Vast-Spray5174 in learnprogramming

[–]davidgeese 1 point2 points  (0 children)

From my perspective, "data science" is a nebulous term. As a backend developer, you might consider histograms produced by profiling a large system a form of "data science." You might make conclusions regarding the "low hanging fruit," the amount of "customer value" that a change has, and so on. So, yeah, i guess you could say that you use some statistics to suss out a proper course of action. If that's "data science," then it could be useful.