c# is driving me nuts
Jas
c# is driving me nuts
Jas
I was a VB guy too before I got into microcontrollers. If you take the time to pick it up it can be quite useful. After a few years of C# I actually hate when Iām required to go back into VB
For me, the IDE and intellisense works so much better with VB.
At work, Iāve found when people code in C# they tend to try to be āCleverā in the code which makes it almost unreadable.
No one has ever had a problem trying to understand the VB.net code though
Jas
p.s. Iām sure lots of people donāt feel the same way, I just like VB.net (Note I donāt mention VB6 )
I will never hate on VB. Itās where I started, and it will always have a place in my geeky heart.
But as a Gadgeteer guy, when it comes to building up event handlers, itās really hard to beat += Tab Tab as a quick way to get the code writtenā¦just sayinā
There is a reason behind not having 4.2 yet. Details come this month.
You have me there ;-).
Thatās where Iām make a lot of use of cut and past. I wonder if the next VB version will have added a quicker short cut.
Jas
Get Resharper. Well worth the $$$. Itāll give you all of that and more.
I started out in VB. But much like Skewworks, I cringe at the thought of having to write VB.NET code. In fact, I wonāt even consider VB jobs anymore. But, I understand there are people that like it and I wonāt diss anyone for it. However, with so few resources available on the NETMF & Gadgeteer teams it really pisses me off that they were used to port NETMF 4.2 to VB rather than giving us more powerful language & debugging features. I assume this also means that GHI will have to spend more resources to provide C# & VB ports of all itās drivers. Which will in turn drive up the costs of boards and slow down the release of future NETMF releases.
Gus, Iām curious to hear how GHI plans to position itself in regard to multiple language ports? I suppose it doesnāt directly impact the FEZ SDK since itās delivered compiled. But, what about the OSH SDK? Are you porting it or will it be up to the community? Will all the SDK sample code also be ported to VB?
@ ianlee74 - Iām drawing a blank on what the MS code name for the project is right now ā¦ but there was a demonstration that allowed you to copy C# code and paste it into a VB.NET project.
Instead of it just pasting as normal, it would refactor the code (using MSIL iirc) in to VB.NET.
** I found it ā itās called Project Roslyn. I watched a video of Hejlsberg being interviewed about what was coming in .NET 5 and this was brought up.
http://www.dreamincode.net/forums/topic/247569-roslyn-ctp-coming-soon-to-vs-near-you/
Itās been released as a CTP.
@ mhectorgato - I remember seeing something about that a while back. Itās very cool and will be nice for consultants getting paid to upgrade VB projects to C# Otherwise, I think itās just a MSR toy that someone had fun making.
What would be interesting would be a F# port to NETMF. Language features that make it easier to manage multithreaded apps would be nice.
When I first learned programming one thing my teacher told me has always stuck in my brain, āSeparate the logic from the implementation of the logic.ā He was speaking of designing a program so that you could follow what you were trying to accomplish without getting lost in the details. Most of the work is done in small functions (the implementation) and the main body of your code consists of orchestrating the functions (the logic). This was even back when we only had Atari 400 and 800 computers programmed in basic (with the awful āGOTOā command!).
I have used several different programming languages over the years but by separating what Iām trying to do from how it will be implemented it has made it easier to move between languages. Iāll quite often forget details of a particular syntax but by knowing in general what Iām trying to accomplish (like use a conditional branch or a iteration) makes it easier to remember or find the syntax to accomplish that is not too hard.
For example several years ago I wanted to write a parser to read TI calculator Basic files. I was using a programmable calculator a lot and TIs PC based editor stunk. I was also trying to learn VB.NET at the time so I thought it would be a good learning experience. There was a surprising amount of information about the TI calculators on the internet and I even found some sample code but it was really, really awful; page after page of case statements to handle all the possible TI Basic tokens.
The first thing I thought of is that I would rather have an array or the opcodes and be able to call the correct opcode decoding function based on its index in the array. In C++ I would have used function pointers for this but they did not exist in VB.NET. After a few hours of reading and searching I found VB did have delegates so I was able to accomplish the same thing AND in a type safe way!
Anyhow the point is concentrate on what it is your trying to accomplish at first, not how to accomplish it. At least that has helped me to move between languages overt the years.
Please excuse my ignorance (Still new to TinyCLR)
Wouldnāt C# and VB.net generate the same code that gets run on the hardware?
I know with Windows Phone, they added a compiler option that dropped the need for the vb.net runtime library (Who needs the legacy MID, LEFT etc. anyway) which meant it generated the same code as C#.
Is the driver code mentioned a library or does this need to be compiled along side the main code?
Jas
Yes both are compiled and you can have vb and c# running in one project.
āLanguage features that make it easier to manage multithreaded apps would be nice.ā
async keywork and Task is the way forward imho there.
And here is why there was some delays http://netmf.codeplex.com/releases/view/82448
I wasnāt sure if I could have talked about this publicly so I didnāt but now you know
@ Gus 4.2 is getting closer and closer! Awesome!
@ William. Long time no see! How are you, man?
I went there and donāt see any reasons or explanation of any sort givenā¦what delay? why? This just looks like an upgrade to version 4.2ā¦is it a big deal?
It is. Before releasing an SDK you have to do a lot of testing to make sure everything works on all devices.
So it is an option of going through all of that with the old RTM and then do it all over again with the updated RTM
or
delay the release and do it once with the most recent RTM.
@ hoyt - Iāve been pondering using this graphic on a few topic posts herein for some time. Not wanting to ārock the boatā, I have refrained. Your questions, however, are deserving of this achievement awardā¦
Sorry this wasnāt clear. We were waiting for NETMF 4.2 QFE1 which was juts released today
I see on this page there is a link to SDK documentation !!!
When I click on it downloads & opens a very interesting menu tree, but trying to open any of them gives this message:
āNavigation to the webpage was canceledā
what gives? I want to see the information, how do you activate this?