Become a fan of Slashdot on Facebook


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:Idiotic sound bites (Score 1) 742

I'm a Canadian citizen that fully supports the NDP. If I was an American citizen, I would support Bernie in the primary and Hillary in the general as I viewed them both as more competent as Trump. I'm well aware that even if country 1 enjoys full absolute advantage in both goods, then they should still focus on making the good A they're better at and let the other country 2 make the good B that they perform worse at. However, there's a limit to that theory in that there's never infinite demand for any good, so country 1 can produce good 1 at some limit and use their excess employment capacity to still produce the other good. The myth of comparative advantage is that it assumes that a nation dedicating full employment to producing good A will somehow find infinite buyers of good A when actual production of good A is determined by supply and demand curves, not by theoretical comparative advantage utility based arguments.

Comment Re:Nothing to do with emplyment percentage (Score 1) 742

I'm sorry, but the reason the US has been hemorraging jobs and racking up trade deficits is because China is not at full employment. So people move their manufacturing to China as China has an absolute advantage in wage and with China not being at full employment, it can continue to suck in more industries from other nations. Once China reaches full employment, then we can discuss comparative advantage, but comparative advantage doesn't apply when both nations aren't at full employment. You can't just brush away the concept of absolute advantages under the first year economics idea of comparative advantage. If comparative advantage was actually working, the US wouldn't be running trade deficits persistently for several years.

Comment Re:Idiotic sound bites (Score 2) 742

Agreed. I'm guessing that the average Trump voter has never heard of Comparative Advantage.

Comparative advantage is only useful when both countries are at full employment. China is not at full employment and so the absolute advantage China has starts kicking in.

Comment Re: This is stupid (Score 1) 89

I should clarify that I was trying to talk about the Option<A> It tends to give more type information. Some functional programmers believe that the output of the function should only be returned in the return value and not through things like output parameters. But it's still just a style difference. Even throwing exceptions is no different than having a Either<Exception,Value> foo(int parameter) defined. I would agree that the non-generic Option monad returns no useful information, but the Option<A> tells you what potentially the output of the function is in one place.

Comment Re: This is stupid (Score 1) 89

Option.None is useful to indicate that the value is optional in type signatures or that the return value is optional in type signatures. An API documentation that has public Option foo(B b) indicates that the B is a pure value (is not optional/not null) and that the return value has the potential to not be set. public A foo(B b) would indicate that the return value is not optional and that a meaningful value will always be returned. Option also handles primitives because null can't be assigned to primitive types, likes integers or doubles. An example would be searching a list of primitives. public Option find(List primitives, Func predicateWhereCondition) means that the item in the list matching the where condition may not be found. The classic method of searching usually defaults the value to return value to -1 in public int find(List primitives, Func predicateWhereCondition) when the item isn't found, which is nonsensical when the list can contain negative integers.

If you don't want to unwrap the value, then why aren't you returning the Option type in the return type signature? When you litter your code with foo.unwrap(default), you're being forced to handle the missing foo values. Developers forget to write code on every foo return because they assume that the value is pure, meaning that public List foo() will always return an empty list rather than a null value.

Java has checked exceptions. C# has unchecked exceptions. Option types are similar to Java's checked exceptions (except checked exceptions are more like the semantics of the Either monad). You're not forced to catch the exception. You can throw the exception further up the stack if it doesn't make sense to catch the error. You're not forced to unwrap the Option type. You can throw it up the chain. Why shouldn't your function have the return signature of Option.None if you don't want to deal with unwrapping at the level you're unwrapping your Option types at?

Comment Re: This is stupid (Score 1) 89

It's actually not. None can considered a subclass of the class Option. It gets the methods defined on Option and one is forced to handle unwrapping the value and placing a default when unwrapping the value. Null have no extra behaviour on them. They can appear at any time and programmers can occasionally forget to check if the value is null. The compiler can help with the Option monad. It can't help catch missing null checks.

Comment Re:Some good, some bad (Score 1) 427

I'm sorry, but unwrapping the Optional class is simply better than directly checking for null result. People forget to null check and not null checking will cause the program to crash. It is more difficult to forget to None check on a Optional class. The Optional class is a type that's caught by the compiler at compile time. Null checking can only be caught at runtime. Missing if (variable != null) statements don't get noticed by the compiler. Being forced to unpack the result is what you need to do everytime you deal with nullable values and most developers are going to forget null checking once in a while. The Optional class also gives a better meaning to element searching as both primitives and objects can be wrapped in the optional class. Searching an array of primitives for a found result previous to Optional would require a default value to be passed when nothing is found matching the search predicate It's nonsensical. Searching an array of primitives with an Optional construct defined let's the API return None, which has better meaning for elements not found.

Comment Re:Scrum Was Never Alive (Score 2) 371

I want to also add that even though scrum says that the scrum leader should be rotated, the project manager always tends to insert himself into the scrum leadership role (because, they wouldn't have a role otherwise). So rather than the scrum team being a team of purely developers leading developers, we have the programmers leadership abilities suppressed just so that the project manager can be visible as a leader/

Comment Re: basic health insurance for all is needed maybe (Score 1) 177

Please have some evidence citing your claims. As is, the socialist health care systems save their citizens more money than American's private health insurance system. The bureaucracy for payment collection is eliminated under the socialized health care systems. And a nation's military funding has no bearing on their health care funding. American's still pay more of their GDP in health care costs compared to Canadians and Europeans.

Comment Re:Wait, what? (Score 1) 361

Monsanto goes after farmers who use Round Up Ready on their farm fields, not farmers who grow the Monsanto seed. Farmers are free to use any other pesticide on their crops and Round Up Ready would work against non-Monsanto crops. Only when both Monsanto seed and Round Up Ready are used is there a clear case of willful patent violation.

Comment Re:Because no one else does (Score 1) 260

With lambda functions, my lines of code is shorter. I'm write now having to debug my predecessor's code and he wasn't aware of lambdas in C#. Everything becomes a jump point into another awkward function with the intent obfuscated. Rather than just using Linq and Expression trees, he made his own collection classes with tailored search functions on each function. Not every function needs a name and the intent can be inferred by just reading the function definition from the body of the function.

Slashdot Top Deals

Advertising is a valuable economic factor because it is the cheapest way of selling goods, particularly if the goods are worthless. -- Sinclair Lewis