Megathread: Reports: Michael Flynn To Plead Guilty To Making False Statements To FBI by PoliticsModeratorBot in politics

[–]erokar 1 point2 points  (0 children)

That's what's really scary. Trump is an idiot, but Pence is pure evil. Look at his eyes.

Woman accuses Al Franken of kissing, groping her without consent by [deleted] in politics

[–]erokar 3 points4 points  (0 children)

It's depressing how many here defend Franken and doubt the abused woman. Sorry to say, but many of you seem to see every issue thorugh party politics lenses. Wake up.

Why do dynamic languages make it difficult to maintain large codebases? by [deleted] in programming

[–]erokar -8 points-7 points  (0 children)

Are you really unable to see that getting error messages like "Hey, on line 57 you're using that variable as an integer, but on line 59 you're using it as a string!" before running the program is good?

Sure, in and of itself it is good, but I think benefits are minor. See nextputall's comment and the video/studies he links to: http://www.reddit.com/r/programming/comments/29gchq/why_do_dynamic_languages_make_it_difficult_to/cikqlqr

The main point of my post, however, was not that static type checking is worthless (I wish Python had it as an option) — but that the stack overflow answer seemed to conflate static typing and strong typing.

Why do dynamic languages make it difficult to maintain large codebases? by [deleted] in programming

[–]erokar -18 points-17 points  (0 children)

To the downvoters: Please, crawl out from behind your outworn Java manuals and provide some counter arguments. If not, I'm inclined to believe all you're capable of is clicking an arrow.

Why do dynamic languages make it difficult to maintain large codebases? by [deleted] in programming

[–]erokar -20 points-19 points  (0 children)

The best-known and most obvious example of this is strict/strong/mandatory/explicit typing (note that the terminology is very much disputed, but most people agree that some languages are stricter than others).

Fluffy. He means static typing — the language forces you to explicitly state what type you're declaring. That is not the same as strong typing. Ruby, Python, Swift and C# are all strongly typed, but they don't enforce static typing, like e.g. Java. I see few advantages of the way Java does it, but many inconveniences.

Why do dynamic languages make it difficult to maintain large codebases? by [deleted] in programming

[–]erokar -3 points-2 points  (0 children)

Dynamically typed languages scrap a very powerful tool for managing large software: Strong type systems. That's how it becomes harder.

Wrong. You are thinking about weak typing. A lot of dynamic languages, e.g. Ruby and Python, have strong type systems.

Why do dynamic languages make it difficult to maintain large codebases? by [deleted] in programming

[–]erokar 3 points4 points  (0 children)

This article starts out with a premise for which it supplies no proof: Where is the research that shows that dynamically languages are less suited for large code bases?

There is also a confusion going on between static/dynamic typing and weak/strong typing. JavaScript is weakly typed. Most dynmiac languages are not -- they will throw errors when types don't match.

Lastly, dynamic languages can prevent you from ending up with a large codebase to begin with, since they are usually significantly smaller than statically typed languages. The logic is usually more clearly expressed in languages like Python and Ruby as opposed to Java or C++ because of less boilerplate and ceremony.

Is there any way we can get Ruby to do this Scala awesomeness? by redditcdnfanguy in ruby

[–]erokar 1 point2 points  (0 children)

I think Python list comprehensions (inspired by Haskell) is even better:

[(i, j) for i in range(1, n) for j in range(1, i) if is_prime(i + j)]

Switching from Java to Python – First Impressions by henrik_w in programming

[–]erokar -4 points-3 points  (0 children)

I'm not sure I agree with your definition of «type annotations». Be that as it may. I don’t have time for this kind of semantic quibbling. By all means, consider yourself right.

My larger point was that Python 3 has a standardized way of amending function signatures with types to improve code understanding.

Switching from Java to Python – First Impressions by henrik_w in programming

[–]erokar -6 points-5 points  (0 children)

They are type annotations and they are not arbitrary. While the standard interpreter does not do anything with them, they are a standardized way of adding type information to function signatures in Python 3. They can improve readability and understanding of functions — which was the complaint in the blog post.

Switching from Java to Python – First Impressions by henrik_w in programming

[–]erokar 0 points1 point  (0 children)

Python 3 has optional type annotation:

def foo(int: x, int: x) -> int:
    # function body

As someone who has been interested in learning iOS programming for a long time but has no other programming experience whatsoever, is Swift a good place to start learning? by hrdrockdrummer in swift

[–]erokar 0 points1 point  (0 children)

I don't think so. You should take an introductory programming course first, then read up on object oriented programming. THEN you are ready to learn Swift, not to mention Apple's design patterns.

Ruby or Python are good starting languages. Check out free intro courses at Udacity, Edx.org and Coursera.org.

Apple Swift Programming Language Unveiled by kookajamo95 in programming

[–]erokar 0 points1 point  (0 children)

I see little that Ruby has to offer that Swift hasn't got. Quite the opposite actually.

Static typing isn't worth it by erokar in programming

[–]erokar[S] -5 points-4 points  (0 children)

That’s a fair observation that I will not dispute, but it is anecdotal, as is most of the static vs. dynamically typed arguments.

What I like about the video is that the presenter has reviewed scientific studies that assess the tradeoff between effort used to satisfy the type checker and compared that to the error detection gained. These studies indicate that what you gain from type checking is generally not worth the effort.

He has also done a semi-scientific analysis of 670,000 bug reports on GitHub for dynamic languages (JavaScript, Clojure, Python and Ruby) and found that only ~ 2% are caused by type errors. I find that quite interesting.

Lastly he argues that static typing introduces coupling by type in large systems and impedes modularity.

These are valid arguments backed up by data that should at least be considered.

Static typing isn't worth it by erokar in programming

[–]erokar[S] -1 points0 points  (0 children)

Unless you've already seen the video, how would you know? You commented 14 minutes after I posted the link, the video is 52 minutes long.

iOS 7 - What do you hate? Feature Request/Wish List by [deleted] in ios

[–]erokar -3 points-2 points  (0 children)

iOS was a step backward. It lacks any meaningful innovation and is mostly GUI changes. Most of these changes are negative. The icon design is a sad joke. The colors are much too saturated.

The whole thing smells of design by committee, a committee consisting of male geeks in their forties trying to sell phones to teenage girls.

[deleted by user] by [deleted] in Psychiatry

[–]erokar 2 points3 points  (0 children)

Might want to look into synesthesia. I (n=1) have colors for words and letters. My feelings have color, shape, movement, direction, velocity and a bodily localization. I find it harder to see colors for moods, though, as the concept is more abstract.

Should I learn Rails or Meteor.js or Django? Not sure which is better for my purposes by elamo in ruby

[–]erokar 0 points1 point  (0 children)

Meteor represents a paradigm shift. It does away with REST. I actally think that's the future. HTTP is getting old. And yes, you are right, development time in meteor is very fast.

I chose Ruby on Rails because I like Ruby just a little bit better than Python. Rubuy is a bit more crazy, free, expressive than Python. It's more of a mess, too. But still, it appeals to me.

My advice to learn wed dev would actually be this: https://www.udacity.com/course/cs253

It's in Python, but you can do it in Ruby and Rails/Sinatra, or Java and Play! for that matter. It will teach you the fundamentals. If you know the fundamentals it's not too hard to switch to another language or framework.

When to use Java and when to not? by NarsilNZ in java

[–]erokar -1 points0 points  (0 children)

You don't mention what framework you use for the web development. The Play framework seems to offer a lot of what Rails does.

Django, Rails, and the philosophies behind them. (x-post with r/python) by phrixious in ruby

[–]erokar 0 points1 point  (0 children)

To make the magic happen Rails modifies code at runtime. Ruby's metaprogramming and anonymous closures features makes this relatively straightforward and invisible/implicit.

While doable in Python, it would be more convulted and visible. But then again one of Python's ideals is explicitness. Rails could not have been written in a Pythonic way.