Show Posts
Pages: 1 ... 18 19 [20]
286  Forum 2005-2010 (read only) / Uno Punto Zero / Re: automatic insertion of closing brace? on: May 24, 2010, 05:04:43 pm
Quote
what is considered "correct"
That could probably be sorted out based on the position of the  opening brace.

Quote
I think that learning the harder/manual way is necessary if one really wants to learn the craft of programming.
I don't agree with the "tough love" approach to programming (i.e. not providing this sort of assist) since the whole point of Arduino is making physical computing (and the programming behind it) more accessible to a wide range of people.


287  Forum 2005-2010 (read only) / Uno Punto Zero / automatic insertion of closing brace? on: May 23, 2010, 06:29:14 pm
Hi all - not sure if suggestions are still being collected but I thought I would suggest another one for the IDE: when an opening brace is inserted, a line space and then a closing brace would automatically be inserted with the correct indentation.


I've been using Eclipse and appreciate this feature there. Unclosed braces for nested conditionals are one of the things I recall getting caught up with when I started out with Arduino and they can be hard to track down since formatting fails with a missing brace.

Appreciate that the IDE is not fully in control of the Arduino project and there are limited resources/lots to do, but this might be relatively easy to implement.

288  Forum 2005-2010 (read only) / Uno Punto Zero / Re: Areas for discussion. on: April 02, 2010, 11:59:40 pm
Quote
The ability to print multiple fields can be done now using a method published by Mikal Hart here: http://www.arduino.cc/playground/Main/StreamingOutput
Its syntax is a C++ standard but I wonder if it looks a little scary to non-technical people?

Took a look at that link. I'm not exactly non-technical but I have no idea what the relevant line (below) is doing.
Does this compile as is? class T?

[size=10]
Code:
template<class T> inline Print &operator <<(Print &obj, T arg) { obj.print(arg); return obj; }
[/size]
289  Forum 2005-2010 (read only) / Uno Punto Zero / Re: Areas for discussion. on: April 02, 2010, 12:21:00 pm
Not sure if this is what is meant in the last few comments but being able to avoid this sort of code would be great:

Code:
Serial.print("x ");
Serial.print( );
Serial.print(" y ");
Serial.print(y);
Serial.print(" z ");
Serial.println(z);

Compared to:

Code:
Serial.println("x", x, "y", y, "z", z);

290  Forum 2005-2010 (read only) / Uno Punto Zero / Re: Boilerplate setup/loop definition stubs on: March 02, 2010, 07:02:02 pm
 
Quote
I'll vote for a boilerplate template that gets used when you select "New..." from the start menu.  Having it just be an editable file somewhere so people could customize it if they want would be a bonus.

An external text file that gets loaded would be an awesome option. Add your own header format etc.
291  Forum 2005-2010 (read only) / Uno Punto Zero / Boilerplate setup/loop definition stubs on: February 24, 2010, 07:27:54 am
Hi -

This is trivial but I think useful from a teaching/standardization perspective (and I think I recall seeing it mentioned at various times in the forums).

When a new sketch is created, including the required setup/loop functions by default would be a friendly option for new users. This would not annoy more experienced users in most cases (I would welcome it).

I imagine it is on a 'to do' list somewhere but never got a priority bump with everything else that needed doing.
292  Forum 2005-2010 (read only) / Uno Punto Zero / More specific/helpful error msgs? on: March 20, 2010, 10:14:31 pm
I don't know the innards of the compiler used by arduino but I'm wondering if there is any latitude for trapping common errors like missing semi-colons and/or simplifying the error display. Sometimes the cascade of red text resulting from a missing semi-colon is, to say the least, disheartening!  smiley

Processing seems to do this - though being Java it's a whole different beast. It will toss up a friendly msg along the lines of "Could you be missing a semi-colon?"

Also, I realize that a certain amount of the error text is helpful in finding the errors but there is a a degree of TMI as well.
293  Forum 2005-2010 (read only) / Uno Punto Zero / Re: Library handling on: February 23, 2010, 11:42:49 am
Hi All,
 
(noting that this may not be what the OP meant).

I would like to make a plea for clearer/more transparent handling of "Libraries" ("Classes").

The Arduino build process is a bit of a black box, documented here and there somewhat briefly in the FAQ and scattered through incomplete forum posts. For users coming from, say Processing, or a higher level scripting language that supports OOP, the way Arduino handles custom classes is very confusing and error prone. This makes handling more complex coding projects needlessly difficult and can be an impediment to users working with the Arduino and getting tripped up by the training wheels.

More than a few times I have found myself wrestling with the Arduino build process (rather than the specifics of the project code) because of this lack of transparency and/or info. I've had the feeling that while the Arduino concept is great(!), after you reach a certain experience point or project complexity it often blocks you/gets in the way, without any direction on how to proceed/work around/learn through it.  Perhaps it is not part of the Arduino concept to be able to scale easily in this way? If so, that's fair. It might simply be that more info on the distinctions between Wiring and C/C++, on the internals and limitations of the IDE, etc. would address this issue.





294  Forum 2005-2010 (read only) / Uno Punto Zero / Re: It is brilliant - lock it down. on: February 25, 2010, 04:22:33 pm
Quote
analogWrite may sound like a nice intuitive name but its not really very helpful because its behaviour appears odd to people that don't understand why only certain pins can be used, and only if some other library is not using them, and with values that have a different range from analogRead.

I have seen many non-technical people come unstuck when introduced to  analogWrite because they expect it to be similar to analogRead - in the same way as digitalWrite is similar to digitalRead.  

Guess I am in the minority on this but as a non-engineer I think 'analogWrite' is appropriate. Here's why I think this:

digital = on/off - binary
analog = range/continuous

True, analogWrite might be more accurately named simulationOfAnalogOutput but that is not necessary for the less technical user to understand, at least at first. PWM is the way this simulation is achieved/implemented. The PWM pins available, etc. I see as simply FOL details with specific boards.

I guess I see analogWrite in the same way as setup & loop - simplifications/higher level abstractions that are easier for new users/less technical people to grasp.

No matter - just thought I would offer this POV.

295  Forum 2005-2010 (read only) / Uno Punto Zero / Re: It is brilliant - lock it down. on: February 24, 2010, 07:52:36 pm
Quote
I'm picturing a workshop where an artist asks, 'What's that PWM mean?' and the teacher says 'Pulse Width Modulation, we'll get to that after the break.' What are the chances that the artist might just not come back? And I'm not picking on artists, just trying to further dramatize a metaphor.

Hey! I'm an artist!  smiley

I think 'analogWrite' is right on.. (sorry). It pairs with 'digitalWrite' and that is the point/contrast/teachable moment. 'pwmWrite' is just acronym obscure. Engineers seem to love acronyms and abhor verbosity (or typing..) but neither are good for learners.

296  Forum 2005-2010 (read only) / Uno Punto Zero / Re: It is brilliant - lock it down. on: February 24, 2010, 07:33:44 pm
Smiley,

Good points and I partly/mostly agree. Your post brings up a long held concern of mine that I'll contribute here rather than start a new thread.

That is:

I think it is important that new/intermediate users are aware of and understand, at least in the broad outlines, what is being simplified for them and what they are being shielded from. It doesn't have to be understood at first, or even in any great detail but the context should be there/presented so that the scope of learning and experience is not limited to 'Arduino' but can be scaled to a larger context.

This can be handled through documentation and overview type content. The Arduino project is very enabling and easy to work with. This is its brilliance. My concern is that having been buffered from the underlying complexity, users become locked into or see only the Arduino way of things. Said another way, I think the Arduino project should provide for users growing beyond Arduino, should they choose or need to.

It could be argued (if one agrees with this POV) that this task is best served by 3rd party books/sites. I would agree to an extent but I think there is a place/need on the Arduino site/within the docs to describe and detail what is being done (simplified), what the trade-offs are, and where limitations might be encountered. Also what some 'next steps' might be. This is not the sort of thing one does (or even can do) while a project is being developed but I think it is completely in scope and appropriate to an Arduino 1.0 milestone.

Oh, and I'd like line numbers displayed in the IDE ;-)
Pages: 1 ... 18 19 [20]