lainchan / λ

Programming language(s) to choose?

Anon Gentooman · 2022-09-05 11:38
>>32672 tysm stranger on the internet
progn · 2022-09-05 11:56
>>32665 >get a job in the future (like in 1-3 year(s)) JavaScript (React, Node/Express), Java (Spring Boot), C# (.NET Core) and PHP (Laravel). Python is a good supplement. Obviously you'll need extensive CRUD projects on your GitHub. And enjoy the leetcode (blind 75) grind. Those other languages are much harder to find a job for, unless you have a CS/CE degree and a referral.
Anon Gentooman · 2022-09-05 16:20
Hi, fellow netizens, which programming language to choose for general purpose? I want to program some CLI/TUI utils, networking stuff, prototype things (math formulas, simple algorithms implementations) and get a job in the future (like in 1-3 year(s)), I want the binaries/code to be fast and minimal. Now I'm thinking of: 1. Nim 2. Zig 3. V 4. Go 5. Rust 6. Lua 7. C 8. Carbon 9. C++ 10. Python 11. Assembly
Anon Gentooman · 2022-09-05 16:40
>>32665 Haskell, how could I forget about Haskell?
Jean Dupont · 2022-09-05 17:16
>>32665 This belongs in the Programming Employment thread >>30745 >1. Nim >2. Zig >3. V >8. Carbon Ignore these for now. Learn these only if you are a hobbyist. These languages won't get you a job. And these languages aren't good first languages. >Haskell Again, this language won't get you a job. If you are interested in functional programming, learning Clojure might be the most pragmatic choice (because of job opportunities) at the moment. But don't learn it (or Haskell) as your first language. There is a free book: https://www.braveclojure.com/introduction/ >4. Go >5. Rust You are more likely get a job that involves Golang than Rust. Rust is also more low-level and might not be good for your use-cases. Go, on the other hand, is a language that you might want to learn at some point (perhaps as your 2nd or 3rd language) but there might be better options (read below). Moreover, Rust is really complicated language, so learning it will take much more time than learning Lua/Python/C/Go. >6. Lua Lua is a simple language. It's a good language to know if you are interested in getting into game development, or if you are looking for a language that can be embedded into your C or C++ program (examples include Awesome WM and Gmod). LuaJIT makes Lua code really fast. Lua is also lightweight. Read https://www.lua.org/pil/contents.html if you are interested. >10. Python Along with Lua, Python is a another candidate for your first language. Make sure to not waste time with Python 2 resources, though. Python is so widely used that knowing it definitely helps you to get a job. Read Mark Lutz books (https://learning-python.com/about-lp.html). https://automatetheboringstuff.com/ is also a good (free) book that's the perfect starting point. The newest edition of Mark Lutz's Learning Python is still worth reading even if you start with Automate the Boring Stuff with Python because Lutz's book is much more comprehensive (and you can skip stuff you already know). >7. C >9. C++ C and C++ are the languages for learning how UNIX/Linux works. C is mainly used for embedded systems and system software. C++ is used for user applications, and it's also heavily used for video games (in particular). Learn these together. Start with C and then learn C++. For learning C, I highly recommend reading C Programming: A Modern Approach, 2nd edition. It's the best and most comprehensive C book out there. Read either PPP2 or C++ Primer for learning C++. Don't read C++ Primer Plus (but C Primer Plus by Prata is a good book, but his C++ book isn't that good). Use the recommended compiler options (-std=c99 -Wall -Wextra -Wformat=2), a lint and Valgrind a lot. >11. Assembly If you want to get into low-level stuff (embedded systems or OSdev/writing kernel drivers) then you should learn some ASM. Programming from the Ground Up Book (https://savannah.nongnu.org/projects/pgubook) and The Art of 64-bit Assembly Language by Randall Hyde are good resources for leaning x86/AMD64 asm. If you want small and efficient executables, I recommend C/C++ and Lua. Python is arguably something you should learn as it's simply so popular. But Python is not an efficient language. (but Lua is much better in that regard). Go might be a good for your use-cases, too. I recommend that you start with either Python or Lua. Also, install GNU/Linux before you start (if you don't use Linux already). Use Windoze disk management tools to shrink a partition (reserve at least 20GB or more for Linux). Then use Rufus (https://rufus.ie/en/) to create a bootable USB drive that can be used to install Linux. I recommend using Xubuntu or Debian (with Xfce4 DE) as your first distro: >https://xubuntu.org/ >https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current/amd64/iso-cd/ Either use a BitTorrent client to download the iso or use PowersHell to verify the iso (Get-FileHash debian.iso -Algorithm SHA256 ). To learn GNU/Linux skills, read The Linux Command Line book (free): https://linuxcommand.org/tlcl.php
Pea · 2022-09-06 17:57
I mean this is less of a recommendation and more what I ended up doing: C to learn the basics, also super powerful language if you wanna get into distro user territory. I actually used to code in Borland Turbo C complete with the epic eye melting blue screen. Then jumped to C#, so I could also learn oop. Then from C# I picked up Java since they are similar enough you can make the switch and THEN start learning what isn't similar. Java is cool because you have Spring which is an awesome framework. Again this is just the path college and life took me through. But I do think using C as the first language you learn is a really good idea since it's very robust and doesn't hold your hand much.
par22 · 2022-09-06 20:26
>>32665 >CLI/TUI utils, networking stuff, prototype things (math formulas, simple algorithms implementations) >I want the binaries/code to be fast and minimal. I use OCaml for these purposes.
Apoc · 2022-09-06 20:49
>TUI, networking Go has some good TUI libraries like charm (https://github.com/charmbracelet/bubbletea), decent networking libraries and is probably the easiest to learn. Any of those languages except for nim, zig, v, and carbon are fine enough for job hunting that a competent programmer won't struggle to find work. >assembly It's very fun but not practical for your goals.
Chan Siu Ming · 2022-09-06 20:51
>>32665 >I want to be employed Java. Sorry, my dude. Real work isn’t glamorous unless you cultivate a passion for delivering actual business value to clients. The good news is that Java 8 and later already has the most important quality of life features from cool guy langs. The qualities that make it useful for large, financially significant information systems can’t be understood by a novice. You just have to experience it to really understand why its features are essential when you hit a certain scale. These features don’t help one-man teams, so neophytes hate on it. If you want to be a professional non-production-code evangelist, however, then rust is a good choice. If you just want to have fun and incidentally do something valuable, lisps and Erlang/Elixir are pretty cool. If you really just want to make games C++, C# and maybe Lua are basically the only options
Switch · 2022-09-06 22:06
python hands down. pros: all the latest AI and machine learning and other cool stuff is done in python, you won't get stuck in webdev crap like JavaScript. cons: not low level also once you learn a normal language that is pretty much the same as all the other languages you can learn it fast. if you know python, you'll learn Lua fast, etc. if you learn lisp or forth, it will take you longer to to pick up a normal language.
Sipho Nkosi · 2022-09-07 10:12
>>32685 >if you learn lisp or forth, it will take you longer to to pick up a normal language. Surely a discovery like that, which contradicts all existing knowledge on language learning, has produced a few good papers. Could you link one or two?
Demeere · 2022-09-07 12:03
>>32687 >pick up a normal language >normal
Milner · 2022-09-08 08:41
Only C++. Haskell is cool as hobby.
Nameless · 2022-11-21 05:47
>>32682 +1 to learning ML as a beginner.
Nell · 2022-11-22 18:16
>>33427 +2 to learning ML as a beginner.
Torvalds · 2022-11-22 21:56
>>33437 -1(total=+1) for learning ML as a beginner
Armitage · 2022-11-26 04:02
What the hell is this thread? Just use C/C++ if you care about getting _real_ soykaf done, all else is a joke. Yeah sure Python for scripting and whatnot, but that goes against the grain of >I want the binaries/code to be fast and minimal No. Use a language that doesn't take 2 days to learn. Why? Just look at the state of webdev. Just become polyvalent in _real_ programming and never stop learning. >B-But C is 50 years old!!! Ok? Development speed is the only thing modern languages have over it. Think twice.
Nguoi La · 2022-11-26 04:16
>>33474 >Just use C/C++ if you care about getting _real_ soykaf done Or Java.
The Fin · 2022-11-26 06:28
>>33475 >Java >for CLI Nobody wants to wait years for the JVM to start when using CLI tools.
Nobody important · 2022-11-26 06:35
>>33476 Yeah, I think leiningen is a good example of a good CLI tool but the JVM startup to do basic operations is brutal. I would rather just have a binary, or even a shell script.
Unspecified · 2022-11-26 06:49
>>33476 No one said CLI, though.
typedef · 2022-11-26 09:39
>>33479 >I want to program some CLI/TUI utils Unless we're somehow not answering to OP's question anymore.
Shogun · 2022-12-07 12:34
From your question I'm assuming that you're new to programming. My recommendation is to learn Python, C, and Java or C#, in that order. The reason is that this covers the main kinds of languages used in mainstream programming: scripting languages that let you experiment quickly, languages suitable for low-level programming, and "enterprise languages". These three will provide a solid base to learn other languages in the future. I think that this order will also go the smoothest and decrease the chances that you'll get discouraged because Python makes it easy to create a working program with a pretty CLI in very few lines of code. Don't spread yourself thin trying to learn ten languages at once. Go for solid workhorses rather than shiny new trends you hear on HN such as Carbon (an experimental language) or V (a meme). The time for niche stuff will come later, after you have a solid foundation. For Python, I recommend the books Think Python (2nd edition) and Automate the Boring Stuff with Python. For C, I recommend C Programming: A Modern Approach by King. Good luck.
The Fin · 2022-12-07 23:00
>and get a job in the future (like in 1-3 year(s)), The language(s) you pick not only need to have job opportunities but job opportunities for you as someone without a degree and no relevant work experience. >>32676 is right. Of the languages you list, Python and Go are by far the most viable for a first job.