| General > General Technical Chat |
| How many people code in C these days, and if so, why? |
| << < (27/99) > >> |
| engrguy42:
For what it's worth, for those who might be considering trying Python... And this is for those who are like me: - Using Windows (not Linux or Mac) - Using Visual Studio 2017 (NOT Code), and not interested in picking up a different IDE - Want to make some GUI-based apps, and are used to the ease of natively drag-n-dropping GUI elements in C# - Are familiar with C++ and C# in VS, and have a lot of pre-made code you've already developed Now I'm sure for those who like and have used Python it's wonderful. However, I've spent a day and a half trying to get everything working. I watched a 4+ hour tutorial on Python. I've downloaded and installed every freakin' Python/QT - related thing I can find. I've searched and searched youtube and other websites for tutorials on how to set it all up. And I've learned about PIP and all the libraries you can install. But at the end of the day, I've pretty much given up. From what I've seen, it's pretty much a much less stringent version of C#. It has classes (which I love), pretty much the same basic functionality as any programming language. But for me, the cost outweighs the benefit. And I'm still not clear what the benefit actually is. I can't even figure how to run the GUI-making software (QtDesigner) from within VS. There's no tutorials. They're either addressing Qt and C++, or VS Code, or some other IDE, or some old versions, or Mac, or Linux, or some other Python version thingy (Anaconda, etc, whatever the F they are). And it seems all you're doing is running a separate app that makes some UI code that you have to convert to python code via command line. And it's a freakin' science project to understand and find where stuff is located on your drive. And it seems there's also other options for GUI stuff. Which means a more extensive science project trying to figure out what to use and how to use it. The best resource I found was docs.microsoft.com/visual studio/python or whatever for basic VS/Python, but still it doesn't answer everything. Or anything about Qt. And for that you need to go to the Qt website. And the Python implementation in VS is different. But not in a good way. For example, I spent 1/2 an hour just trying to duplicate what is a simple procedure in VS C#/C++: select and comment a bunch of lines. I still have no clue. The devil is certainly in the annoying details. Now I'm sure there are fixes for much or all of this, and I'm sure I'll hear an unending stream of them. And I'm sure some of them involve jumping thru a bunch of annoying hoops. But for me it just isn't worth the hassle. Anyway, I may decide to pick it up again, but for now I'll just let it sit until I find some real benefit to having Python. I tried. |
| Berni:
Yeah i do admit that small game studios tend to go this route while big AAA developers tend to build there own engines from the ground up. The smaller studios have limited resources so less people needed to code the game the better. Big studios already have >200 artists working on 3d modes, textures, animations, maps..., so who cares if 50 programmers are needed to put together an engine. But i don't really see the performance gap from C# to C++ being all that big. But i do have to admit that one has to be a lot more careful with programing in C# to actually get that performance. There are some small sneaky details that can cause a piece of code to suddenly run much slower or generate a pile of junk for the garbage collector. Its just a matter of using the profiling tools to identify these choking points and fix them. A good example of C# in a game is Cities Skylines (Widely regarded as the worlds best city builder game for the last 5 years, having stolen this crown from SimCity). Its still done by a small developer ~20 people but it did sell a lot of copies. Made in Unity with C#, it is simulating 10s of thousands of people individually walking and pathfinding around the city during gameplay while obeying traffic rules (Every single pedestrian,car,train,plane,boat), also simulating water flow over terain and wind constantly. Featuring a official modding api that links in preparsed C# code on the fly without a restart. All of this running nicely performant on a typical PC and will properly utilize larger numbers of CPU cores (if needed for unusually large cities). Its a particularly good example of very computationally intensive game logic being ran in .net. Not saying that C# is perfect, but there is a time and place for it. Same for C++. I love C/C++ for running bare metal on MCUs, there are many cases when you would want to use C++ on a PC. But just like C#, its not for everything. Still C# is a very good alternative to other similar languages that offer similar features like Java(ie Android apps) while not being a replacement of any kind for what C++ does well. Most of the popular languages exist for a good reason. |
| nctnico:
--- Quote from: engrguy42 on May 07, 2020, 06:52:59 pm ---Now I'm sure there are fixes for much or all of this, and I'm sure I'll hear an unending stream of them. And I'm sure some of them involve jumping thru a bunch of annoying hoops. But for me it just isn't worth the hassle. --- End quote --- Your problem seems to be being stuck to VS (which is not the best tool to work on code; it is pretty clumsy). >:D When I need to work on a VS project I load the same project in Eclipse CDT and use VS only to compile. |
| Picuino:
--- Quote from: engrguy42 on May 07, 2020, 06:52:59 pm ---For what it's worth, for those who might be considering trying Python... [...] Anyway, I may decide to pick it up again, but for now I'll just let it sit until I find some real benefit to having Python. I tried. --- End quote --- GUIs can be made with Python but that is not its strong point. You can use Python for tasks closer to the command line. For example I use Python to render my static web page with the sphinx tool. It has also served me occasionally to summarize large amounts of data in text format. In fact, it is how I met Python, in a start-up in which hundreds of thousands of messages had to be summarized daily from an entire installation with more than 1000 PLCs. The guys who taught me Python managed to quickly summarize them in a simple excel sheet. From there I used Python to do a software bug search program in PLC programs. All of these tasks are alike in that they handle large amounts of text and data flexibly and easily. That is the biggest Python niche. |
| engrguy42:
--- Quote from: Picuino on May 07, 2020, 07:14:56 pm --- --- Quote from: engrguy42 on May 07, 2020, 06:52:59 pm ---For what it's worth, for those who might be considering trying Python... [...] Anyway, I may decide to pick it up again, but for now I'll just let it sit until I find some real benefit to having Python. I tried. --- End quote --- GUIs can be made with Python but that is not its strong point. You can use Python for tasks closer to the command line. For example I use Python to render my static web page with the sphinx tool. It has also served me occasionally to summarize large amounts of data in text format. In fact, it is how I met Python, in a start-up in which hundreds of thousands of messages had to be summarized daily from an entire installation with more than 1000 PLCs. The guys who taught me Python managed to quickly summarize them in a simple excel sheet. From there I used Python to do a software bug search program in PLC programs. All of these tasks are alike in that they handle large amounts of text and data flexibly and easily. That is the biggest Python niche. --- End quote --- Ah, okay, thanks. For me I guess that comes down to balancing Matlab vs. Python, since I tend to run to Matlab for data acquisition and analysis and simulation stuff on large amounts of data. BTW, what is this "command line" to which you refer? :D I didn't know that's still a thing :D I'm kinda allergic to command lines. |
| Navigation |
| Message Index |
| Next page |
| Previous page |