What programming language should you learn?

APL. Because if you get a job on that basis, you will really have something to put in your memoirs.

2 Likes

And also, you get to have an awesome keyboard!

iā€™m a tab person. I also keep { on the same line. Iā€™ll typically keep my code as vertically compacted as clear readability allows, clear readability being the key factor.

BUTā€¦when working on a project with other developers or existing code, if there is an established convention, Iā€™ll match that for consistency and the sake of future developers.

I do have some code cleaning utilities that can convert spaces to tabs, drop or raise { etc. So if I hit code with mixed styles Iā€™ll convert it all to whatever the dominant style for that project is.

2 Likes

ruby is the opposite, you can write very concise code and it is mostly human readable. ruby is a beautiful language, but Iā€™ve only ever been able to use in IRL in RoR projects. Same with python, most of my projects have been Django, I havenā€™t had the opportunity to use it too widely outside of web applications.

perl can sometimes be human readable, but it is also possible to write code that no one else will likely ever understand fully unless they are programming gods. Iā€™ll often write perl for myself for manipulating data. To me perl is a utility language.

java i dislike, i tend to dislike any programing language that makes me type tons of cruft to get things done, the more concise the better i tend to like developing in it. I choose c# over java if I have the chance, but really Iā€™m meh about both.

C and C++ I love but I seldom take those types of jobs these days.

Also, Regualr Expressions / RegEx while not strictly a language itself is a gift from the computer gods.

4 Likes

No tabs, no comments.

Code is hard to write. It should be hard to read, too.


Actually, when I did write code for a living, the standard was (3?) spaces.

1 Like

6 Likes

Most of the text editors / IDEs I use have tab set to 5 spaces when you choose to use spaces.

@OtherMichael LOL! :slight_smile:
Not really an important reason but with languages like javascript, every space is a character, using spaces makes the resulting file size larger. Also less typing. Its all about the efficiency haha.

also, with tabs, each programmer can set their IDE to use the desired number of spaces for each tab, so those crazy people who think anything other than 2 is the correct number wonā€™t force me to reformat their code every time I open one of their files.

3 Likes
1 Like

The answer to ā€œwhat programming language should you learnā€ for someone who wants to program seriously (either professionally or as a hobby) is, and remains, ā€œas many as possibleā€. The answer for someone who doesnā€™t is, generally, ā€œanyā€ (although some languages are easier to approach than others and make the first few steps of learning easier ā€“ something that will help some people and put off others).

I get a lot of hate on HN for harping on this topic, but itā€™s something that a lot of beginners donā€™t realize. Itā€™s not just a matter of choosing the right tool for the job (although thatā€™s part of it); itā€™s a matter of knowing the field. Someone who is really good at front kicks but doesnā€™t know how to form a fist correctly canā€™t pass himself off as a karate expert, no matter how good his front kicks are, because in order to reach that stage you need to know a variety of techniques, how they work together, and when each is appropriate; yet so many programmers learn one language and then call themselves ninjas.

And, ultimately, if you cannot determine that the tool you are working with is the wrong tool for the job (which you canā€™t if you arenā€™t familiar with enough tools to happen to know a better one), you cannot do the job well with the tool you are forced to use. (To mix metaphors again, you can definitely undo bolts with a vice grip, but when doing so you benefit from knowing how to use a monkey wrench ā€“ in which you benefit from understanding why you should be using the right sized wrench in the first place. If you understand the mechanics of stripping bolt heads, and you have the tactile experience of determining the right sized wrench for a bolt, you can leverage that to use a monkey wrench; in vice grips, you have a less convenient angle so you have to modify the technique you applied to the monkey wrench in order to avoid stripping the bolt-head. Itā€™s exactly the same with programming: if youā€™re forced to use java to solve a problem that would be better solved in scheme, you simulate the things that make the problem easier to solve in scheme, then you solve the damned problem.)

Luckily, the more languages you know (and the bigger the variety of languages you know) the easier it is to pick up new languages. Iā€™m routinely expected to write code for work in several languages that I would argue I donā€™t know at all (this week I had to work in both scala and perl; my experience with scala is limited to about three lines of code I wrote for a school project in 2010, and my limited experience with perl is shrouded by decades of incoherent rage against Larry Wall), because Iā€™ve learned how to learn languages and Iā€™ve become skilled at learning enough of a new language to perform a task.

Large projects, if they are well-designed, are often polyglot projects ā€“ people use the appropriate language for each piece (or, more frequently, the wholly inappropriate language they happen to prefer), and then the pieces are bound together through some relatively flexible mechanism. If you know enough languages, you can work on all the parts of such a project (including the ones in languages you donā€™t know); this makes you valuable: if the entire development team gets hit by a bus you can take over!

3 Likes

Yup, provided you live long enough to write 'em. Do NOT take a job maintaining legacy APL code. If you absolutely must do such work, toss the old code and replace it with your own. APLā€™s reputation as a write-only language is well-deserved. That chap with the brains oozing out his ears and smoke wisping from his empty eye sockets? That could be youā€¦

2 Likes

Awesome. I hadnā€™t seen that.
I have seen the BrainFuck programming language which is turing complete.

This is the classic Hello World in BrainFuck:

For anyone interested here is the Esoteric Programing Language archive.
These would all be good places NOT to start. :smile:

Speaking of which anyone want to write a language called Emoji that uses all Emojiā€™s for programming?

2 Likes

When taking over as a primary maintainer for some piece of code, I have been known to experimentally determine the number of spaces the fool who originally wrote it used for indentation and then use sed to convert the entire codebase to tabs ā€“ sometimes producing commits in the millions of lines. Because if you are using spaces for indentation, literally nobody can tell how many spaces you are using (because using spaces for indentation is indistinguishable from having inconsistent indentation, outside of languages like python that autodetect and throw errors on inconsistent indentation), and itā€™s extremely likely that someone later miscalculated the number of spaces you are using and introduced inconsistent indentation, even if you happened to remember.

(It doesnā€™t help that I work with people who legitimately support both mixing tabs and spaces in indentation and using half-indents in certain places. The person who sits next to me at work prefers two-space tabs and will half-indent line continuations, hard-wrap on 40 characters, and right-justify debug prints. And prefers to use noops for comments over actual comments.)

2 Likes

Thatā€™s it. I am going to retire, grow a huuuge beard, smoke a long pipe, and seriously.only.wear. tweed. And write perl.

All my posts will be on making regexs look nicer and more like sheep, but not more perforamt.

5 Likes

Writing APL isnā€™t that hard. As you point out, the trouble is reading it. Itā€™s the original write-only language.

1 Like

#Hasnā€™t anybody heard of a linter?

2 Likes

Got one in my clothes dryer. :wink:

2 Likes

This topic was automatically closed after 5 days. New replies are no longer allowed.