I used to play a fair bit but was never any good. I know enough to appreciate a game at a slightly-better-than-casual level, but peaked early and moved on to games I was better at..
@DSM exactly, the fact that I have to draw attention to the fact that they didn't post the actual code they used (as the JNI library they appear to be using is not standard) or the key that is embedded in that, makes the question effectively incomplete and lacking an MCVE.
Unfortunately you're probably not going to find a ready-made library that does precisely what you need. There certainly isn't anything like that in the standard libs.
Such is the way of things. So much of programming is "batteries not included"
Do non-techies understand the distinction between a "warning" and an "error"? I was watching my client use my program today and treated "warning: sprocket number field should be greater than zero" as if it was a mandatory command rather than a suggestion. I'm thinking about whether I should re-word things somehow.
Actually I think the message was "sprocket number field must be greater than zero" which doesn't do a good job conveying "you can still submit this field with a negative number, but you're probably wrong to do so"
The actual message, with details anonymized, is 'if FOO is "ABC" and the BAR is not "DEF", and the BAR does not start with "GH", the BAZ must be "IJK", "LMN", "OPQ", "RST", or "UVW"'
I could change it to 'if FOO is "ABC" and the BAR is not "DEF", and the BAR does not start with "GH", the BAZ is typically "IJK", "LMN", "OPQ", "RST", or "UVW"' but I feel it still isn't the beacon of clarity I'd like it to be
@Kevin: I'd be okay with a longer message if it were easier to follow, with a header like "Something seems unusual. [describe situation]. [Potential actions and their consequences.]"
If I had unlimited man-hours and volition, I would separate the text box into error/warning/info tabs, each one having a descriptive label like "you cannot continue until you resolve these issues / these issues indicate there may be a problem with your data, but you may continue anyway / uhh something about info goes here"
@DSM That's interesting. I don't mind C++, I certainly feel more comfortable with it (or a subset of it) and C than Python these days, I'd just like to improve with Python. Seems like there's so many interesting projects and modules. But here it's most all R for any high-level stuff.
You definitely don't need to learn "all" of the python modules in the stdlib much like you'd need to know most of the C++ stdlib. There's definitely many parts of the python stdlib that people in here don't know.
It takes in a single thing, and outputs a single thing. A monad says "Well, since I'm described as containing x, if you apply a function to me that takes an x and produces a y, I can say that I then contain a y".
I'm also simplifying and could be very wrong so I'll stop here
A functor takes a single thing and outputs a single thing? So it's really just a special case of function? e.g. a square is a special case of rectangle?
Think of a functor as something that can be "mapped" over. If you have a function that takes an X and produces a Y, You can apply that to a list of X's and get a list of Y's. Thus, the list is a functor. In haskell-land, the "apply this functor" operation is called fmap. And for the list type, they just say fmap = map!
I need to implement that at some point -- in my app I kept running into awkward cases where adding "s" was not the right approach, but I didn't feel like handling all the cases
One typically runs a script by opening the command prompt and entering python myscript.py, or just myscript.py if your system has a default association for .py files
I think this module I wrote would look better if I used the name "issue" instead of "error", but I don't feel like replacing it in the 100 places that I used it...
@Kevin PyCharm advertises a rename symbol function. I never tried it myself on something large, though. I would probably just sed recursively and then check the diff before committing to make sure nothing unintended was replaced.
If you're on windows, adding sys.path.append('/usr/local/lib/python2.7/site-packages') to your code will have no effect, because there isn't a "/usr" directory in Windows. Uh, unless you make one yourself, I guess, but there's no point in doing that.
Once you know the basic elements of a language, there's no one golden road to follow to get better. You have to pursue your own interests. Read the documentation on the libraries you're interested in. Read the source code of open-source projects you admire. Read language-agnostic design theory books like Design Patterns: Elements of Reusable Object-Oriented Software
To add on, create a goal for yourself and set out to try and achieve it. Once you got it try to think of ways to make it better. For example Kevin is good at gif making with PIL. DSM is good with numpy...
In computer programming, a function prototype or function interface is a declaration of a function that specifies the function's name and type signature (arity, data types of parameters, and return type), but omits the function body. While a function definition specifies how the function does what it does (the "implementation"), a function prototype merely specifies its interface, i.e. what data types go in and come out of it. The term function prototype is particularly used in the context of the programming languages C and C++ where placing forward declarations of functions in header files allows...
@MooingRawr Perhaps you're learning but don't know it. Maybe the list of things you know that you don't know has grown faster than the list of things you know, which makes you feel like you know less of everything percentage-wise, even though your total knowledge has increased.
How I feel is, you guys go on to talk about something, I learn that I dont know that topic I go look it up, and down the rabbit hole of not understanding what im reading, which chains it into more look ups
For example, yesterday I wanted to learn Numpy, I went to go read the docs, then I went to go read about certain vector rolls and what not which led to another thing
I don't know anything about matplotlib or numpy or opencv or databases or cloud computing or computer architecture or functional programming or test-driven development or red-black trees or the Black-Scholes equation or physics or chemistry or color theory or UI design or... So I get a kick out of when people imply I'm knowledgeable.
Where's Marcus, I was hoping to be about to enter my math confused phase, and go on a journey reading about random math stuff that wont stick with me after 3 months.
Kevin you are more knowledgeable than me; by a long shot. There's always someone more knowledgeable than you; except if you're the Ninja. He's at the top of the food chain
Hmm, is it hostile user design to have a pop-up saying "You are about to navigate away from the page. [Discard changes and continue] [stay on page]" if the user partially filled out the form and didn't save?
@AndrasDeak ah, "Concepts & Practice of MF". Haven't gotten through the later chapters but that was my formal intro to risk neutrality & martingales outside of raw probability theory
In a perfect world I'd be able to save the data so the user can exit and return and still have whatever they put in last time. But that would take more man-hours than I've got.
@MooingRawr Has to do with the concept of pricing options -- which are contracts that let you buy or sell a particular financial instrument/asset for an agreed-upon price on or before some given date
I took a course about martingales out of interest in stochastics, but finance doesn't interest me (pun unintended). It's not just a lack of interest actually; it exerts anti-interest on me.