Should super then also be a method argument?
HN user
Sandman
If anybody wants to contact me, feel free to send me an email: Themryl@yahoo.com
Wouldn't it be more explicit if there was a designated keyword that objects could use to access their own members instead of implicitly assuming that any first argument to a method is a reference to them, only called 'self' by convention?
I'm genuinely sorry if I came across as condescending, that was not my intention at all.
I merely wanted to point out that, in my opinion, this property should be reflected in parameter type, rather than the name. Just like, if we wanted a parameter that should only be a whole number, we wouldn't declare it as a float and name it "MyVariableInteger" and hope that the callers would only send integers.
You mentioned that there are quite a few languages that do not permit what I proposed, would you mind specifying which ones exactly? The only one that comes to my mind is assembly?
I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type. In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1].
EDIT: Some of you asked what about languages that don't support such more constrained types, so to answer all of you here: different languages have different capabilities, of course, so while some may make what I proposed trivial, in others it would be almost or literally impossible. However, I believe most of the more popular languages support creation of custom data types? So the idea (for those languages at least) is quite simple - hold the value as a float, but wrap it in a custom data type that makes sure the value stays within bounds through accessor methods.
Also, obligatory SMBC: https://www.smbc-comics.com/comic/2009-08-30
Croatian here. You're correct, if you only said the word "spomenik" to anybody from former Yugoslavia, they wouldn't be able to distinguish whether you're talking about precisely those monuments built after WW2, or any other monument built before or after the communist era. Or even, say, Washington monument (In Croatian it's literally called "Washingtonov spomenik"). The word "spomenik" means "a monument" and just that. I was actually surprised to learn that in English the word refers to monuments from a particular location and particular era.
then there is no point switching
Why not? Your chances of choosing the correct door were 1 in 3 from the start. That doesn't change with the fact that the host opens the doors at random.
If you only ever offered the players to switch if they picked the car, they'd soon realize this and never switch when they're offered this chance. Also, players that picked a goat at first would have no chance of winning the car.
Cool, I didn't know about that one! I'm going to check it out, thanks for the link!
I suspect you don't know actual American military personnel very well, especially officers and NCOs, and how seriously we take the Laws of Warfare, AND the Constitution.
You're right, I don't. But, if Americans don't need to fear that they'll have to fight the US Army, why have the 2nd amendment at all? Who would they need to protect themselves against?
the ability to defend yourself against a tyrannical dictatorship made sense until the government developed better technology, now it's pointless so just give up your guns?
Basically, yes. Do you honestly think people would have any chance against probably the most powerful army in the world? Sure, they could try fighting a guerilla warfare, they'd even inflict some casualties against the enemy but it's unlikely that in the end they'd succeed against an army that is professional, highly skilled, better equipped, has better offensive and defensive capabilities, knows a lot more about tactics and logistics and has trained for this type of situation on a daily basis.
Are they going to destroy their own infrastructure?
Would they even consider it their own infrastructure? Or would they consider it infrastructure currently held by rebels, which needs to be either seized or destroyed?
Do you think the real men and women of the military would follow orders to destroy its own hometowns and families?
I suspect a lot of them would destroy towns if they we're told that these are now enemy bases. This has been repeated in many parts of the world throughout the history, even recent one. If they wouldn't, they'd be defectors and it really wouldn't matter whether the war was fought with modern weapons or sticks and stones.
A student came to his master.
"Great master" he said "You are wise and know many things. But tell me this: What is the sound of one hand clapping?"
The master slapped him.
At that moment, the student attained enlightenment.
I'd wager Dickens didn't have anybody stand over his shoulder, watching if he's delivering page after page at a fast enough rate.
I wish there was a service where you'd send a url of an article such as this one and it'd spit out a summary with only the relevant data and without all the surrounding cruft. Something like a tl;dr for this type of articles.
Not only that, but consider how many jobs we could create if only we banned the use of combine harvesters, tractors, various machines in factories all over the world etc.
Agreed. I especially enjoyed the lectures which are, fortunately, also freely available: https://ocw.mit.edu/courses/electrical-engineering-and-compu...
"forced to live there" is exactly the same manipulative language being used shamelessly here. You should really consider avoiding such use as it detracts from your argument.
Fair enough. What would be another way to say that a person is denied living in any country other than the one of their origin?
I'm just considering a not unlikely scenario where a smart, capable person wants to get away from a country ruled by a corrupt or oppressive government. What if the majority of the people continually vote for such a government and this smart (strong, as you put it) person sees no chance of that changing in the foreseeable future, should that person be forced to live there even if they don't want to?
What if a person doesn't want to live in their country of origin? Should we condemn them to live there anyway?
The whole point (or rather, one of the points) of Java and .net are that they are NOT compiled to native code but to bytecode so that you can write code once and then run it on many different systems without having to compile it again.
What I learned from the last chart is that Clojure devs earn the most money regardless of whether they use spaces or tabs. Being an Elixir programmer also pays off nicely but for heaven's sake don't use tabs unless you want to earn only half as much as you could if you used spaces.
I would expect that initiating a payment from your account directly from code would be forbidden by the platform itself. I'm thinking about this more in the terms of hooks that get called when a payment is received or sent. In essence, what do I want to happen when I'm sending or receiving money?
Replying to myself here because I can no longer edit my comment. Just wanted to say that, while this is potentially a huge thing, there are certain things that need to be taken into account.
First of all, there's heavy regulation when it comes to banking software. There are laws and bank regulations that are here to prevent people from losing their money and/or suing the bank for some reason or another. Root needs to take great care to ensure that the software written by their users stays within the boundaries of south african law and their own bank regulations.
Second, the software absolutely needs to be reviewed not just by people from Root but also by a reputable independent consulting company.
Third, Root mustn't allow direct initiation of transactions from their platform to prevent potential disastrous effects due to bugs. You should be able to write code that does something when the money is being received or sent from your account but not code that charges your account.
Like you, I thought that this was pretty unimpressive at first. It seemed to me that this is just a regular bank account and that they expose some API and you have to program the web/mobile app yourself. The homepage is rather uninformative and I didn't really get what this is about until I went to their press release page: https://root.co.za/press/. Then it hit me. You can write small pieces of code, sort of like small apps, to manage what happens when you send or receive money. What's even more interesting is that you can share these apps on their Root platform, sort of like an app store for internet/mobile banking functionalities it seems.They mention some examples of what you could do and this looks seriously interesting now.
To me it looks like what a person living inside a Standford Torus would see:
I've been long enough here on HN to remember how people used to laugh at Java in the comments, bemoaning the time it took to set everything up before you can start working with it (although it wasn't really that much trouble then, and it certainly isn't now) compared to how easy it was to start working with Javascript ("Hey, all you need is a browser and an editor"). How the tables have turned.
So Zuse's achievement is solely having physically built the first working computer, while Babbage's machine was never realized.
And the fact that Z3 was based on binary, while the analytical engine wasn't.
To anybody interested in everyday lives of people in ancient Rome, I can recommend this three-part documentary by professor Beard:
https://en.wikipedia.org/wiki/Meet_the_Romans_with_Mary_Bear...
I'm sorry, I still have trouble understanding why you did what you did? What was the reason?
As a long-time HN user I completely agree with you, but it's worth mentioning that pg specifically stated that it's perfectly fine to use downvotes for disagreement (if I find the comment where he said that I'll edit my post and put a link to it). So, while I don't think that downvotes should be used for disagreement, if the person that created this site says that it's ok, then I guess it's ok.
EDIT: Ah, here it is: https://news.ycombinator.com/item?id=117171