Live data from Hacker News

Ask HN: If I learn one programming language, what should it be?

news.ycombinator.com

41–48 of 48 posts

Re: Ask HN: If I learn one programming language, what should it be?

#41

Earlier quoted context omitted.

Why do you hate using Python for production tasks?

In my experience/opinion: get over a certain number of lines of code and the type system starts getting in the way rather than getting out of the way. This number is not obvious and is very easy to pass without realizing it until it's too late.

Blackthorn is spot on. It's not enough to just "upvote" it.

Re: Ask HN: If I learn one programming language, what should it be?

#42

Java. Despite what you may hear about it, this remains the number one or two (depending on who you ask) language in use. It has a HUGE amount of libraries available and the standard library (SE and EE) cover a lot of ground.

nada, too much overhead... get something lightweight... you can run python in the terminal.

You are aware that you can also run Java "in the terminal" right?

Re: Ask HN: If I learn one programming language, what should it be?

#43

Earlier quoted context omitted.

In my experience/opinion: get over a certain number of lines of code and the type system starts getting in the way rather than getting out of the way. This number is not obvious and is very easy to pass without realizing it until it's too late.

Hey, not arguing, just curious, do you have some examples of times where the type system has gotten in the way? And what languages you prefer to use for production systems that don't have those problems?

Simple example: Say you're working with an external library. And say you need to work with this function:

    def convert_to_int(val):
        ....
What type should val be? Do you pass the object, or a string representation of the object, or...?

The problem with Python - and non-statically-typed languages in general - is that function signatures don't need to be defined upfront, which leaves it up to the programmer to figure out the inner workings of the functions. This is a huge pain point when working with other people's code.

Python 3 introduced function annotations, which is great. But again, the problem here is that function annotations are opt-in. It's still up to the developer to add the annotations.

Re: Ask HN: If I learn one programming language, what should it be?

#45

Earlier quoted context omitted.

In my experience/opinion: get over a certain number of lines of code and the type system starts getting in the way rather than getting out of the way. This number is not obvious and is very easy to pass without realizing it until it's too late.

Hey, not arguing, just curious, do you have some examples of times where the type system has gotten in the way? And what languages you prefer to use for production systems that don't have those problems?

I can't give concrete examples because it's closed source code. But my personal biggest issue is class inheritance. It just becomes a complete mess. Very difficult to find what is set where, what is overridden where, what gets called where.

I know I'm going to get some crap for this, but for big prod systems I prefer C++.

Re: Ask HN: If I learn one programming language, what should it be?

#46
post #27

Earlier quoted context omitted.

I've had the same thought myself. However, I'm willing to take the risk. Besides, one thing leads to another.

This is not to say that learning one language is a waste of time when you then proceed to another language. But, learning one language isn't learning how to code, any moreso than learning how to punch is the same as learning karate -- you haven't begun learning karate until you have the basics of a wide variety of punches, kicks, and blocks; in the same way, you haven't begun to learn programming until you know the b…

You don't know 'true' mathematics until you study 18th century books in German ... I sense some sort of logical fallacy here.

If you can work with frameworks, write loops, classes, know inheritance, side-effects, polymorphism etc but don't know functional programming, then you're still a programmer in my eyes.

It's a scale imo, everything is relative.

Re: Ask HN: If I learn one programming language, what should it be?

#47
post #27

Earlier quoted context omitted.

This is not to say that learning one language is a waste of time when you then proceed to another language. But, learning one language isn't learning how to code, any moreso than learning how to punch is the same as learning karate -- you haven't begun learning karate until you have the basics of a wide variety of punches, kicks, and blocks; in the same way, you haven't begun to learn programming until you know the b…

You don't know 'true' mathematics until you study 18th century books in German ... I sense some sort of logical fallacy here. If you can work with frameworks, write loops, classes, know inheritance, side-effects, polymorphism etc but don't know functional programming, then you're still a programmer in my eyes. It's a scale imo, everything is relative.

Being a programmer implies a kind of mastery over the concepts, of the type that you only get with experience. You only get that experience by having experience with a variety of tools.

Knowing how to use a hammer doesn't make you an engineer. Knowing calculus doesn't make you a mathematician. Knowing how to make a fist doesn't mean you know karate. Knowing C doesn't make you a programmer. Instead, to be any of these things in any meaningful way, you need mastery of a whole constellation of related tools and techniques and ways of thinking, as well as the practice and experience to make them work together.

You can do a lot of things with a hammer, just as you can do a lot of things with any given programming language -- both are very useful general-purpose tools. A programmer should understand the hammers of the programming world (C), the flathead screwdrivers of the programming world (python), the phillips head screwdrivers of the programming world (SQL), the power jigsaws of the programming world (prolog), the needlenose vice-grips of the programming world (awk), and even some of the nylon jeweler's mallets of the programming world (erlang, haskell, befunge) in the same way that you would expect even a relatively mediocre mechanic to recognize and understand the use of all these tools.

A language is a single tool. Concepts are concepts, and you can apply concepts with inappropriate tools just fine (you can write object-oriented code in c or functional code in java the same way you can remove a bolt with vice grips or hammer in a nail with the handle of a chainsaw).

Re: Ask HN: If I learn one programming language, what should it be?

#48

Why learn a single programming language ? Why not several? and by doing so get an understanding about what programming and computation is all about. From 100,000 feet, most programming languages are similar. When you know several you begin to see the unifying structures they support, and that may give you some insight into how computation is related to problems.

I think learning one sounds hard for someone new, so learning two sounds impossible. Inch by inch...

I strongly disagree. Learning multiple languages imparts understanding and provides an important perspective on what programming is about and how programs work, and how they go together. Languages are, for the most part, easy. What's hard is the other stuff.
Post reply on HN