Jump to content

What language for making windows applications

Snifferdog3
Just now, Snifferdog3 said:

according to Google c# doesn't work with hardware

All programming languages work with hardware. You'll just need to add more abstraction and wrapper code to get the same results. And C# is much less performant than C as it will have to be run in an ad-hoc virtual machine (you don't compile native-level machine code in .NET languages) which is not recommended for a CPU-Z-like tool at all.

 

1 minute ago, Snifferdog3 said:

everyone says C is easier to start with.

It surely is.

 

(Arguably, Lisp/Scheme or Pascal would be even easier, but they are not the right tool for this job.)

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, MrMG said:

The thing with programming languages is, you can use any programming language for basically anything. Sure some will do some tasks better than other languages but overall you are fine with whatever you choose. From your comments I assume that you want to do something to monitor your PC hardware? Example: https://stackoverflow.com/questions/25552/get-os-level-system-information here is a stackoverflow thread specifically for the Java programming language (which works on any OS) to get some hardware information. You can probably find libraries for ANY programming language that you want. In my opinion, if you have a programming language that you already know well or like, then just use that one.

Yep, that's what I want to start with is a basic pc hardware monitor, so C should do the job.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Dat Guy said:

We get it, you can't write in C. If @Snifferdog3 looked at it and thinks it fits, who are you to decide otherwise though?

I totally agree with you. I was the first one to tell him to write in the language more fitted for what he wants to do. And i also wrote that he can write in Assembly. No one is deciding for him. I really like C, well much more than C++ but i wouldn't use it unless it was the only option for me or the best option for me. For example there are still projects that are better written in Cobol nowadays.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Settlerteo said:

And i also wrote that he can write in Assembly.

I guess that would be an interesting project, but even I would suggest the OP to not do that. It is possible, but nothing of value is won when using Assembly instead of C.

 

1 minute ago, Settlerteo said:

For example there are still projects that are better written in Cobol nowadays.

Sure, e.g. handling large amounts of data is what COBOL was invented for and it still can do that.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

Quote

Yep, that's what I want to start with is a basic pc hardware monitor, so C should do the job.

Yeah C should get the Job done. But C can be a bit overwhelming as a new programmer. Especially pointers confused me a lot when I started to learn C/C++ . But if you need any help with that then you can just keep posting here in the forum or on stack overflow or so.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Snifferdog3 said:

Yep, that's what I want to start with is a basic pc hardware monitor, so C should do the job.

Grab some books like "C programming language", "C in depth" and "C programming: a modern approach" and prepare for some really long long nights. I used to like that in the past. Now i am used to falling into that shit called php :P 

Link to comment
Share on other sites

Link to post
Share on other sites

well Im thinking C, but how well will c# work with hardware, will it be good enough? Like it's easier than C or C++ but will it be fine, say I wanted to do a program that doesn't require hardware would I be better off learning c#? I've put a poll up you guys put in what you think will be best for me. C seems like the one to go for, but might be harder for me to start on.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, MrMG said:

Especially pointers confused me a lot when I started to learn C/C++ .

The good thing with pointers is that you'll have to learn about resource management. If you ever write stuff in C and then decide to "move on", you'll write much more efficient code in your next language.

 

Unless it's C#. ;)

 

4 minutes ago, MrMG said:

But if you need any help with that then you can just keep posting here in the forum

Yup - we're here for you.

 

Just now, Snifferdog3 said:

C seems like the one to go for, but might be harder for me to start on.

Your first real programming language will always have the steepest learning curve of all. One advantage when starting with C is that you won't have to care about OOP, MVC or whatever concepts you might have in mind. Because it won't bother you with them.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Snifferdog3 said:

well Im thinking C, but how well will c# work with hardware, will it be good enough? Like it's easier than C or C++ but will it be fine, say I wanted to do a program that doesn't require hardware would I be better off learning c#? I've put a poll up you guys put in what you think will be best for me. C seems like the one to go for, but might be harder for me to start on.

Well i am not gonna vote in the poll. I will advise you this. If you want to just make one program use whatever you want. If you are into programming and maybe thinking working as a software engineer start with C.

Link to comment
Share on other sites

Link to post
Share on other sites

So what exactly do I need, visual studio is one, but what do I need to actually write the code? Is it included with visual studio? YouTube will likely show me anyways but thought I would ask.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Settlerteo said:

Well i am not gonna vote in the poll. I will advise you this. If you want to just make one program use whatever you want. If you are into programming and maybe thinking working as a software engineer start with C.

Great, yes I don't just want to write one program, maybe eventually I can get a job out of it, so C it is then.

Link to comment
Share on other sites

Link to post
Share on other sites

I'm not at home currently but when I'm back I download notepad++ and visual studio, fire up YouTube and see what I can learn I guess... Just got to not give up now, And keep going.

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Snifferdog3 said:

what do I need to actually write the code? Is it included with visual studio?

Visual Studio is not much more than a glorified text editor with built-in compilers and linkers. I, personally, use other text editors and the Clang/LLVM compiler suite.

 

For C, you will need a text editor (for writing code), a compiler (generating intermediate object files) and a linker (linking your object files with system libraries, resulting in an .EXE file). Honestly, Pelles C is not a bad alternative, especially as it sometimes supports newer C standards better than Visual Studio does.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Snifferdog3 said:

I download notepad++ and visual studio

If you plan to use Notepad++ (if that's what you are comfortable to use), you won't need the full Visual Studio anymore because you will probably not write any code in it anyway.

In fact, you can perfectly integrate Clang and/or the Visual Studio linker (link.exe) and compiler (cl.exe) into Notepad++ with the NppExec plug-in.

 

(One of the numerous advantages :D of C is that a text editor gives you enough structure, there is no need to maintain "project files" and "user settings files" and whatever Visual Studio will generate for you...)

 

edit:

 

13 minutes ago, Snifferdog3 said:

fire up YouTube and see what I can learn I guess

YouTube is probably not the best resource for learning C as it is more about watching than about reading. But there's always Wikibooks for you:

https://en.wikibooks.org/wiki/C_Programming/Intro_exercise

 

Note that some of the contents are Unix- resp. Linux-specific, i.e. the call to "GCC". Clang has the clang command on Windows, the Visual Studio toolkit has cl.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

14 hours ago, Mira Yurizaki said:

Python I'd argue is good to learn some fundamentals of programming, but the problem with Python, at least from what I've tried, is doing anything other than a non-GUI based app will be cumbersome. Unless you can find a GUI tool that can spit out Python code, you have to build the GUI from scratch which I'd argue is an intermediate level task. Especially because building a GUI from scratch requires you to do multithreaded programming.

 

Going with Visual Studio and C# will set you up with everything you need to build either a command line or a GUI based application.

i agree about python. I wouldnt recommend c# though, 1st because its is ms stuff and will only run in windows. 2nd because it is closed environment and since Netbeans have been apache project incubating it is free, you can use java, c++, even php and all others with addons in it.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, ckinfos said:

1st because its is ms stuff and will only run in windows.

Which is what the OP plans to write. Also, this is a misinformation. C# (Mono) is a cross-platform language.

 

Just now, ckinfos said:

2nd because it is closed environment

Mono is open source.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

99% of the API to control industrial machine such as : bender, lift, press, laser cutter, arm robots, suction cups, conveyor, palletizer i have dealt with are so far .NET (C# or VB), Java, C++ and VB6.0.

 

All of which except Java is controllable from C# or C++ easily.

 

From 14-15 years experiences with those language speed has not been a single time an issue. Robots/Machine controllers are much slower than any language we could ever produce. Usual interfaces are to load a GCode (also called program) from wand scanning the part to be processes or you read from a laser the shape of the object and load the correct program and communicate with TCP/IP with the different controllers in order to give them instruction. Your interface barely have a couple buttons and is much faster to make and edit using C# and Visual Studio than C++. For comparaison i have 26 years experience in C++ and only 18 years in .NET but is professional enough to be able to say things build faster on .NET (when it's the right language).

 

Anyhow if you play with large robots chances are you will have to work with engineering apps such are AutoCAD, Solidworks, SolidEdge, Inventor, NX, Fusion which all their API are nowaday .NET so if you plan on using Java you would only want to break your head with it if all your robots/controllers are Java too.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Dat Guy said:

Which is what the OP plans to write. Also, this is a misinformation. C# (Mono) is a cross-platform language.

 

Mono is open source.

Thought were Ms C# in visual studio! mistake. sorry.

Link to comment
Share on other sites

Link to post
Share on other sites

What you're doing seems a little bit too difficult for a beginner. I would advise on trying something easier for now otherwise you might get overwhelmed. I started with Java then C# when I started learning and I was super overwhelmed personally.

Link to comment
Share on other sites

Link to post
Share on other sites

Java will teach you to write badly verbose code and to completely ignore performance problems. Nah, don't.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

well my 2 options are either C or C#, i understand with C# i wont be able to make a cpu temp reporting program but i can always learn both in the future, ive decided its either between c or c# now, ill do c++ when im more experienced in a few years. ive installed visual studio and notepad++, just got to choose what language to go for now, I can always do the other one another time, i think i really need to go with the easiest to learn even if it means i cant do some things i want, because i need to get a idea of how coding works, as i have no experience in it.

Link to comment
Share on other sites

Link to post
Share on other sites

37 minutes ago, Snifferdog3 said:

i understand with C# i wont be able to make a cpu temp reporting program

All parts and CPU info CPUZ gets the info from is WMI which works with nearly any popular languages. WMI in C# is 2 lines to import the library and then i de believe the call was an SQL query aliike such as "Select * FROM WMI_Management" of something like that and you read the table data which include buch of data like voltage, watts, temps, HDD RPM, Memory read/write rate.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Franck said:

All parts and CPU info CPUZ gets the info from is WMI which works with nearly any popular languages. WMI in C# is 2 lines to import the library and then i de believe the call was an SQL query aliike such as "Select * FROM WMI_Management" of something like that and you read the table data which include buch of data like voltage, watts, temps, HDD RPM, Memory read/write rate.

really? thanks, ive been watching some videos on C#, done the hello world thing, its all maths and numbers, im very bad a maths :/

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, Snifferdog3 said:

really? thanks, ive been watching some videos on C#, done the hello world thing, its all maths and numbers, im very bad a maths :/

Here i did a quick search and this answer shows the WMI method for the CPU temps. Apparently OHM works too

https://stackoverflow.com/a/48488620/2748412

 

Basically from your desktop is 2 dozen of mouse click + 5 lines of code to have an interface with that info showing so about 2 minutes.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×