Help me choose a program development platform - Page 1
Forum section: electronics / general

author: GK
author_rank: Super Contributor
timestamp: November 07, 2012, 01:06:12 pm
content: I very recently downloaded (it’s completely free!) Visual Basic 2010 Express and am undergoing a bit of a crash course as I am upgrading from Visual Basic 3.0 (pre Win 95), which I basically can’t use anymore since upgrading from Win XP to Win 7 (64-bit). Yes, I am a bit still in the dark ages of PC programming.My first program is for a computer controlled small signal transistor/jfet/diode curve tracer project. Attached is a screen shot of my program running – not much development so far, just the basic grid for the curve plots is garish color!My opinion of VB 2010 so far is that so far it looks OK, besides the fact that the code required for just about every command or function I’ve had to re-learn from the old 3.0 has been made more complex and long windedI’m looking for a new programming platform to learn/get thoroughly stuck into, for writing windows applications specifically for system control/automated testing, via RS232 and USB. I want something that will be usable and transportable for sometime to come.So my question is this; is VB 2010 good enough or would there be a real benefit it in investing my time and resources to learning something different? Also, how serious is VB considered in programming circles in comparison to alternative C or C++ packages?

author: Unknown
author_rank: Unknown
timestamp: November 07, 2012, 01:17:12 pm
content: hi, I'd leave VB and move to something like C# or C++?(edit: SharpDevelop is a free IDE for C#, VB.NET; should be easy to port your code to c# from vb net.http://www.icsharpcode.net/OpenSource/SD/)

author: firewalker
author_rank: Super Contributor
timestamp: November 07, 2012, 01:27:59 pm
content: Will you need low level stuff? also have a look to Qt.

author: kripton2035
author_rank: Super Contributor
timestamp: November 07, 2012, 01:52:38 pm
content: take a look at realstudio, more modern, more robust and full multiplatform.(win-linux-mac and ios in 2013)it's a basic inside, but with full object support. I use it for a decade now - simply no problem.

author: NiHaoMike
author_rank: Super Contributor
timestamp: November 07, 2012, 02:15:41 pm
content: If you're looking for performance, it's hard to beat C/C++ nowadays. I suggest looking at the open source IDEs like Eclipse if you need one, but I prefer to use the bash shell.If you're looking for ease of programming, Python is very good. Low level access to a USB device only takes about a dozen lines of code.

author: McMonster
author_rank: Frequent Contributor
timestamp: November 07, 2012, 07:03:01 pm
content: I think that all Basic-like languages are mostly viewed as primitive, obesolete and absolutely awful, the retarded cousins in the family of programming languages. If VB weren't included in MS Office as scripting and automation language then I think nobody would give a damn for it. And even in this case it's a pain to use comparing to just anything other.If you wan't to pick a language for writing "general purpose" applications for yourself then you can't go wrong with C# or Java. They're both powerful, popular and heavily used and are easy to find resources (libraries, code snippets etc.) and help online. Both are great for building GUI apps too.C isn't a perfect idea if you only want to write feature-rich, GUI based applications or anything with greater complexity, C++ is much better for this. They're both also much harder to learn.Python is very specific, some people love it, some people hate, it has huge standard library for almost anything and is perfect for building quick and dirty apps for one-time specific tasks, but this platform is very rare on Windows machines, you won't share your app with your friend without getting him to install Python (which itself can ba a pain in the ass). Fun to use it, but you must be aware of the limitations.Pick Java or C# if you're not sure what exactly you need, C++ would also be a good idea, but will require a bit more effort and time to use properly.

author: Unknown
author_rank: Unknown
timestamp: November 07, 2012, 07:32:42 pm
content: VB has been dead for a while. VB.NET is essentially C# with a slightly different syntax.

author: mtkaalund
author_rank: Contributor
timestamp: November 07, 2012, 07:48:20 pm
content: If I was you, I'd take a look into python

author: sacherjj
author_rank: Frequent Contributor
timestamp: November 07, 2012, 09:03:12 pm
content: Quote from: alm on November 07, 2012, 07:32:42 pmAnd about double the keystrokes required to write the same code in C#. Argh.Python is my go to for quick and dirty utilities.

author: amd
author_rank: Contributor
timestamp: November 07, 2012, 10:32:34 pm
content: Let me just say that in my opinion C# is one of the most versatile, if not the most versatile, languages out there. Java lags years behind in features, most other languages are hard to compare.I think C# is enormously powerful, and expressive too. People who are complaining about double keystrokes: please take a look at the functional programming features of C# (lambda expressions). They are highly expressive and allow you to write very compact code if you know how to use them.The language also encurages you to use good patterns (take a look at MVVM for example). Understanding this concepts takes a while. But you can do huge projects with it. You can use this pattern in other languages too, but C# was partially designed/reengineered to work very well with some of the most accepted patterns.Two important things to mention if you want to do a little bit more than hello-world programs (I got the feeling most people are referring to these kind of programs): You have the .NET Framework, which is the most complete framework and Java-developers jelously looking at itAnd you have the WPF (Windows Presentation Foundation), the most powerful GUI framework out there. If you can master them I bet you wont find another technology which gives you more functionality per programming hour spent.Just consider these limitations: If you need to develop multiplatform applications, you cannot use WPF, and there is only one .NET Framework port for Linux (Mono). If you need multi-platform support take a look at Java.If you need highly optimized code use C++. It won't get any better (except for C in terms of speed). Ok, Assembler, but it's been a while since I last had to write optimized assembler code.We sometimes use C++ assemblies for some optimized stuff and C# for all the rest (you can also throw in some F# if you are feeling lucky or are a mathematician)Although the .NET runtime (used by all .NET languages) has an extremly efficient just-in-time compiler, there is of course overhead. And you need the .NET runtime on the system to execute the code. But on the other hand the code is not precompiled for the target platform which allows the JIT-compiler to optimize the code for the platform it is running on.Also, Visual Studio is a very capable code editor. In my eyes it is the best, and most flexible. And yeah, also fast. Eclipse is very powerful too if you're not using C#.If we really have to we use Java (and get annoyed that we have to program in such an antiquated language). Embedded systems we program in C or C++. If you want to have a try with C++ try using one of the current Gnu-compilers, they really have done fantastic improvements in language features (look at C++11). It has a beauty of its own. Just consider that for embedded development compilers are often - well - bad, and lagging far behind current language specifications.-So - C++ - love the language, but you need time. Executes fast though-Keep your fingers away from Basic in every flavor.-I never fell in love with Python (I tried though), but it is an expressive language, and it also has the capability of mixing several programming styles, and has a big standard library. It is really good.-Pick Java if you have to do multiplatform stuff. In all other cases-don't. It is not very well designed and it's stone-age.-C# - I wrote enough about it. Well-designed language, big standard library, a lot of well-documented patterns, WPF for flexible GUI development (and some other nice stuff to)Daniel

author: GK
author_rank: Super Contributor
timestamp: November 07, 2012, 10:33:21 pm
content: OK, thanks for the replies. I do all my uC programming in C, so I’m familiar with the language. The real learning process here is getting to grips with the IDE. I went straight to VB 2010 Express because I though it would be a simple transition from 3.0, but the language has been so severely modified I have to re-learn it all again anyway; and it doesn’t seem that I can simply port my old 3.0 programs 2010 without completely rewriting them.So, from that perspective, there isn’t much incentive for me to stick with basic at all – might as well just make the transition to C. I was also hoping that 2010 would have comprehensive, inbuilt thingos for controlling the serial ports. Ancient RS232 seems to be built in an a doddle to code, but USB as far as I’ve been able to look so far seems a lot more long winded.Another thing I’m not particularly enamoured with is the publishing options. There still doesn’t seem to be a option for compiling all of the “prerequisites” into a single, stand alone executable file.Visual Studio 2012 is also free and incorporates VB, C# and C++. Any opinions/takes on that package? I’ll check out the other alternatives suggested.

author: sacherjj
author_rank: Frequent Contributor
timestamp: November 07, 2012, 11:53:56 pm
content: Quote from: amd on November 07, 2012, 10:32:34 pmSeems like that was directed at my comment. I meant that VB.NET asa "difference syntax of C#" is one that requires double the keystrokes of C#.My only complaint is still serious bug in log level libraries that Microsoft provides. But nothing is perfect. I vastly prefer C# over most.

author: GK
author_rank: Super Contributor
timestamp: November 08, 2012, 01:26:18 am
content: Quote from: amd on November 07, 2012, 10:32:34 pmOK, I will go ahead and download Visual Studio Express 2012 and give that a whirl.

author: Mechatrommer
author_rank: Super Contributor
timestamp: November 08, 2012, 04:17:17 am
content: Quote from: alm on November 07, 2012, 07:32:42 pmnot for me. i agree the language is primitive but still wrong perception. we need to go back the reason why basic language was created, its closest to human language, good for education, not that semicolon colon codespace codename nonsense things, in other word, not purely compatible with current "software engineering". probably vb.net is substitution of vb, but can you give any advice C/C++ IDE that we dont have to code a thing on creating windows and its control and the controls inside it so on and on? all we need to do is pick and place. ?Quotecontradicting statements?

author: JuKu
author_rank: Frequent Contributor
timestamp: November 08, 2012, 07:23:32 am
content: +1 for C#. Easily the most expressive language I've ever programmed in. (Except for an obscure AI language I used in university that no one has heard about since (Scheme)). Also, by far the easiest to produce quality code. Of course, my #1 choice for windows. Fortunately, I don't need to write portable code for workstations. (If I would, I would look where Qt is nowadays.) For embedded, C is still the king, C++ is the challenger. I only dream about modern languages getting into uC world.I have no opinion on Python, Ruby or other really modern languages, I don't have enough experience. (Yes, I'm an old fart.)[Random musings about other languages: (I do embedded code and some windows front ends to the systems.) My professor used to say that "you can write basic in any language", and that pretty much summarizes my view also. It is NOT good for education! Sure, it might be easiest to get something to work, but for real life size programs (10klines+ new code is smallish application, imo), there are much, much better choices. Kind of like support wheels on a bicycle: You don't fall off when you get started, but when you really need to go... Why waste time to learn something that does not carry on? I wouldn't use support wheels to teach an adult to ride a motorcycle. Sorry for being harsh, this is my opinion only, colored heavily by my need to produce maintainable customer worthy quality code, economically. A hobbyist has totally other needs and priorities.If you ever find a need for assembler, you are doing it wrong. Start over. Modern compliers do better job in optimization that you do. If your tools don't give you enough access to really low level stuff, change tools. there are exceptions, of course: Few ten lines deep inside an OS kernel, compiler writers and chip firmware comes to mind first. Note that DSP (that I also need here and there) is NOT an exception: you should get optimized processing routines with your tools and you don't want to do interfaces in assembler.Worst languages I've ever had the displeasure to use, in order: Forth, assembler, basic, C. Yes, you can do even worse than assembler... I don't think highly about C, even though that is by far the language I've written most code in. Unfortunately, in embedded world there seldom is anything better. C++ perhaps, but that is still not available widely enough to different parts. Besides, the nice features of it are not that beneficial in embedded systems. I wonder why Ada died, there was pretty much nothing(!) wrong there. A subset would be great for embedded systems.]

author: amd
author_rank: Contributor
timestamp: November 08, 2012, 09:38:28 am
content: QuoteWell, there is no way generalizing that Assembler is a "bad" language. It is simply as close as it gets to machine instructions. It is bad to write a complete program in it. One example where it is useful (not only in kernels) is when you are writing a real-time application and need to make sure that an interrupt call returns in a certain amount of cycles. You can simply use inline-asm to do that, counting the cycles is very easy. Doing that with optimized code is, in a lot of cases, non-trivial.But thats uC code, last time I used that on PC was in DOS changing the timer interrupt to send data to a soundblaster...that was some time agoQuoteSorry, I missunderstood you there.QuoteNot really, depends on the context you are working in. I would not use assembler in windows applications, I would not use C# in uC applications (well, we do in one commercial project using the Micro Framework, but it is horrible, bad decision, and it has not a lot in common with C# on PCs). With very small resouces you simply cannot afford a JIT-compiler and the resource management.QuoteHmm, not sure what you mean. Creating multiple assemblies is code separation, and very important to make reusable libraries. If you don't want that, don't do it, put all your code in a single assembly. If you are using third party assemblies, it is much easier to maintain if they are seperate. If you really want to pack all into one executable, try using .NET Reactor. It creates a packed, native executable (very compact too), and you can pack multiple assembies together. Did not use it for a while, don't know if its still up-to-date, and it's a (quite cheap) commercial product.

author: Thor-Arne
author_rank: Unknown
timestamp: November 08, 2012, 01:01:12 pm
content: Take a look atEmbarcadero.They have Delhi (Pascal) and C++ development tools with really a powerful library to ease the development.