A Hardware guy drowning in a Software world!
#1
Posted 25 August 2011 - 12:52 AM
#2
Posted 25 August 2011 - 03:09 AM
Terry Massey
#3
Posted 25 August 2011 - 05:19 AM
I am an EE, but since the beginning I loved the "programmibility" of some circuits. Programming in assembler is much like reading the data-sheet of a certain CPU, then applying the rules given by the manufacturer. In other words, YOU must think as the machine does.
Programming in C/C++ is much like my kid often says: "I wish have to sort my room, but I have no time (and I want to play instead)". From my eyes of "physician" (there are well defined rules), programming in C/C++ is a big mess, where anyone can do anything. A sort of anarchy world. No surprise when the leaks pops out, or some pointer is pointing "somewhere else"!
As the hardware resources became cheaper, the programming language has evolved toward much more well defined. The actual problem, if you want, is that every manufacturer would to promote its own language, instead to create an unified one (accepted worldwide). Here I don't want to process this or that language, and just talk about C# because it is primarily involved in the Net Micro Framework, thus Netduino and GHI's stuffs.
C# is a C++ looking language, having several well-defined rules. That leads to several benefits in order to create an application:
- strongly-typed language, so there's no way to misintepret a data type;
- well-structured language model;
- garbage-collection, so you won't have to worry about the deletion of any object no more useful;
- the compiler is able to detect many mistakes;
- induction to the "pattern-practice" programming (instead to write bunch of code "spaghetti-glued");
All these benefits have a cost in terms of:
- loss of performance;
- high request of resources (RAM, ROM and CPU)
Let's get back...
When you want to get a led blinking, perhaps the C#, thus the Micro Framework, are a bit overkill. The advantage is becoming clear when you are going to create medium-complex apps. On PC, I have programmed for years in Pascal, VB6 and others, but .Net (and C#) decreased dramatically the errors in my apps, as long the reliability is much higher.
If you read my signature, I may describe the .Net+C# as "a decent attempt to rule the software world, so that it will be a bit less messy".
The road is still very long, however.
Cheers
#4
Posted 25 August 2011 - 06:23 PM
#5
Posted 25 August 2011 - 09:19 PM
#6
Posted 26 August 2011 - 01:25 AM
Attached Files
#7
Posted 26 August 2011 - 04:44 AM
I agree at 100%.No-one wants to know about the low, sewer level details of the FAT system anymore. Or the gory details of a mere flip-flop ... Shall I continue?
Almost any EE knows how to programming, surely not the best way, but he knows both the disciplines.
A CS does not learn anything about electronic, and does not want to learn it.
Any reason?
Cheers
#8
Posted 26 August 2011 - 01:19 PM
I apologize ahead of time for the long post.
As a newbie to the C# world I, as a hardware weenie, try day after day...
...
So now I am throwing myself at the mercy of the C# gurus and screaming for help.
This is a great post and I want to comment on so many things that have been said… starting at the top.
I’m sure it’s hard on both sides of the fence... because I am on that other side from you. It’s very hard to gauge what and how much help someone needs. Most of us are quite secure in our careers and we’re not used to having to ask for help. So sometimes it’s hard for us to ask or ask such that it gets an answer that actually helps us. When a hardware person says “it’s so simple” tends to make me think I’m asking stupid questions when I ask for hardware help. But I’m struggling with what I’m sure are simple concepts to you… like pull-up and pull-down resistors, how to use a voltage regulator BUT MAINLY should I be using a voltage regulator in “this” situation.
Someone that didn’t come from a formalized CS background might understand your needs best. Mario stands out in my mind since he also comes from a hardware background. I actually come from an AE background, but made the transition to professional programmer in the early ‘90s. I still remember the epiphany when OOP finally made sense over the rigid, procedural methods my ’60 era PhD professors taught in structural engineering classes in the ‘80s. It’s not that it’s that difficult, it was more a matter of losing pre-conceived notions.
The biggest struggle (I would imagine) for you will be coming to grips with the .NET framework. C# in itself is logical… used procedurally or with OOP concepts. But knowing what class to use and which methods or properties are needed must seem to you like me trying to decide between two model numbers of some voltage regulator OR if even the voltage regulator is what I need at all! It’s all FM to me! The second thing that will cause confusion will be the multithreaded aspects that other microprocessors like Arduino don’t have (so I hear).
Good question… to you hardware types… Are there any other Microprocessors that inherently have multithreading?
To start answering you specific questions… I offer this. If you are more of the dig-it-out-on-your-own type of guy, I think the class you are looking for is: InterruptPort. If you want a little more how to use… I’ve been exploring this same issue in this article: Spin'r Up.... In it you will find the source code that should be close to what you will need in a very software equivalent of a bread-board style. In the follow up article (hopefully out this weekend) I will be encapsulating it in a more professional class of its own.
If it doesn’t help you as it stands, it would be very helpful back to me IF YOU do ask more questions. It would help me greatly to understand the struggles of my peer’s on this forum.
If anyone needs hardware help, let me know!
AND… if you could offer the other side of the fence on this question of mine: Proper Servo Driving...
If my message helped you... how 'bout giving me a
www.MessingWithReality.com
#9
Posted 26 August 2011 - 01:32 PM
If you read my signature, I may describe the .Net+C# as "a decent attempt to rule the software world, so that it will be a bit less messy".
The road is still very long, however.
Cheers
Hi Mario,
Have you been reading any of the news on the upcoming Windows 8? The reason I ask... your statement above... maybe be a little dated.
For all those with any history with Microsoft, you know that they change directions at the drop of the hat... Pascal, VB, C, C++, C#, jQuery or COM, DCOM, COM++, Webservices...
Anyway, there were some comments in the intro video of Microsoft’s upcoming Windows 8 (by Microsoft) that they may be abandoning C# and .NET entirely and moving to html and javascript as the main programming paradigm for the new OS. It has the blog-o-sphere in an uproar!
If my message helped you... how 'bout giving me a
www.MessingWithReality.com
#10
Posted 26 August 2011 - 01:44 PM
...
I am using (obsolete but replaceable with new RoHS parts) Fairchile QRB1134 sensors mounted close to the wheels to detect the gaps. There will be a gap every 45 degrees.
The collision detector is a home made PIC based 38KHZ IR remote controller and an Osram IR LED. I pulse that at ~38KHZ and watch for reflections and the PIC processes all of that stuff for me. If anyone wants the schematic & HEX code for the detector just let me know. It works beautifully (and the parts are very inexpensive). I can provide jpg's if anyone wants.
...
My eyes are about to roll back into my head with all the EE words. If I didn't read your specific software need in the first post, I would be totally lost by this statement… and I’m quite comfortable with the physics needs behind your project!
AND OH HAIL... YES! <in my best southern drawl> Bring on the pictures.
If my message helped you... how 'bout giving me a
www.MessingWithReality.com
#11
Posted 26 August 2011 - 01:57 PM
A CS does not learn anything about electronic, and does not want to learn it.
Any reason?
Not being a CS guy, I can only speculate from the cheap seats.
- As you EE types will attest… The CS guy’s world turns upside down every so often… yours (to its merits) doesn’t. CS people just don’t have the time.
- Maybe its friendly (or not so friendly) rivalry. I know in my ex world of AE, we had some of our own… Although Aerospace Engineers, Mechanical Engineers and Civil Engineers share much of the formal training there was the saying...
My sister and brother-in-law are both EE types and I can attest to a definite pecking order in their world as well!
If my message helped you... how 'bout giving me a
www.MessingWithReality.com
#12
Posted 26 August 2011 - 02:27 PM
Too general a statement says the software engineerA CS does not learn anything about electronic, and does not want to learn it.
regards,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#13
Posted 26 August 2011 - 03:06 PM
Please don't spread FUD. Microsoft isn't abandoning C# at all. Even if they completely cut silverlight(which they haven't claimed to be doing), that doesn't mean they are getting rid of C#. All this sprang from some windows 8 demo using html5 and javascript and people started freaking out about silverlight(maybe?) being killed and that somehow cascaded down to C#.Hi Mario,
Have you been reading any of the news on the upcoming Windows 8? The reason I ask... your statement above... maybe be a little dated.
For all those with any history with Microsoft, you know that they change directions at the drop of the hat... Pascal, VB, C, C++, C#, jQuery or COM, DCOM, COM++, Webservices...
Anyway, there were some comments in the intro video of Microsoft’s upcoming Windows 8 (by Microsoft) that they may be abandoning C# and .NET entirely and moving to html and javascript as the main programming paradigm for the new OS. It has the blog-o-sphere in an uproar!
Microsoft hasn't made any statements of cutting silverlight or C# or .net.
Source? The video I *think* you may be referring to that started this mess, made no such claims of C# being cut out. That was some conclusions people somehow jumped to and some media and microsoft competitors ran with.Anyway, there were some comments in the intro video of Microsoft’s upcoming Windows 8 (by Microsoft) that they may be abandoning C# and .NET entirely
#14
Posted 26 August 2011 - 07:38 PM
Personal viewpoint. MS is going to create new solutions and/or renew existing ones for several reasons (I don't want to process what they are). My job is design software in collaboration with my team, which is creating hardware and firmware instead. All these things must agree, and be realiable.Have you been reading any of the news on the upcoming Windows 8? The reason I ask... your statement above... maybe be a little dated.
For all those with any history with Microsoft, you know that they change directions at the drop of the hat... Pascal, VB, C, C++, C#, jQuery or COM, DCOM, COM++, Webservices...
Anyway, there were some comments in the intro video of Microsoft’s upcoming Windows 8 (by Microsoft) that they may be abandoning C# and .NET entirely and moving to html and javascript as the main programming paradigm for the new OS. It has the blog-o-sphere in an uproar!
Most of the MS promises (or perspectives) are *FAR* from being applied in our world. So, WinXP or Win8, there are many tech areas that are marginally involved in this change.
Some example:
- the hardware is often fitting the specific target requested: no excessive overhead of resource are allowed, due excessive costs;
- the firmware is far from being C#-like, because (1) it's not real-time, and (2) would require ton of hw resources;
- most of our customers DO NOT want to connect their system to the internet, due the possibility of intrusion or whatever else;
- most of our customers DO WANT still to use XP, because they (1) don't like to change OS, and (2) too bad voices over Vista (with Win7 is getting better, but many water has to flow under the bridge...)
- ...and so away...
Personally, I don't like so much the web over the desktop. A web page has many wonderful benefits, but it's far from being compared to the simplicity and the performance of a good desktop app. Maybe the web will surpass the desktop, but I guess that takes many years to be a reality.
Cheers
#15
Posted 27 August 2011 - 08:44 PM
… You may even get a headache by reading it, but we are a bunch of friends talking together, as we were in a great cafè! So, enjoy...
I just meant it to be a casual comment over a beer… NOT a world changing moment. Glen you are correct, after reviewing the video again… it does not say abandoning C#.NET, but does say a “new platform”. So my words were inflammatory, however, it’s only FUD if someone is scared of change. It didn’t even cross my mind that it might cause anyone even a moment’s pause. And anyone who has programmed for any length of time knows change is inevitable. If I was still (as I once was) doing (1) Fortran on Unix… (2) C with Windows SDK or (3) C++ with MFC, I would be far less marketable (and less productive) than I am now with C#.NET! Some day (and I don’t think any time soon) something will replace C# and .NET. It’s nothing to fear… it’s just a simple fact.
Windows 8 “is said” to be a significant change and at least partially a response to iOS and Android. The fact that Microsoft has lost considerable momentum (if not market share) as compared to Apple and Google surely is not lost on Microsoft. Opening up the development arena on Windows 8 to the html /java script world makes a lot of sense. Will Microsoft abandon C#.NET? Not likely, but Microsoft hasn’t really abandoned C/SDK developers, Web Forms, Windows XP, DCOM or any number of other, “old” technologies.
If my message helped you... how 'bout giving me a
www.MessingWithReality.com
#16
Posted 27 August 2011 - 10:15 PM
Attached Files
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users