What programming language should you learn?

I told someone the other day to start by studying C, as its syntax forms the common basis for many languages, but I don’t know if that’s enough of a truism to really help someone today.

I like C# the most of all the languages I use today, but I think that’s due more to my formative years being spent in C/C++ than anything else.

Equally as important as which language is how you’re using it. As you begin to write larger programs, try to study how to do that ~well~, data and program structures that cause the least future pain. And keep in mind, no matter how slick or sharp the tool looks, it can be abused.

1 Like

You quite sorely need that one when all you got is a binary that you have to modify.

Good old times…

1 Like

Such compilers tend to be somewhat ad-hoc and underoptimized.

Why not VHDL?

2 Likes

What do you mean “such compilers”? Are you saying I write sloppy code? /feignedoutrage

3 Likes

Compilers are easy-ish. (Dumb assemblers are easiest. I once wrote a twopass bytecode assembler in bash.) Optimization is where things get bloody complex.

I’d say the easiest way to roll-your-own language would be translating a higher-level code to lower-level other one, and then feed that to a mature, well-developed compiler that’s widely tested.

1 Like

I double dog Dare you to write a compiler in a single pack() statement.

1 Like

I’ll pass on this one. I wrangled with onewire.c from the NodeMCU thingy today, using a cheap Saleae logic analyzer clone for figuring out why the protocol did not work anymore. Found the problem between the hw and the sw layer (after everybody was thinking it is messed up timing after moving constants to flash to free RAM), submitted the fix by email (I hate the web based crap), did not get a reply yet because of, inter alia, Australian timezones. I have enough for today.

1 Like

shoot me in the fucking arm.

1 Like

Please rephrase? I guess it is an idiom I do not know as I assume you are not actually asking me to impair your ability to wank, nor for a dose of an injectable drug, but I do not know this one.

2 Likes

Technically ActionScript and JavaScript are implementations of the same language specification

However ActionScript added static typing to JavaScript, so there’s some difference there.

1 Like

Oooo I did not know this.

I find speaking fluent nerd comes in handy whenever I have had a programming issue.

5 Likes

Will a single regular expression do?

4 Likes

I would put the number at five languages, you can’t just learn one. What language to get started with is a totally different question, but after having programmed for five years these are the five I’ve been proficient enough with to dream up a project, decide which of these five suits it best, and implement it. It’s not necessarily the best five, but I dare say they are very solid.

PHP

In spite of all these NoSQL trends, PHP scripts to a MySQL database still is a very fast way to get a site up and running. The LAMP is a very solid platform and if you’re a consultant, be ready to face it often. Since it’s so old it also has loads of frameworks like Phalcon or Slim, which runs real fast and makes RESTful architectures easy to build, with a lot of documentation around it. There’s very few PHP questions that haven’t already been asked on the web so you very seldom get stuck for days.

Java

It’s the most popular language out there so there’s tons of resources out there to do whatever you want. Lots of new stuff that’s all the rage can be done with Java, such as datamining or getting an application hooked up to Google App Engine to abuse the cloud. I’m really big on OO, maybe because I simply haven’t ventured that far into functional programming, so Java really suits the way I do a lot of work; dream up something, identify it’s “moving parts” along with the function of them, and then code away. You can get huge code blots though if you don’t invest (some would say “waste”) a lot of time thinking about the class structure but I think it’s worth it. Did I mention it’s everywhere, too? Sure, it’s easy to outsource but the demand is still very, very large for Java developers.

C++

The first language I ever really learned. It was frustrating at first, because one of it’s main strengths is that you have to understand what you’re doing and do it right or you’ll suffer but wow, it’s a really fast language with a lot of depth. It’s actually fast enough that you shouldn’t bother with C unless you’re coding for microprocessors. I think it’s absolutely awesome for testing out algorithms I’ve just heard of or just writing a simple command line app that automates something boring I usually do. Plus, a lot of systems still run on it, especially old government stuff of which there’s a plenty in my town.

R

This is the most recent addition of languages I’ve made projects in. I’m a huge stats geek, I was an insufferable little shit as a teen ager who had to talk about stuff I recently read, but now that I’m older I’m a little more bearable and the questions I like to answer today are just bizarre. It can handle very large datasets and most of the inferential and plotting stuff you want to do is already abstracted for you, otherwise it’s not that hard to learn and code yourself or find a library someone has already made to save the day. And everyone wants to get in on this Big Data stuff so there’s jobs a plenty.

Javascript

The language of the web has been found, and it’s name is Javascript. It is devilishly harder to learn than it looks, especially if you come to it with a Java and C++ background like myself. The way objects work just boggled my mind for a very long time, it’s still weird to me, but after a while you get the hang of it and oh boy, is it ugly and hard to read but does so much. I find myself typing code thinking “wow, is this really going to work?” and then being surprised often. And with such a large community help is always around the corner. It gets bonus points for stuff like node.js, which means it can be a back-end language too.

4 Likes

Also helpful for getting a techsupport drone to patch you over to a tier 2 someone who has the access rights needed to pull you out of the trouble you already diagnosed but cannot do squat with from where you are.

…I once got a call back from such telco tech, telling me where exactly the problem was found, after we spent together an afternoon on the phone, debugging a misconfigured ADSL (on the telco’s side). That was niiice.

1 Like

Buried in the text is that popularity is based on the number of people searching Google for tutorials, but the specifics are nonsensical, it states: “… based on the percentage of Google searches in the US for Python tutorials versus other language tutorials.”

Wait, if Python is the baseline how can the Python graph be changing over time, shouldn’t it be 1 across the whole graph?

Never ever trust any programing language popularity measurements, all of them seem to use fundamentally flawed methodologies or outright cooked numbers.

2 Likes

It’s an APL operator. It’s actually a digraph ╓║ serving a similar function to Perl’s pack() function. Of course, APL being APL, by chaining other operators to it, you can do all kinds of interesting things to the resulting string, the least of which is summoning Shub-Niggurath…

7 Likes

I started with ALGOL, then migrated to COBOL. (Also PL/1, which never caught on.) The path worked for me, so I recommend it to anyone starting out.

Seriously, none of those languages will be very popular in 30 years; some kind of 5th-generational language will dominate (unless threaded interpreted languages return…it could happen). Learn one language of every type you can.

2 Likes

i would rather be shot than debug hw/sw timing problems, and submit the patch via email.

Ahh. Makes sense now.

Really, it was not That Bad. The 1-wire decoder in the Saleae software is pretty decent. Adding wait states in the Lua code of the ds18b20 example separated the I/O operations enough to see what is happening without the byte boundaries being difficult to recognize. The software on mouseover shows the width of the pulse in microseconds, the lua code used tmr.delay(microseconds), the onewire.c uses delayMicroseconds() call, all was pretty much lined up and the 1-wire protocol has barn-door wide tolerances in the timing. All together it helped to quickly exonerate the timing suspect, and an attempt to manually decode the protocol bit by bit with the aid of the protocol decoder then led me straight to the issue.

And it was not a timing issue at the end, despite the suspicion. The code was by default depowering the bus after byte writes. Which was a good intention, but in certain situations that included my one it led to the L state on the bus being interpreted as a 0-value bit sent. (Oops.) I replaced zeroes with ones in all the onewire_write() calls and it started working for the price of having to manually depower the bus via ow.depover() when needed to.

2 Likes