Slashdot Mirror


User: DetriusXii

DetriusXii's activity in the archive.

Stories
0
Comments
67
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 67

  1. Re:I think the important lesson here is... on Anonymous Helps Find Evidence In Gang Rape Case · · Score: 1

    Fuck off. I mean seriously. You don't get to touch a woman's genitals when she passes out. That's rape. The victim plays no part in a rape and you're clearly trying to blame the victim. You're disgusting.

  2. Re:Monads! on The Scourge of Error Handling · · Score: 1

    You've got me interested... but how does it work?

    I hate to be the lazy bum, but since it is your made-up notation would you mind adding in the return value checks and pseudo-code for handler calls to allow some better understanding? Feel free to add pseudo-annotations if that helps your cause 8)

    Thank you for bringing this up! This topic has certainly engaged me more than any other on slashdot in a few months 8)

    Here's a quick example of a monad. It's something that wraps a value where the value can be freely generic while the rest of the type is not.
    So let's use the Option monad in scala. It has two important functions called map and flatMap (map and bind in Haskell). All monads have these properties.
    If I have val a0 = Some(25); val a1 = None;
    map has a type signature of def map[Q, B](f: A => B): Option[B]
    flatMap has a type signature of def flatMap[Q, B](f: A => Option[B]): Option[B]
    a0.map((b: Int) => b + 5) would become Some(30)
    a0.map((b: Int) => b + 5).map((c: Int) => c - 10) would become Some(20)
    a1.map((b: Int) => b + 5) would become None
    a1.map((b: Int) => b + 5).map((c: Int) => c - 10) would become None
    a0.flatMap((b: Int) => Some(b + 5)) would become Some(25)
    a0.flatMap((b: Int) => Some(b + 5)).flatMap((c: Int) => Some(c - 10)) would become Some(20)
    a0.flatMap((b: Int) => None) would become None
    a0.flatMap((b: Int) => None).flatMap((c: Int) => Some(c - 10)) would become None
    a1.flatMap is always None
    There's other monads that also wrap a value. The Promise monad wraps the result of an asynchronous computation so that the maps and flatMaps are chained asynchronously. The Error monad is the useful monad. Instead of having a Java function return a value through the return type or an exception through the throws clause, both return and exception values could be returned through the return type. The error monad is most similar to the option monad, which is called the anonymous exception sometimes. But the error monad doesn't have a zero so it's not quite the same as the option monad with zero of None, or the List monad with the zero of empty list.
    Every List is a monad as it's a structure that wraps a generic value. The value just happens to be indeterminate.
    Monads are just a way to chain events sequentially without having to deal with the background implementations of the structure we're dealing with.

  3. The problem of evil and the problem of free will are actually fairly good disproofs of the existence of God. There's no existing proof for the existence of God that causes my atheism to be a problem.

  4. Re:Seguro Popular -- it's not universal on Near-universal Mexican Healthcare Coverage Results From Science-informed Changes · · Score: 1

    There's some areas where the government is simply more efficient because the data shows that the government is more efficient. Health care and fire fighting services are two areas where the public sectors is more efficient than the private sector.

  5. Re:The Department of Redundancy Department on University of Florida Eliminates Computer Science Department · · Score: 1

    Can we study the same things in other departments without having a dedicated Computer Science niche to go with Computer Engineering, Software Engineering, etc.?

    Not in sufficient depth, at least in my opinion. Complexity theory? Database theory (yes, theory, not just "here's how to write a simple SQL statement)? Compilers? These could all be in other departments, but an undergrad pursuing a degree in another field will not have enough time to study computer science in any respectable depth. Double major is not the answer if CS is spread over more than two other departments. Spreading CS across math and engineering departments deprives students of the chance to become computer scientists.

    I'd like specifics. Which department should handle a compiler? Compilers bring in regular expressions for the syntax, create a parse tree for the semantics, and transform that parse tree into an intermediate pseudo assembly translation and then into the native machine code. I wouldn't trust mathematicians to understand the coding work, I wouldn't trust engineers with the coding work either. Which department should handle database courses? Entity relations, foreign key maps, many-to-many relationship tables, object relational mappers, triggers, and authorization schemas are something that most business departments don't have the technical ability to deal with. A business major acquaintance struggled to understand primary keys using MS Access. How do you plan on the business department to teach PostgreSQL, MySql when most of their students don't have the capacity to learn these DBs and aren't their for their primary purpose to learn new DBs. Which department should teach version control systems? Engineering is mostly pen and paper, mathematics is mostly pen and paper. It's only computer science where application code is built and has the foresight to provide students with version control tools so that the student can understand. Web frameworks and web languages....Once again, business departments don't have the capacity to understand the difference between a POST request and a GET request.

  6. Re:That is what you get with fanboys on Oracle and Google To Finally Enter Courtroom · · Score: 2

    Somewhere at Google is a Java fanboy, they do far to much mission critical stuff in it (while still developing their stuff) for it to be anything but a fanboy reasoning. They even generate their javascript by writing java instead. No people, javascript is NOT a bad language, it is just a different one that requires a different mindset. Writing a program to be able to generate code for one language in another SCRIPTING language... that is just insanity.

    And as has been pointed out, turning Linux into a java only platform is just insane as well. One of the major strengths of Linux is it wide coding support, why on earth would you limit it to just Java a language owned by a rather dubious company before and after (Sun's handling was just as insane) over the countless truly free alternatives? By all means let developers develop in it if they want to but keep your options open.

    No, a fanboy exec has declared Java to be the way and business logic be damned.

    Meanwhile Apple has forced developers to learn their own language and has the more healthy market. Go figure. Where is the java advantage?

    Compile time type checking helps with large applications to reduce the amount of errors. Javascript is an interpreted language with dynamic types and it takes more work to write the application libraries as the application grows. It's not really insane to use a compiler to write javascript if it helps in error reduction.

  7. Re:The problem here... on Tennessee "Teaching the Controversy" Bill Becomes Law · · Score: 2

    ...is that the scientific allegation of spontaneous generation of life has never been proven. Do we have proof of evolution? Most definitely so. Do we have proof that mixing together chemicals creates life? Nope.

    Ergo, until that is done repeatedly under laboratory conditions, atheists, your theory of the origin of life remains exactly that. A THEORY.

    We have evidence of evolution and we have evidence that that mixing molecules together can create organic molecules. It wasn't long ago that chemists thought that organic molecules were somehow special and too complex to create by man. That theory turned out to be false. The evidence we have for evolution is in the fossil record. Fossils aren't continuous data collections, but snapshots left in time. Many fossils get destroyed before they get preserved. But evolution is a framework that explains common features between us and other primates, between us and cats, between cats and lions. Creationism does not explain why us and other primates look similar other than possible that God lacks an imagination. Young earth creationists also can get challenged by astrophysics and geology as there's evidence of an older planet, star, and universe than what creationists as the age of our planet.

  8. Re:Teaching kids to think requires controversy on Tennessee "Teaching the Controversy" Bill Becomes Law · · Score: 5, Insightful

    Try talking to a smart Catholic who can cite Aquinas at the drop of a hat: they can make scientists look like imbeciles because very, very, VERY few scientists have a shred of knowledge about how to debate.

    Why should scientists be impressed by someone that can cite Aquinas? Are scientists supposed to care what St. Thomas Aquinas thought when discussing evolution?

  9. Re:end the debate on Pi Day Is Coming — But Tau Day Is Better · · Score: 1

    start using 366 degrees for a circle, its a lot more precise, and makes pi solvable

    Degrees are an arbitrary unit to divide a circle. It has nothing to do with PI. Units of degrees break when doing calculus because the unit isn't a natural unit to put into cosines and sines. Sines and cosines (and e^ix) take as arguments units of numbers. I still don't get what you mean by making PI solvable. There's nothing to solve about PI. It just happens to be the number that relates Diameter and circumference of a circle.

  10. Re:No null pionters on Mozilla Releases Rust 0.1 · · Score: 1

    I thought that null pointers are necessary in order to terminate a linked list. What you want to avoid doing is dereferencing a null pointer as this is a very bad thing. At least, this what I rememebr from Comp Sci 102. How else can one terminate a linked list other than creating a tag labeled "end" ?

    You can use the Maybe monad to terminate things. case Some(x) => x case None => doNothing() The Maybe monad is type safe and forces the developer to handle nonstandard expectations. When used as a return value, it also specifies that the developer should handle when the function didn't break.

  11. Re:*Yawn* on Oracle and the Java Ecosystem · · Score: 2

    That, and they'll be shifting back once they see what godawful disaster Scala is in terms of linguistic complexity.

    Note to Lift library developers: implicits to implement CSS-style selectors and replacements in snippets is even less cool than C++ operator overrides.

    The Play Scala framework provides a better web framework. It's more natural to understand. I do agree that Lift wasn't intuitive (although I may go back to it at a later point in time). I disagree with the linguistic complexity. A lot of Scala borrows from FP paradigms and FP attempts to reify programming patterns that are experienced throughout a programmer's life. I don't understand what your criticisms towards Scala are considering Scala is more than just Lift.

  12. Re:News? on Paypal Orders Buyer of Violin To Destroy It For a Refund · · Score: 2

    This is wrong. A research article just came up on Metafilter. Apparently, in a double blind experiment where both the musicians and the listeners are listening to pieces, the newer instruments sound better. The Stradivarius sound seems to be a human perception similar to wine tasting myths. http://www.npr.org/blogs/deceptivecadence/2012/01/02/144482863/double-blind-violin-test-can-you-pick-the-strad?sc=fb&cc=fp

  13. Re:Uh oh. on Juror's Tweets Overturn Trial Verdict · · Score: 1

    Nullification is a jury ignoring the law in favor of their personal preferences. That is not what a jury is there to do. They are not charged with weighing what the law says, only whether it applies and whether the defendant is guilty of it. If nullification is used, then the defendant goes free and nothing is changed. The next guy who breaks that unjust law might not be so lucky. That's not justice. "The system" has the appellate process for determining the rightness and wrongness of laws. The only way to change a wrong law from the jury box is to vote to convict so that the case can be appealed up the chain.

    You know it was used as a last resort to prevent union strikers from going to jail merely for being union strikers. During the 1930s, police would harass and beat socialist protesters for expressing the view that the government needs to intervene in the economy. It's not justice to have the government arrest you for expressing a dissenting opinion and jury nullification was used as a form of judicial protest against overbearing states.

  14. Re:Chiroplastin is far superior.. on 'Alternative Medicine' Clinic Attempts To Silence Critics · · Score: 1

    That's only if you're an Ork in the WH40K universe.

  15. Re:I have problems with this on Muslim Medical Students Boycott Darwin Lectures · · Score: 1

    How is a multiverse intuitive over probability densities? Not every event is equally likely. If there's an eighty percent chance for an electron to tunnel through a barrier, it's not very intuitive to state that there were eight universes created where the electron tunneled over the two universes where the electron did not tunnel. Some quantum mechanical probabilities involve square roots so even fractions are tossed out the window when trying to describe quantum mechanics in a multiverse model. Please correct me if I'm wrong, but a multiverse explanation of quantum mechanics seems to take away from a full understanding of quantum mechanics.

  16. Re:The real problem.... on China To Cancel College Majors That Don't Pay · · Score: 1

    Bear in mind that the situation is bad for only the bad programmers. When I did computer science, there were people in computer science that could not write code and had no passion for the subject. My co-intern was terminated after three months because she couldn't install an OS from disk and the only language that she had worked with previously with Visual Basic. One of my friends was my group project partner and I cringed when I saw him write for loop increment counters as class member variables. These are the people I'm competing against and I feel somewhat safe knowing that the universities are producing CS holders that are garbage in the workplace.

  17. Re:They're impossible to fire on Federal Contractors Are $600 Screwdrivers · · Score: 1

    Where's your citation for that?

  18. Re:Overhead and profit margins on Federal Contractors Are $600 Screwdrivers · · Score: 2

    Actually, from the other citations, it would actually cost the government less to insource their work. The current evidence points to government contractors as inefficient ways to accomplish work.

  19. Re:Which speed of light on CERN Experiment Indicates Faster-Than-Light Neutrinos · · Score: 1

    Einstein discovered relativity by using educated gut feeling, not experiments.

    No. Einstein made use of Maxwell's equations to deduce that the speed of light was constant under all reference frames. The second order PDE equations relating the time variance of the electric field to the spatial variance of the magnetic field has the speed of light as a constant. He didn't have a gut feeling.

  20. Re:Progress on UK Joins Laser Nuclear Fusion Project · · Score: 1

    I have one criticism with the graph you were shown. Energy output to input is can be constantly rising, but the next data point may not also show more gains in energy production. Tokamak reactors are based off confining plasma in a magnetic field. And while fusion reactors will require higher magnetic fields to achieve stable fusion production, it's not generally known how to produce those higher magnetic fields. 40 T is the maximum so far for magnetic field strength, and it ends up collapsing the solenoid in a short amount of time. There doesn't seem to be any materials that can handle repeatedly such high magnetic field strengths.

  21. Re:I had a MSc in for an interview on British CS Majors Doing Badly In the Jobs Market · · Score: 1

    My experience with a guy who recently received a MSc from a London university is the following: On his CV he writes that he has a good knowledge in PHP, MySQL and CSS and also passed a Zend exam in PHP 5.0. Based on this he would be a good fit what we are looking for. His final project was a web-based library (as in book-lending) system making use of PHP and MySQL. My colleague and I (who both have ~20 years experience each in IT and software development) took him out and asked some related questions. But to our suprise he hardly knew fcukall. PHP questions: - "What is the difference between " (quotes) and ' (apostrophy) in string assignment?" (which should be quite basic an essential knowledge) Answer:"Uh, I don't know." - "In your library system, you say the username is unique. How do you prevent that two people sign up with the same name at the same time?" (should have a unique key on the username) Answer:"The front-end checks for this." - "Have you heard of SQL injection?" Answer after some seconds of thinking:"Yes, I have used it in my project!" - "In OO, what is inheritance and encapsulation?" (all this OO stuff is for sure part of a Zend PHP 5.0 exam) Answer:"I don't know"

    Databases: - "What is a left outer join?" Answer:"Sorry, I don't know" - "What are unique keys and indices?" Answer:"I don't know" - "Do you have any knowledge about Stored Procs?" Answer:"no"

    CSS: - "What is the difference between absolute and relative positioning?" Answer:"Sorry, I don't know"

    Eventually we ran out if really simple and basic questions. And to us it seems nowadays those MScs fly off the shelf towards everyone who can pay the tuition fees.

    I was an intern at a mobile development and web application company. I liked coding when I was in computer science and I can attest that there are people that simply suck with code. My boss was interviewing for a senior developer (I didn't want to be there in the long term as I felt the group was overvalued) and I gave them an interview question "State the difference between a GET request and a POST request" as one interview question. My supervisor liked it. He asked it. Two of the eight people interviewing for the position couldn't answer the question and this was for a internet based company.

  22. Re:Oracle? on James Gosling Leaves Google · · Score: 1

    They're also useful in creating Functors in statically typed code. Foldleft and map from the functional languages can be mimicked by using generics. I think the programmer complaining about generics should have his opinion discarded. It's quite clearly wrong.

  23. Re:God fearing men... on After Rick Perry's Stem Cell Treatment, Misplaced Enthusiasm? · · Score: 1

    Because having consensual sex without pregnancy is much more than damaging a teenager economically at a point in their lives when they aren't prepared for the responsibilities of children.

  24. It's like you've made it a goal to not learn on Ask Slashdot: Am I Too Old To Learn New Programming Languages? · · Score: 1

    What mythical force prevents you from reading and spending time on a new subject? It's like an obese person asking if they're too fat to lose weight. Having said that, C# and Java can be similar to C but they can also be different in large ways. C# has delegates. They're anonymous functions that can be passed around. Java has anonymous classes. They're classes that are defined at runtime that can be passed around. They both make use of generics. You'll need to know about polymorphism to understand that you can pass subclasses as arguments to functions and that you can return the subclass when the function had the return type of the parent class. They both borrow from the functional style and it may be alien from your perspective. But Ruby, Javascript, Python, and Scala are all functional and Python is becoming a fan favourite. The functional style makes for less lines of code to accomplish the same task as the procedural style.

  25. Re:Maybe a better candidate on The Most Expensive One-Byte Mistake · · Score: 1

    without null, I can't imagine what would have been the case for implementing so many programming constructs today. Most languages have some type of isempty() which can b seen as a continuation of null, and I for one wouldn't want to implement any sort of list without it. Programming in assembly, you don't get NULLs (at least not MIPS) and that's one of the difficulties (among many).

    I like using the Scala's Option Monad (it's the Maybe Monad in Haskell). Nulls are bad because the compiler can't usually check against them, and sometimes you can't tell if a called function will return NULL as its return value. With the Maybe monad, defined as Maybe q = Just q | None, the compiler will check when Maybe is being passed around and give warnings saying that the None subtype should be handled. It works elegantly to handle issues where sometimes NULL has some semantic meaning but also catches NULL errors at compile time rather than catching NULL errors at run time.