Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

Comment Re:awkward! (Score 5, Insightful) 121 121

Even more so for the kernel developers that blacklisted the Samsung drives.
These developers should probably be banned from kernel development or atleast banned from making decisions regarding functionality.
Creating code with a bug is human, not doubting your own code and blaming somebody else is stupid.

Comment Re:The three keys on the top-right (Score 1) 657 657

Well, I mostly use my computer for checking if I'm still running the same operating system, so I wonder why I never noticed winkey+break before. This combo will save me literally hours every day. Didn't know it could be so incredibly useful. Thanks!

Comment Re: Swift (Score 1) 350 350

I think I'm going to have to disagree with you here.

The ternary operator is just syntactic sugar for an if..else statement, I don't see how this is any different except for prettier (subjective!) syntax. Also ternary is best used with caution. Complex ternary expressions are the embodyment of "Well, that escalated quickly". Also, you seem to be describing MVVM, which still uses all the conditionals, it's just hiding it from you at the expense of flexibility.

I don't like replacing states with arbitrary ranges of a number. In your example you assume some way of knowing in advance the length or duration of something. This is simply not true in many cases and would give a false indication of knowledge. In your example set [not started, arrived] you imply only being able to know the initial and final state, yet the 0.75 seems to indicate a high level of accuracy. These are not comparable situations. If you had only had knowledge of initial and final state, the number would essentially be treated exactly the same, using conditionals. If you had the accurate information to indicate progress, you wouldn't use states in your model anyway because you'd lose information.

All I'm seeing is some rules of thumb and low-level optimalization strategies --examples where a good solution doesn't need to use conditionals-- but no solid argument against the use of conditional expressions in general. I'm not disagreeing with most of the examples you give, but they are very specific and do not seem to support eskewing conditionals in general.

Comment Re:Here's a thought... (Score 1) 305 305

Don't [...] put yourself in a position where others can post embarrassing photos or videos of you online

Seriously... were you ever a kid or a teen yourself, or were you born a boring old grampa?
Doing embarrassing things is what kids do; it's how they learn what not to do.
The problem is hypocritical people who like to pretend they never did anything embarrassing when they were kids.

Comment Re: Swift (Score 1) 350 350

Do you have an example of code without "if" (or similar) statements that is more easily readable than the equivalent with "if" statements would be?

It seems to me the only way would be to either use numerical tricks, which you say you like even less. And to which I would agree (though I've used them on DSP's because true branching would be dramatically slower). Or to abuse loops (which are essentialy "if" statements with "goto"s) or things like the Strategy design pattern.

Comment Re: Swift (Score 1) 350 350

Despite your coworkers being stupid, ignorant or both stupid and ignorant, you still have to write code those coworkers they are able to maintain.

Your code none of your coworkers understand might be "good" on some subjective level, but it's not good in the real world.

Unless you have a guarentee that nobody will ever see your code, you are writing code for other people to read. Ignoring this simple reality is... well... it's ignorant.

Comment Re:Swift (Score 1) 350 350

Well, if a facebook page counts as a "website", I can give you a programming language that everybody can write apps with.
These apps will all look exactly the same and can only display fixed content, but you can program a different title and even a different picture!

Comment Re:Swift (Score 1) 350 350

I'm guessing the language you propose is able to magically assume what the developer wants without the developer having to put it in unambiguous statements?
Programming languages are "obnoxious" because they require absolute 100% precision, and people generally don't like to be anywhere near that precise.
Saying "I want a program that adds up numbers" can have literally millions of completely different implementations.
You could make one that fits the ambiguous specifications perfectly, yet is the polar opposite of what you intended.

But please give a small example of your preferred language syntax.

Machines that have broken down will work perfectly when the repairman arrives.