if you don't a clear mental model of the language, and you get thrown off when different concepts look similar, there is not much point in trying to critique it. if i am confusing the concepts of table and chair, because they both have 4 legs, i don't think anyone should be coming to me to hear my suggestions for how to improve woodworking.
The Big Programming Thread - Page 964
| Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
|
nunez
Norway4003 Posts
if you don't a clear mental model of the language, and you get thrown off when different concepts look similar, there is not much point in trying to critique it. if i am confusing the concepts of table and chair, because they both have 4 legs, i don't think anyone should be coming to me to hear my suggestions for how to improve woodworking. | ||
|
sc-darkness
856 Posts
I'm not sure why you defend C++ in this case when even its creator has admitted: C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off. I like C++ though. | ||
|
bo1b
Australia12814 Posts
| ||
|
nunez
Norway4003 Posts
| ||
|
sc-darkness
856 Posts
On May 26 2018 22:38 nunez wrote: yeah, yeah, but it's like a skill-check you know. like a little ling-flood in zvz. if they die to that, then they are not ready to vs me in a macro-game. Flawed thinking yet again. Yesterday I saw Rotterdam lose to ling rush. Is he GM? He is. Are you GM? I doubt it. Are you ready to beat him? Who knows. Also, table and chair comparison isn't accurate. It's more like having a Cow factory class, then based on how you type a bracket, you either have 1,000,000 cows who look alike or 2 cows. I'm sure you'll notice the difference at your farm though. :D | ||
|
nunez
Norway4003 Posts
i cna nveer tell. | ||
|
sc-darkness
856 Posts
Focusing only on technical details isn't enough to be a good software engineer. Readability is also important. | ||
|
Khalum
Austria831 Posts
On May 26 2018 20:40 nunez wrote: 'memory operations' are minimized? i am not suggesting making extra copies, but there are oh so many tools ready at hand for "avoiding copies" (references, an arsenal of pointer-types, containers, statics even). in most scenario's you easily get away by using the most trivial of tools (f.ex. a reference). one only needs thread-safe reference-counting for the most complex of scenarios, and then std::shared_ptr / std::weak_ptr is ready at hand, which works for _any_ type. types with baked-in reference-counting is haram. 'cloning' and 'deep-copy' is alien terminology. We're talking about people who are using plain char* for paths while being fully aware that there are a lot of people using the library in Microsoft land. But in the context of your example I defend the motivation - not necessarily the implementation. | ||
|
WarSame
Canada1950 Posts
It sucks because I'm literally just sitting here waiting for it to do a fairly big feature for my app and it's so close, but so far! | ||
|
Manit0u
Poland17450 Posts
Bonus, weird Ruby question from the interview:
| ||
|
Acrofales
Spain18132 Posts
On May 29 2018 01:56 Manit0u wrote: So, I've been to 2 job interviews today (one for Python and one for Ruby). Both went pretty well. Now I have to make a hard decision... Bonus, weird Ruby question from the interview:
If that were PHP it would cast them to string and do a lexicographic comparison, and return true. In Ruby my guess is whatever Ruby's equivalent is for an illegal argument exception. | ||
|
Manit0u
Poland17450 Posts
On May 29 2018 02:23 Acrofales wrote: If that were PHP it would cast them to string and do a lexicographic comparison, and return true. In Ruby my guess is whatever Ruby's equivalent is for an illegal argument exception. + Show Spoiler + It will return true but for completely different reasons ![]() Integer inherits from Numeric, thus making Numeric a class that is higher in the hierarchy. If you compare them like that it will evaluate classes closer to base as greater than those further away (but will evaluate to nil if comparing objects on the same level - unrelated). ![]() Basically, checking if the class is higher up the tree. | ||
|
iFU.spx
Russian Federation372 Posts
I am here from Broodwar forum. (starcraft remastered) Project: Since new starcraft remastered patch released, replay format has changed, i can't continue my project due to unable to parse replays. General question: I need you guys give me some advices how to be able to parse replay data (i wanna learn decode *.rep by myself). Any info: books, or messages. I know this is really hard problem includes reverse engineering skills needed (as far as i know), but all i need to know is where to start from. What i've tried already: Found replay format info, written 14 years ago: https://github.com/HearthSim/pyreplib/blob/master/doc/replay_format.txt https://github.com/HearthSim/pyreplib - python library, old replays only https://github.com/icza/screp - Go parser, broken since last patch So i am investigating it by myself already, but i need you guys tell me some theory i can read to deeply understand how things works. May be some terms, related to this problem, that i can find by them and learn. Thank you very much In case if you would want to ask: Jca (bwchart creator) is probably very busy to speak, so don't advice to speak with him. Yes, Bwchart 2.00C works well with latest format, but i need to understand how. Yes, i understand it can take a long time to understand. I am ready. Thank you again | ||
|
Manit0u
Poland17450 Posts
If you have to reverse engineer data saved in a file you'll have to do the same really. Go through it byte by byte and try to figure out what's hiding behind each of them. Those old libraries might be helpful because maybe it's just a matter of stuff being moved around. If they changed encoding then it might be impossible to get any data without knowing which algorithm they used. | ||
|
ShoCkeyy
7815 Posts
On May 27 2018 05:08 sc-darkness wrote: If you can't tell the difference when you've just woken up, then it's not a good feature.
Focusing only on technical details isn't enough to be a good software engineer. Readability is also important. I just woke up, had a fight with my wife, not all there in the head, but I was able to tell the difference immediately. Also, I've been doing a lot of ML/Predictive stuff lately, and still learning about it myself, but I wouldn't mind sharing my learnings if anybody has any questions. On May 29 2018 01:56 Manit0u wrote: So, I've been to 2 job interviews today (one for Python and one for Ruby). Both went pretty well. Now I have to make a hard decision... Bonus, weird Ruby question from the interview:
I would of responded with "magick", kidding but also not kidding lol | ||
|
Manit0u
Poland17450 Posts
On May 31 2018 22:43 ShoCkeyy wrote: I would of responded with "magick", kidding but also not kidding lol It's one of those language-specific quirks they sometimes ask at interviews. For Python you get multiple inheritance sheananigans:
| ||
|
Deleted User 3420
24492 Posts
Right now I do value1 - (value1&value2). Could also do (value1 & ~value2), I think. But both of these require two separate operations. | ||
|
Liebig
France738 Posts
On June 06 2018 02:21 travis wrote: What is the fastest way to do the difference between two bitwise values? Is there an operator for that? Right now I do value1 - (value1&value2). Could also do (value1 & ~value2), I think. But both of these require two separate operations. I think v1 ^ (v1 & v2) might be the fastest, or maybe as fast as (value1 & ~value2) Your first option should be slower i think since - is not a boolean logic operator | ||
|
Deleted User 3420
24492 Posts
new question, for the few of these that might know about this for some reason. shortest paths algorithms seem to see a lot of research. particularly, all pairs shortest paths. I can find almost no research on all pairs *all* shortest paths, however. Is there any demand for such an algorithm? I don't see it being useful outside of unweighted graphs or specific types of weighted graphs... but I still see it being useful. I am surprised I could only find one paper on it. I have a couple algorithms I have made that do a pretty good job of finding this, but I am not sure anyone would even care. I've also made a fast all pairs shortest paths lengths algorithm. I am familiar with say, all the algorithms referenced in wikipedia shortest paths article. But, I do not know any algorithms specialized to find shortest path lengths - or if there actually are any that are distinctly different from the ones that find paths. another thing I have been working on is a dynamic shortest paths data structure, for updating all pairs shortest paths on edge additions or removals, instead of rerunning from scratch. | ||
|
Manit0u
Poland17450 Posts
Maybe it'll be of some use to you ![]() | ||
| ||

![[image loading]](https://www.studytonight.com/ruby/images/class-in-ruby-1.png)