3

What would be the best language to build a randomiser?
I want to build a little program where you can insert a number of items and picks one at random.

Comments
  • 3
    For something this small I would choose Python
  • 1
    You can do this in most languages. I would go with Python personally, but it really depends what you define as the "best language." If you wanted a GUI, I would use HTML and JavaScript.
  • 1
    github
  • 0
    @Marl3x I was thinking about that too but would Python allow me to create some UI and add other features in the future?
    I want to build this program just to learn a new language in a practical way.
  • 0
    @heyheni I don't understand.
  • 2
    I wouldn't recommend trying to implement a GUI in Python as your first project. Not that it would be too difficult to follow a guide, I just feel that you can learn more about Python by picking a more "script" like project. Try automating something you hate doing!
  • 2
    @Ioan93Andrei There's a lot of GUI libraries available actually I've never used one but PySide is one that I'll use in a future project.
  • 0
    @printf what would be a good language to implement GUI?
  • 1
    @Ioan93Andrei if you want to learn web development as per your profile, I would go with HTML and JavaScript.
  • 0
    If you already know those languages and want to learn a new one, try C++ or Java. You can do Python if you'd like but don't expect that will teach you all the basics of Python. It's not meant for GUI building.
  • 0
    @printf Actually I want to create a software not a web app. I want to experiment with software development.
  • 0
    What do you guys think of C or C++? Would that be overkill?
  • 1
    Don't use C. Between those two, go with C++. Not overkill if the purpose is to learn the language!
  • 0
    @printf Can you implement GUI with it?
  • 3
    #!/bin/sh

    cnt=0;while read item ; do eval "ITEMS_${cnt}='${item}'";cnt=$((cnt+1));done; id=$((RANDOM%cnt)); eval "ITEM=\${ITEMS_${id}}"; echo "${ITEM}"

    Cheers
  • 1
    @Ioan93Andrei yes you can implement a GUI with C but it will be painful and that's not really what C is meant for.
  • 0
    @printf So what other options are there?
  • 1
  • 0
    @PrivateGER Can I use GUI from C# into a C++ program? Sorry for the stupid question but I'm a total noob when it comes to software development.
  • 1
  • 0
    @PrivateGER I see ) actually I started learning C++ because it seems to be the most powerful language or at least one of the most powerful.
  • 2
    @Marl3x Yes, python would be great for it. You can make it in a few minutes
Add Comment