# What programming language would most likely be used these days?

**URL:** <https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156>\
**Category:** Factual Questions\
**Created:** [June 8, 2009, 11:01pm UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156 "2009-06-08T23:01:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tastes\_of\_Chocolate](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tastes_of_chocolate/32/3232_2.png) [@Tastes\_of\_Chocolate](https://boards.straightdope.com/u/Tastes_of_Chocolate)\
**Post date:** [June 8, 2009, 11:01pm UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/1 "2009-06-08T23:01:10Z")

</div>

I’ve got an idea for a piece of software, but it’s been 20 years since I’ve done any programming. This would be kind of a mix of [Amazon.com](http://Amazon.com)’s “Other people that bought XXX and liked it also liked YYY” with a barcode scan thrown in.

Is anyone familiar with designing similar types of software, and what programming language do you use for it?

((Ok, you caught me. Mostly I’m thinking of using this as an excuse to go relearn programming.))

---

<div class="post-metadata">

**Author:** ![Shagnasty](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Shagnasty](https://boards.straightdope.com/u/Shagnasty)\
**Post date:** [June 8, 2009, 11:22pm UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/2 "2009-06-08T23:22:29Z")

</div>

Python is a great place to start, It is fairly easy to get started with but also extremely powerful. I believe that Google uses it a lot and it will probably expand a great deal in the near future.

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [June 8, 2009, 11:23pm UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/3 "2009-06-08T23:23:57Z")

</div>

For what sort of platform? Web? PC? Something else?

For me, I occasionally do Windows applications for work. I’m working on a project currently, and I’m developing it in .NET Visual C#. If you’re doing any sort of Windows applications programming, any of the .NET languages will do nicely. Visual Basic is probably the easiest to learn, while C# and C++ seem to be among the more popular languages for expert programmers.

---

<div class="post-metadata">

**Author:** ![FORTRAN\_forever](https://avatars.discourse-cdn.com/v4/letter/f/f17d59/32.png) [@FORTRAN\_forever](https://boards.straightdope.com/u/FORTRAN_forever)\
**Post date:** [June 8, 2009, 11:43pm UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/4 "2009-06-08T23:43:27Z")

</div>

Well, there’s always…

Naah, never mind.

---

<div class="post-metadata">

**Author:** ![whitetho](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/whitetho/32/1059_2.png) [@whitetho](https://boards.straightdope.com/u/whitetho)\
**Post date:** [June 8, 2009, 11:47pm UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/5 "2009-06-08T23:47:02Z")

</div>

> [@fortran forever](#):
>
> well, there’s always…
> 
> Naah, never mind.

Umm, COBOL? ALGOL?

---

<div class="post-metadata">

**Author:** ![KneadToKnow](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kneadtoknow/32/3999_2.png) [@KneadToKnow](https://boards.straightdope.com/u/KneadToKnow)\
**Post date:** [June 8, 2009, 11:48pm UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/6 "2009-06-08T23:48:22Z")

</div>

> [@whitetho](#):
>
> Umm, COBOL? ALGOL?

The thing here is, I don’t know if you’ve been wooshed or if I have. 🙂

---

<div class="post-metadata">

**Author:** ![Khadaji](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@Khadaji](https://boards.straightdope.com/u/Khadaji)\
**Post date:** [June 9, 2009, 12:18am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/7 "2009-06-09T00:18:14Z")

</div>

As Q.E.D. has implied, we don’t really know enough to give you a good recommendation, but I will go ahead and recommend either java or C#.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [June 9, 2009, 12:22am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/8 "2009-06-09T00:22:10Z")

</div>

Haskell! Haskell!

…No, probably not. But the details are so nebulous, who knows? Everyone gets to put their favorite language in the ring.

---

<div class="post-metadata">

**Author:** ![Markxxx](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Markxxx](https://boards.straightdope.com/u/Markxxx)\
**Post date:** [June 9, 2009, 12:27am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/9 "2009-06-09T00:27:10Z")

</div>

I agree C# is a great language to learn. Once you get a hang of it, you can switch over to Java. Java applications are slowly being replaced by Flash products which do similar things. So Java never caught on like it was supposed to.

If you’re looking for webprogramming PHP is great. It’s open sourced and it has a great community for learning. People on various PHP boards LIKE, I mean they actually LIKE to help beginners so that goes a long way on your learning curve.

Start with C# or PHP and then once you get a solid command on them head to others

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 9, 2009, 12:49am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/10 "2009-06-09T00:49:22Z")

</div>

For applications which reside and run on the user’s own computer, some flavor of C would definitely be your best bet. C++ is probably the most universally used, but if you’re writing exclusively for Windows, you might prefer C#, and if you’re writing exclusively for Mac, you might prefer Objective C. I put the “exclusively” caveat in there because those two languages are fundamentally integrated into their respective operating systems, and so are more difficult to port to other systems. Everyone supports C++, though (and plain vanilla C, but anything you can do in C, you can do in C++, often easier).

Java is very closely related to C, but typically runs slower, since it adds another layer of abstraction (the “virtual machine”). One tactic is to use Java for the “front end” of an application, handling the user interface, but to pass everything to a “back end” written in some other language that does all the heavy processing.

---

<div class="post-metadata">

**Author:** ![DarrenS](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DarrenS](https://boards.straightdope.com/u/DarrenS)\
**Post date:** [June 9, 2009, 1:25am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/11 "2009-06-09T01:25:31Z")

</div>

This is more of an IMHO thing.

If you just want to know which languages are popular, try [this](http://langpop.com/) site. Of course, that doesn’t mean that just because a particular language is popular it will suit _you_ or be appropriate for what you’re trying to accomplish.

By the way, if you want to capitalize on your [collaborative filtering](http://en.wikipedia.org/wiki/Collaborative_filtering) algorithm, you might want to look into the [Netflix Challenge](http://www.netflixprize.com/).

---

<div class="post-metadata">

**Author:** ![zwede](https://avatars.discourse-cdn.com/v4/letter/z/ac91a4/32.png) [@zwede](https://boards.straightdope.com/u/zwede)\
**Post date:** [June 9, 2009, 2:50am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/12 "2009-06-09T02:50:03Z")

</div>

Java would be choice as it is fairly OS-agnostic (most Java apps will run on Linux, MAC and Windows without re-compiling). Also check out JavaFX. It lets you write a java app that works on a desktop and then creates a version for a mobile device automagically (resizes display, adapts input methods etc) making your app portable.

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [June 9, 2009, 3:14am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/13 "2009-06-09T03:14:04Z")

</div>

If you’re making a website, the most common options are PHP, Java Servlets, or [VB.NET](http://VB.NET).

If you have some sort of barcode reader and you’re going to have a regular windowed application which interfaces with it, probably the reader is only going to have a C interface. You’ll probably want to go with C, C++, or D. If C# can call C functions that’s a good option too, but I suspect it doesn’t since it compiles to bytecode.

As **Shagnasty** says, Python is a good learner’s language. You can’t really do windowed apps or anything, but really there’s no language that makes windowed apps as easy to make as it seems like it should be, so you’re probably better off to ignore making GUIs while you’re relearning.

---

<div class="post-metadata">

**Author:** ![Revtim](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/revtim/32/1042_2.png) [@Revtim](https://boards.straightdope.com/u/Revtim)\
**Post date:** [June 9, 2009, 3:19am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/14 "2009-06-09T03:19:47Z")

</div>

It might be a good exercise to search for each language on [Indeed.com](http://Indeed.com) and see which are most in demand. Of course some jobs are with legacy software, but I’d guess it it’d still a generally informative search.

IMHO, I’ve used C, C++, a bit of Java, and C#, and I’m sticking with C#.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [June 9, 2009, 3:43am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/15 "2009-06-09T03:43:36Z")

</div>

> [@Tastes\_of\_Chocolate](#):
>
> I’ve got an idea for a piece of software, but it’s been 20 years since I’ve done any programming. This would be kind of a mix of [Amazon.com](http://Amazon.com)’s “Other people that bought XXX and liked it also liked YYY” with a barcode scan thrown in.
> 
> Is anyone familiar with designing similar types of software, and what programming language do you use for it?

Picking the programming language is easy. Picking the collaborative filtering algorithm and implementing it so that it scales well is very hard. Based on the fact that you don’t know how to program, I’m going to guess that you don’t have an algorithm in mind either. I think it’s great that you want to learn how to program, but you need to start with an easier problem.

(For the record, if I were trying to build a site like this, I’d look very seriously at OCaml.)

> [@DarrenS](#):
>
> By the way, if you want to capitalize on your [collaborative filtering](http://en.wikipedia.org/wiki/Collaborative_filtering) algorithm, you might want to look into the [Netflix Challenge](http://www.netflixprize.com/).

That’s a slightly different problem. Netflix wants to more accurately predict how a user will rate a given movie based on their past ratings. The OP wants to compute a ranking of products rather than an estimate of ratings. You can rank by estimating all the ratings and sorting, but you’d have to not care about performance at all to think that’s a good idea.

---

<div class="post-metadata">

**Author:** ![Stealth\_Potato](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Stealth\_Potato](https://boards.straightdope.com/u/Stealth_Potato)\
**Post date:** [June 9, 2009, 3:52am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/16 "2009-06-09T03:52:41Z")

</div>

I would agree that Java’s probably a good choice for getting started. There are things about the language I find irritating (the lack of operator overloading being one) but on the whole it’s pretty decent, fairly easy to learn, and there’s no denying that it’s extremely popular. C# is similar to Java in a lot of ways, but it has many more features. The downside is that its cross-platform support is not as good as Java’s. It is usable on many non-Windows platforms, however (along with a lot of .NET stuff) through [Mono](http://mono-project.org).

Python is also excellent choice, IMHO. Lots of fun to use, and its widespread popularity means there are libraries available for Python for just about every purpose imaginable.

> [@Chronos](#):
>
> For applications which reside and run on the user’s own computer, some flavor of C would definitely be your best bet. C++ is probably the most universally used, but if you’re writing exclusively for Windows, you might prefer C#, and if you’re writing exclusively for Mac, you might prefer Objective C.

I wouldn’t really call C# a flavor of C. It’s related to C about as much as Java is, which is to say it shares the basic style of syntax and not much else. (Well, I guess it shares part of the name, too. ;))

> [@Sage\_Rat](#):
>
> If C# can call C functions that’s a good option too, but I suspect it doesn’t since it compiles to bytecode.

.NET can import functions from native DLLs just fine, so at worst (if the barcode reader only provides static libraries) you’d just have to create a dynamic library wrapper in order to use the scanner with C#.

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [June 9, 2009, 3:54am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/17 "2009-06-09T03:54:46Z")

</div>

> [@Stealth\_Potato](#):
>
> .NET can import functions from native DLLs just fine, so at worst (if the barcode reader only provides static libraries) you’d just have to create a dynamic library wrapper in order to use the scanner with C#.

Technically, you can create wrappers to C from Java or Python or pretty much any language. But I don’t think most people would choose those languages first if they were going to interface to C as a core part of their app.

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [June 9, 2009, 4:51am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/18 "2009-06-09T04:51:18Z")

</div>

> [@ultrafilter](#):
>
> Picking the collaborative filtering algorithm and implementing it so that it scales well is very hard.

```auto

class Links {
private:
    #define MAX_LINK_COUNT (200)

    unsigned int product_ids[MAX_LINK_COUNT];
    int count[MAX_LINK_COUNT];
    int total_count = 0;

public:
    Links() {
        memset(&count, 0, sizeof(count));
    }

    void addLink(uint id) {
        if (total_count < MAX_LINK_COUNT) {
             ++total_count;

             for (int i = 0; i < MAX_LINK_COUNT; i++) {
                 if (product_ids* == id) {
                     ++count*;
                     return;
                 }
             }
             for (int i = 0; i < MAX_LINK_COUNT) {
                 if (count* == 0) {
                     ++count*;
                     product_ids* = id;
                     return;
                 } 
             }
        }
        else { // exceeded max link count
            uint r = rand() % MAX_LINK_COUNT;
            --count[r];
            --total_count;
            addLink(id);
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [June 9, 2009, 4:55am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/19 "2009-06-09T04:55:49Z")

</div>

> [@Sage\_Rat](#):
>
> ```auto
> 
> class Links {
> private:
> #define MAX_LINK_COUNT (200)
> 
> unsigned int product_ids[MAX_LINK_COUNT];
> int count[MAX_LINK_COUNT];
> int total_count = 0;
> 
> public:
> Links() {
> memset(&count, 0, sizeof(count));
> }
> 
> void addLink(uint id) {
> if (total_count < MAX_LINK_COUNT) {
> ++total_count;
> 
> for (int i = 0; i < MAX_LINK_COUNT; i++) {
> if (product_ids* == id) {
> ++count*;
> return;
> }
> }
> for (int i = 0; i < MAX_LINK_COUNT) {
> if (count* == 0) {
> ++count*;
> product_ids* = id;
> return;
> } 
> }
> }
> else { // exceeded max link count
> uint r = rand() % MAX_LINK_COUNT;
> --count[r];
> --total_count;
> addLink(id);
> }
> }
> }
> 
> ```

You’re kidding, right?

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [June 9, 2009, 5:00am UTC](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156/20 "2009-06-09T05:00:53Z")

</div>

Hm, slight bug in that code that I forgot to verify there was something in the slot that gets decremented before decrementing, and go back and choose another random value first. Otherwise it should work just fine for almost anyone’s purposes. You might also modify it to limit the max value of any one ID so that there is a minimum spread of alternate products–in case one steals too many points.

[Next page](https://boards.straightdope.com/t/what-programming-language-would-most-likely-be-used-these-days/499156.md?page=2)
