Live data from Hacker News

Being confidently programming language agnostic

blog.bradfieldcs.com

111–120 of 131 posts

Re: Being confidently programming language agnostic

#111
I'm glad that the trend is slowly going towards hiring generally smart people instead of a "PHP/Rails/Python programmer". I'd say, better hire people that can easily adapt something new if needed rather than saying "I am a PHP programmer, I don't want to do this new project in Ruby." (I met my good share of people in previous companies thinking in that way to the extend that they would quit if asked to write in something else than what they were hired for)

In my current company they were looking for a Go programmer. I never wrote a single line Go before, yet they hired me and now I am writing Go. Then we had a deficit in the iOS team, so I learned Swift and now work on our app.

Re: Being confidently programming language agnostic

#112

Earlier quoted context omitted.

Real Programmer can write FORTRAN programs in any language. That's why Haskell exists. It's the computer scientists' best attempt so far to create a language in which it's impossible to write FORTRAN programs.

They accomplished that by creating a language in which it's impossible to write programs in general ;)

For what definition of "impossible". All I need is Turing completeness and time.. ;)

Re: Being confidently programming language agnostic

#113

Earlier quoted context omitted.

They accomplished that by creating a language in which it's impossible to write programs in general ;)

For what definition of "impossible". All I need is Turing completeness and time .. ;)

Ladies and gentlemen, this is a real programmer :).

Re: Being confidently programming language agnostic

#114

I've been programming for 20+ years, and recently moved over to Python. Sure, I could code on day one and figure out how to get programs working pretty easily. But the nuances with it are still things I need to work on a lot. I still don't program Pythonicly, I program like a C programmer writing Python. In fact, I probably program in all languages like I would a C programmer, and that's not good enough, in my opinio…

Additionally, if you really want to get productive, you'll also need to get to know which libraries/frameworks to use, and how to use them (idiomatically). This is the most time-consuming tasks, I think.

Re: Being confidently programming language agnostic

#115
post #76

Earlier quoted context omitted.

Just FYI, you can remove all the parameters from Amazon URLs and they still work. EG: https://www.amazon.com/Fluent-Python-Concise-Effective-Progr... You can also emit the title: https://www.amazon.com/dp/1491946008/ works fine.

And yet another trick for shortening Amazon links: http://amzn.com/1491946008

But then the same question as with other short URLs appears: Does amzn.com really belong to amazon.com, or is it a third-party service that may redirect you somewhere else at will?

The point is, I don't care whether amzn.com really belongs to amazon.com or not. I want to check a domain quickly without having to research that kind of stuff.

Re: Being confidently programming language agnostic

#116
post #69

I've been programming for 20+ years, and recently moved over to Python. Sure, I could code on day one and figure out how to get programs working pretty easily. But the nuances with it are still things I need to work on a lot. I still don't program Pythonicly, I program like a C programmer writing Python. In fact, I probably program in all languages like I would a C programmer, and that's not good enough, in my opinio…

It takes a while to get used to the idiomatic constructs of a language. Luckily it's much easier than with natural languages. My first Ruby programs were very Java like. I doubt that my first Java programs were C like, if you use classes and methods it just can't be. No problem with using Python and Ruby together. They are maybe like German and English, close but clearly distinguishable. And Javascript, Perl, PHP, El…

I've noticed my Elixir experience bleed into how I write Ruby. I'm much more likely to avoid creating objects if I can solve things with a pure function in Ruby now.

And for things like pattern matching, I've played around with doing similar things in Ruby, too. For example, in Elixir you might write a method that should only ever return `:ok`, and a pattern match like this...

    # if :ok, nothing special happens
    # if not :ok, "MatchError" is raised
    :ok = Fooer.foo(foo)
So in Ruby, I played around a watered down equivalent like this

    def ok!(obj)
      raise "match error" unless obj == :ok
    end

    # if :ok, nothing special happens
    # if not :ok, "match error" is raised
    ok! fooer.foo
One day I wrote a bunch of Ruby code of 'ok! ` all over the app, and it made getting the program to run correctly a lot easier (at a time my brain was acclimated to Elixir). I don't know if I'd ever try getting developers on a Ruby project to embrace Erlang/Elixir's "let it crash" mentality, which might not be a great idea for a number of reasons, but it was interesting to me that I had even considered it as an option. Before writing Elixir code, writing a program that crashed on purpose was an alien concept to me.

Re: Being confidently programming language agnostic

#117

I used to arrogantly think I could be productive in any language given a week or so to adapt. I often used the phrase "a good dev is a good dev in any language." That belief was rather abruptly broken when I joined a project using C++/CX it was so far outside of my previous experience that I had a really bad time of it. I happily picked up the actual language very quickly. It was the surrounding ecosystem of compiler…

> I happily picked up the actual language very quickly. It was the surrounding ecosystem of compilers, build tools, debugging tools, libraries, standard patterns and best practises that was too deep for me to become proficient in.

I felt the same way trying to learn Haskell. The language itself isn't that hard to learn, but just try and go read some code for one of the large open source hs code bases (like Yesod, etc.) :)

I also remember being put on a C++ project after being away from the language for years (C++ 11 was... different from the C++ I used back in the early 2000s). I was completely lost for a while :O

On the other hand, some languages are easy to pick up quickly (like Go), and some just 'click' for some people (as Clojure did for me).

Re: Being confidently programming language agnostic

#118

I've been programming for 20+ years, and recently moved over to Python. Sure, I could code on day one and figure out how to get programs working pretty easily. But the nuances with it are still things I need to work on a lot. I still don't program Pythonicly, I program like a C programmer writing Python. In fact, I probably program in all languages like I would a C programmer, and that's not good enough, in my opinio…

Been wanting to move over to python myself. Love the language but don't feel I write pythonic code, so I appreciate your comment.

Re: Being confidently programming language agnostic

#119
post #7

I think nowadays people spend too much time learning new tools and too less time doing something really valuable using that tools. I wish I had only one language, so I can concentrate on more interesting things rather than learning yet another random set of operators and library function's names.

While using fewer, better languages for more is fantastic, I doubt you really want a single language. Try replacing shell, Structured Query Language, and C with the same language. I won't say that it can't be done, but I think you'll lose a lot if you succeed.

I think you gain more than you lose. (For myself I have replaced shell, SQL, and C when it doesn't have realtime requirements (which is most of the time) with Scala FWIW). Language boundaries are really high-overhead, and most of the time being able to use the same tools and libraries everywhere more than makes up for a language not being quite as good a fit.

Re: Being confidently programming language agnostic

#120

Earlier quoted context omitted.

Real Programmer can write FORTRAN programs in any language. That's why Haskell exists. It's the computer scientists' best attempt so far to create a language in which it's impossible to write FORTRAN programs.

I dunno, combining the do statement, the forM_ monad, I think I could write some good Fortran. Haskell also appears to have a very interesting form of goto: https://wiki.haskell.org/Compose#Using_Cont With Haskell's advanced type system, could we recreate implicit int/real typing, and perhaps even EQUIVALENCE?

Hat tip for anybody that pushes a MonadGoto into hackage, with the obvious Goto and GotoT implementations :)

Bonus points for also implementing the ComeFrom interface from Python's comefrom joke package!

Post reply on HN