Show Posts
Pages: [1] 2 3 ... 48
1  Forum 2005-2010 (read only) / Troubleshooting / Re: Where has SoftwareSerial gone? on: January 18, 2011, 06:17:07 pm
Then the process is probably:
- irrelevant - it doesn't matter if it isn't followed, so just throw it away
- inadequate - it is not sufficient to assure the right outcome
- too difficult - the user needs some training or tools to use the process
- impractical or too demanding - the user needs some help/support
- under recognised/rewarded - the users 'pain' is too great
- just plain wrong

Lots of business processes are like this. Great process design improves the human issues and reduces the burdens.

I give myself a reward, like a some high-quality chocolate, and a really good coffee, to help me along. I also try to schedule it for a specific time, so I know exactly what I should be doing.

I think the Arduino team has been conscientious about being accurate and complete in the Release Notes, so I would use that to announce deprecated or obsolete libraries/language, and maybe build out a little bit from their.
2  Forum 2005-2010 (read only) / Troubleshooting / Re: Where has SoftwareSerial gone? on: January 18, 2011, 05:02:56 pm
Sorry I had to pop-out to buy dinner ...

I don't do documentation unless I'm bored out of my skull. There is always something new to work on, learn, or explore.
I don't like writing documentation either. That doesn't mean that I should be satisfied with the status quo simply because it involves something I don't like doing. That doesn't seem to me an adequate criteria.

A successful strategy to handle our human imperfections is to use a 'process'.

'Process' has got a bad name, but IMHO that is because many processes I see are quite poor. This is partly because it is difficult to develop good processes. IMHO it is also because some of the people who create process are weak at developing good processes, and the objectives of the process are not well thought out (IMHO significant social institutions have been severely damaged this way, but that's an illustration of the difficulty, and not the success).

I'd use something very simple, easy to explain, understand, and do, to handle obsolescence.

IMHO the Arduino team are unusually good at developing good processes, but I am more than happy to contribute if it would help.
3  Forum 2005-2010 (read only) / Troubleshooting / Re: Where has SoftwareSerial gone? on: January 18, 2011, 03:35:09 pm
The Arduino team didn't do that. A member of the forum saw a need for a better software serial class, and developed a new one. What to call it? Well, SoftwareSerial2 seems kind of clunky.

The library was posted on the forum and playground, got good reviews, and was acknowledged to be better than SoftwareSerial. So, support for SoftwareSerial was dropped. It has not been the preferred software serial class for many versions of the IDE.

Okay, I have no problem with it being deprecated. I am only asking for a clear, simple way to know the status of the stuff that is included in the IDE download.

How would you do it?

0. Decide how libraries/language will be deprecated and made obsolete, then publish that on the web site.

I have total confidence in the Arduino team to develop a good approach. They have very good taste.

Here is my cut, assuming that information exists, and this is in-line with that approach:
1. Write in the Library/Reference page that NewSoftSerial is recommended over SoftwareSerial in the line describing SoftwareSerial. Add a link to hop down the page to the NewSoftSerial entry.
2. Write in the Library/Reference/SoftwareSerial page, at the top, very clearly, NewSoftSerial is recommended, and that SoftwareSerial is deprecated, but still supplied for those people who have already committed to using it. Say if/when SofwareSerial will no longer be included in the Arduino IDE download. Add a link to the page which explains the general process of deprecating and obsoleting components.
3. While SoftwareSerial is included in the download with the IDE, include the example program that exercises it. Include in the comment at the top, the note that SoftwareSerial is deprecated, and refer to the Libraries/Reference/SoftwareSerial page
4. When SoftwareSerial becomes deprecated (if it isn't already), add a note to the Release Notes to say that.
5. When SoftwareSerial stops being included in the Arduino IDE download, add a note to the Release Notes to say that.

I've been a developer for 30+ years
And so?
I wrote my first commercial, professional code in 1978. I learned C on XENIX in 1983, and BSD UNIX 1984. My friend Mark had the first C++ compiler in Europe, from a tape made by Bjarne Stroustrup, and he taught me C++. I have taught Software Engineering to post graduate level to industrial and full time students. I have been responsible for the post graduate software engineering training of near 1000 graduates/year, as well as some of the software engineering quality processes for a development shop of several thousand people. So what?

I am thrilled that there are a growing stream of talented folks with only a few years experience coming up with great ideas, fabulous approaches, and teaching me a thing or two.

I think good, simple, lightweight processes to deprecate and obsolete code help make our development activities easier and more enjoyable.
4  Forum 2005-2010 (read only) / Troubleshooting / Re: Where has SoftwareSerial gone? on: January 18, 2011, 01:39:44 pm
But, but, but the Uno Punto Zero project is going to fix all that.  

Of course!
I have been a fool.
You have enlightened me. Thank you, thank you.
The scales have fallen from my eyes :-)

IMHO, making stuff obsolete, and the process around removing things is a thorny issue. IMHO the Arduino team has made an astonishingly, good, tasteful job of dealing with thorny issues. I have total confidence in their ability to do this well too.

I don't feel pre-pending 'New' to a name is good. Do we get NewNewSoftSerial next, then NewNewNewSoftSerial, maybe New4SoftSerial? Where do the previous versions get archived?

I don't think failing to include library example code, which clearly exist, in the download is a good approach to clearly announcing that a library is deprecated. That feels wrong.

Anyway, I've tried to contribute what I can.
5  Forum 2005-2010 (read only) / Troubleshooting / Re: Where has SoftwareSerial gone? on: January 18, 2011, 01:21:45 pm
The library IS included in the Arduino 0022 download for windows.
The fact that examples are not should be a clue for you to stop using it.
No. IMHO that is an awful, bad, bad way to handle obsolete or deprecated components.
As my old boss used to say "Assume makes an ASS of U and ME" :-)
We need to strive to be clear about boundaries and scope.

IMHO, removing the example, so that anyone gets to this state where they have to ask about it (already wasted time), and then responding "you can guess what status it must be when the example is missing" is not a Quality Approach (TM:-).

As I wrote, if it is obsolete or deprecated, it should be clear and unambiguous.

Write that it is obsolete or deprecated in the Libraries/Reference documentation, Release Notes and the code and example.

If it is not obsolete or deprecated, include the example so that folks can test it to get some confidence that it works, and see how it works. This is what usually happens for libraries included with the Arduino IDE, and it is very, very helpful.

IMHO Folks should never need to guess at the status of code included in the Arduino IDE.

If there is a library with some better features, include that comment right next to SoftwareSerial in the Libraries/Reference page, and even in the SoftwareSerial code example.

Otherwise bugs are even harder to find, and beginners are left wondering what to do.

I thought the lack of the SoftwareSerial example code (from the Library reference page) being included in the IDE download was a bug, and I still think it is a bug.

It is either a bug in :
- the contents of the download because the example code is missing, or
- in the reference documentation which should say it is deprecated and will be obsolete at some date or status, or
- in the process around deprecating components prior to making them obsolete, because IMHO it shouldn't ever be unclear.
6  Forum 2005-2010 (read only) / Troubleshooting / Re: Where has SoftwareSerial gone? on: January 18, 2011, 10:18:21 am
The prefix 'new' should provide a clue.

Maybe I have seen the use of the word 'new' too often to believe it means anything other than 'new set of bugs' :-)

There have been several servo libraries, is one with 'New' in its name the one to use ?-)

Have you read NewSoftSerial? It is significantly more complex for a beginner to get to grips with and understand. So it may be technically superior (in some dimensions), but significantly inferior for other purposes i.e. learning.

I don't see why the SoftwareSerial library example referenced on that library page is not included in the Arduino IDE download, on the Examples menu. It looks like an error to miss it.

If someone has decided to make SoftwareSerial obsolete or deprecated, then there should be a clear statement in the code, and documentation (library and release notes) to say so.

If the recommended library is NewSoftSerial, put a clear statement at the top of the SoftwareSerial library page and the library reference page.

Then, everything is clear. No 'clues', or 'hints', or making things so awkward that it looks like a bug.
7  Forum 2005-2010 (read only) / Troubleshooting / Re: Where has SoftwareSerial gone? on: January 17, 2011, 04:49:38 pm
Thanks. I have never bothered doing that. I have always opened a file or #include'd it by hand, so that is a useful bit of information.

For some reason, the IDE won't open the .cpp file.
I used to just open create or open .cpp/.c files in a tab, back in Arduino-0012-ish, and it all worked fine.
8  Forum 2005-2010 (read only) / Troubleshooting / Re: Where has SoftwareSerial gone? on: January 17, 2011, 03:02:31 pm
Thank you for the recommendation.

So what happened to SoftSerial?

I can't find anything in the Release Notes, about SoftSerial being removed.

SoftSerial is listed in the libraries:
and it does not say it is obsolete/deprecated/dead/...

NewSoftSerial is listed on the libraries but not as a replacement, just an improvement.

How are folks supposed to figure this out?

Based on the libraries documentation, I'd expect to see it. I'll go raise this as a bug.
9  Forum 2005-2010 (read only) / Troubleshooting / Where has SoftwareSerial gone? on: January 17, 2011, 02:35:41 pm
I haven't even noticed SoftwareSerial for more than a year, but I wanted to use it today (after half a dozen versions of Arduino IDE), and it isn't on the Examples menu.

I looked in the Package Contents (on my Mac) and SoftwareSerial is in the Libraries directory. BUT, there are no examples!

I had a search of the site and forum, but didn't find anything specific except this:
which said it was obsolete, but there is nothing in the release notes about removing it:
(I haven't been read much for a while, so I may have missed something).

Is their something weird going on?
10  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Board type #define on: April 03, 2010, 02:52:41 pm
There are many different boards utilizing the same processor and it can get difficult to get programs working on multiple boards correctly.

My impression is the majority of problems are caused by the different resources and capabilities of the MCU.
This includes the problem of 32pin vs 28pin package variant of the chip, which have different capabilities.

The next one is the different pin numbers that are used by the board designer, esp. folks making Nano-style boards.

Are their other common problems?

11  Forum 2005-2010 (read only) / Syntax & Programs / Re: Copter with Gyro stabilization. on: April 26, 2010, 07:02:11 pm
You might find useful stuff over at DIYdrones, and the home of Arduipilot, an Arduino-based model aircraft (or model craft) autopilot:

I know a couple of years ago, they were experimenting with helicopters.

12  Forum 2005-2010 (read only) / Syntax & Programs / Re: Sizeof one strings in an 2D array on: April 27, 2010, 07:30:52 pm
The strlen function counts the number of non-NULL values in the array, before the first NULL.

By convention NULL is the value of a pointer.
It is only a convention, but so are words in all human languages.
When we erode the conventional meaning of words we reduce our ability to be precise.

A char array doesn't hold pointers, it holds char values.

The terminating character for a C character string is '\0'

13  Forum 2005-2010 (read only) / Syntax & Programs / Re: Sizeof one strings in an 2D array on: April 27, 2010, 12:35:22 pm
What does myString[2] - 1 mean, anyway?
Not certain, the posted code was:
Length = sizeof(mystring[2]-1;
and I copied in the hope of making it easier to see the relationship between the original code, and the propsed alternative, and I forgot to correct it.

I believe (from the comment) the OP probably wanted the number of non-zero characters in the string, the -1 was to allow for the terminating '\0', and strlen(mystring[2]) is what was needed.
14  Forum 2005-2010 (read only) / Syntax & Programs / Re: Sizeof one strings in an 2D array on: April 27, 2010, 12:14:45 pm
... Not to mention that it is misplaced.

How so?
15  Forum 2005-2010 (read only) / Syntax & Programs / Re: Sizeof one strings in an 2D array on: April 26, 2010, 06:38:09 pm
I have to step through ONE of the strings in the array.

That is a run time thing, i.e. something which happens when the code has been uploaded to the Arduino and executed.

So I assume a run-time solution is okay.

If it is a proper C string, with a '\0' on the end,
should, of course, be
Thanks PaulS
gives the number of characters in the string, upto but excluding the terminating '\0' at runtime.

Of course, the program could use that fact when stepping through the string:

for (char *p=mystring[2]; *p != '\0'; p++) {
  ... look at *p ...

If this misses the point, would you explain a bit more what needs to be done?


WARNING - the code is Unverfy'ed and untested.
Pages: [1] 2 3 ... 48