Arduino Forum

Development => Suggestions for the Arduino Project => Topic started by: roddi on Jun 18, 2012, 11:32 pm

Title: Total rewrite of the Arduino App needed!
Post by: roddi on Jun 18, 2012, 11:32 pm
Hi,

I think the quite monolithic Arduino app should be separated into several modules, that make it easier to swap parts out for e.g. a sane editor (line numbers? :smiley-eek:), a decent build system.

The library concepts needs fixing. It is hard to write a library with code that can be reused outside the Arduino world. But that seems to be mainly a problem of the weird (or rather non-existing) build system.  :smiley-roll:

The idea of the sketches leaves me puzzeled too. Who came up with the wondrous idea, that any additional file used needs to be copied (<-- no joke  :smiley-sad-blue:) into the sketch directory? A reusability nightmare!

This is so broken in so many ways...

Regards
   Roddi

P.S.: Sorry for the rant, but if you have ever worked with an IDE, Arduino sucks...
Title: Re: Total rewrite of the Arduino App needed!
Post by: westfw on Jun 18, 2012, 11:35 pm
"Feel free"...
Title: Re: Total rewrite of the Arduino App needed!
Post by: Jantje on Jun 18, 2012, 11:38 pm
If you worked with an IDE consider one of the alternatives offered.
I'll promote my eclipse  plugin www.baeyens.it/eclipse (http://www.baeyens.it/eclipse)
I leave it to other authors to promote theirs. 8)
Best regards
Jantje
Title: Re: Total rewrite of the Arduino App needed!
Post by: nickgammon on Jun 18, 2012, 11:47 pm

The library concepts needs fixing. It is hard to write a library with code that can be reused outside the Arduino world.


Why do you want to do that? They are Arduino libraries. However having said that, I've made libraries to do generic things like do regular expressions and big numbers with no problems.


The idea of the sketches leaves me puzzeled too. Who came up with the wondrous idea, that any additional file used needs to be copied (<-- no joke ) into the sketch directory? A reusability nightmare!


For reusability, use libraries. For things that are part of one project, put them in the project directory. Sorry, but I don't see the problem.

This is a 32 kB processor (the Uno and friends are). You aren't going to need thousands of files, like you might for VB or some of the huge Microsoft projects.

The whole thing was designed to be simple for beginners. There are other IDEs around, including the development environment from Atmel. That is, no doubt, much more powerful, and correspondingly harder to use.
Title: Re: Total rewrite of the Arduino App needed!
Post by: WizenedEE on Jun 19, 2012, 02:03 am
I don't think anything specific needs fixing, but I do agree it would be nice to get the IDE rewritten to get rid of all of the processing-specific stuff (like the "tools" folder with Mangler inside...) and separate the code that does stuff (compile, add prototypes, upload, etc) from the GUI. However, it is a lot of work. Perhaps OP could get a few dedicated people together and ask the arduino team if they would accept a complete rewrite of the IDE as a contribution.
Title: Re: Total rewrite of the Arduino App needed!
Post by: westfw on Jun 19, 2012, 07:41 am
Quote
Who came up with the wondrous idea

I guess this should be given a serious answer:  The people who wrote "Processing" (http://processing.org/) !  (Processing is a simplified Java programming environment for desktops.)
To a large extent, Arduino has an IDE borrowed from Processing, a compiler/etc from gcc/winavr/avr crosspack, and a simplified microcontroller library from Wiring (http://wiring.org.co)  One of the reasons that it is difficult to get changes into Arduino is that the value of remaining more-or-less in synch with these other projects is relatively high, compared to the value of getting relatively minor improvements in Arduino itself.
Title: Re: Total rewrite of the Arduino App needed!
Post by: cmiyc on Jun 20, 2012, 04:58 pm

This is so broken in so many ways...

Yes I can see how this is the case.  Just look at how the Arduino project is going absolutely no where and the user base isn't growing.  Oh, wait,  no.  That isn't the case, is it?

Yes the IDE could use improvement.  The legacy of the project is why it is at the point it is today.  For inexperienced users the simplified model of the Arduino IDE is actually a positive thing.

Given the way the environment was created, you can do all the things you suggest, yourself.  For example, I have Xcode and Eclipse both setup to compile code for Arduino.  Funny that even with these wonderful development environments, when I want to run a piece of code real quick, I still go back to the IDE...

This flexibility allows more advanced users to go past the simplified methods of the IDE and get an environment they want.  No matter what changes are made to the IDE, somebody will be unhappy.

At least with the model today, new users aren't overwhelmed with a thousand mouse clicks before blink can be running on a board.  That's very important.
Title: Re: Total rewrite of the Arduino App needed!
Post by: cwrose on Jun 24, 2012, 03:41 pm
I don't much like the Arduino IDE - I built Blinky with it, and then moved
to my standard editor/makefile setup.  But you can certainly use Eclipse,
you can probably use Netbeans, Geany is a good lightweight IDE ...
there's no shortage of alternatives.

And since the projects are all small,  I find re-building the libraries on
the slightest provocation pretty handy, particularly since I tend to
switch compilers pretty frequently.

Will
Title: Re: Total rewrite of the Arduino App needed!
Post by: kf2qd on Jun 27, 2012, 12:17 am
OKAY - since you seem to know all the problems then maybe you should be the one to re-write it. And to offer it for free. As is, considerring what you paid for it you sound more like one of those whiny beggars that demands that everyone do what he wants while offering little to nothing in return.

Maybe you are not aware of how you come across, but if you showed a better attitude you would find that many things go better if you use some tact and manners when dealing with others.

As for me - The Arduino environment was made to be lean and easy to setup and use. I find that it is fairly fast and works very well with the Arduino (and other) package.  I have also done some work in AVR Studio 4 (5 and up use the Visual Studio interface and are just too slow...) when i needed a different environment to do some code in assembly. Perhaps you should try the AVR Studio C approach and then you won't have to deal with Arduino IDE.

Anyways - learn something about manners - Folks will find you easier to tolerate ...
Title: Re: Total rewrite of the Arduino App needed!
Post by: trendski on Jul 03, 2012, 09:27 pm
Quote
Perhaps you should try the AVR Studio C approach and then you won't have to deal with Arduino IDE.


I agree with the above quote. If you love to sound like an expert it's easy to knock stuff that helps get beginners and non-programmers of the ground (like me). If you don't like Arduino just use the available tools out there you do like. It's obvious that the Arduino environment is improving and people want to listen or else this forum section wouldn't exist. So go ahead and rewrite the Arduino IDE and all my sketches too (and alot of other peoples) that probably wouldn't work in your new personalized version  :P
Title: Re: Total rewrite of the Arduino App needed!
Post by: bbccdde on Jul 05, 2012, 08:12 pm
Hi, All!


Alright. That became quite a heated discussion, it seems. I suppose roddi came across differently than he intended; I think he is more of a coder type than the typical Arduino beginner - and thus he quickly became slightly frustrated with the IDE.

I just wanted to *humbly* voice my opinion that the Arduino IDE has a lot of potential in terms of future development (I believe that this is the modern way of putting it :-) ). I do see what most people said here: that the IDE is mostly addressed to the beginners - and non-hacker types. And it does do a great job in this - remembering how easy it has been for me to begin with Arduino in the last year (I had the board and IDE set up in maybe 20 minutes - in a break after lunch), this is amazing.

But there are lots of possible improvements. roddi has suggested technical improvements (on which I can not comment much). I would want to express a more simple suggestion: for me, it would be very helpful to simply implement cooperation with an external editor in a better way. The built-in editor does the trick for the beginning, but once the code gets larger (for me, it is already the case once i need to scroll), the IDE quickly starts to feel a bit long in the tooth... I now use an external editor in most such cases (much easier to set the font size, as just one example, or to use code folding, syntax highlighting, code completion...). Unfortunately, every time I have changed my code externally, and go back to Arduino for compiling/upload, the changes I made in the external editor are not reflected in the IDE. That could be much improved. I think that this would be a great improvement for many. (By the way, I use TextMate on my Mac as an external editor.)

Regarding the other suggestion roddi made: I recently became very confused about the best location of libraries. Since I started last year, I kept those in the Arduino package under /Applications on my Mac (in the "libraries" directory within that package). But in other places (at bildr.org) I had found that those should be stored under ~/Documents/Arduino (which is a location that goes against my feeling for how to organize files on my hard disk; to my feeling, anything in the /Documents directory of my home folder should only be hand-made documents that I have created (such as my own code), but *not* a library file I got from somewhere else; needless to say that this directory does not as of now exist on my hard disk :-D ). Anyway, the two locations suggested in different places do confuse me.
But the point of all of this is only to say that there is still a lot of improvements (and clarifications) that can be made to Arduino. And I look forward to see it evolve. And to discussing my two cents about the possible directions further. :-)

Best regards!
Björn
Title: Re: Total rewrite of the Arduino App needed!
Post by: CrossRoads on Jul 05, 2012, 08:20 pm
On the other hand, roddi made 3 posts on June 18, and none since ....

I don't have any issues with the IDE, I find it user friendly, and once the Tabs feature was pointed out to me, that made for a lot less scrolling in big programs.
I don't do any other programming than for Arduino's, so I don't miss all the stuff that's supposedly missing.
Title: Re: Total rewrite of the Arduino App needed!
Post by: retrolefty on Jul 05, 2012, 08:21 pm
Quote
Anyway, the two locations suggested in different places do confuse me.


Originally the IDE supported only storing library files in the arduino core library folder. The problem being that anytime you loaded a new version of the IDE only the arduino supplied library files would result, as you would have to manually transfer any user stored (self created or 3rd party supplied) library files into the 'new' IDE library folder. Somewhere around version 11 or 12 of the Arduino IDE they allowed one to create a optional library folder within the arduino user's application sketch folder location. That allowed the user library files to survive a updating to a newer IDE version.

Lefty
Title: Re: Total rewrite of the Arduino App needed!
Post by: funkyguy4000 on Jul 05, 2012, 10:26 pm
The Arduino is not meant for the "engineer" or the "coder".  It was made so that they could use them just fine although the Arduino is meant for the "Beginner".  I'm studying to be an engineer and I have worked with may IDE's.  Arduino is a very nice user friendly, beginner friendly IDE to the simple hobbyist that just wants to dabble and such.

If you want to make a new IDE, go for it.  If you want to change it, go for it.  If you want to complain about it, keep it to yourself because that doesn't help anybody.
Title: Re: Total rewrite of the Arduino App needed!
Post by: westfw on Jul 06, 2012, 08:39 am
Quote
it would be very helpful to simply implement cooperation with an external editor in a better way.

Have you clicked the "use external editor" button in preferences?  It apparently causes the IDE to re-read the file(s) every time you do a "verify" or "upload" operation, and it prevents you from changing the code in the IDE window itself.  I find that it works unexpectedly well for such a simple hack; you do have to remember to "save" your work from the other editor before clicking the upload/verify button, but ... no editor knowledge required on the arduino side, no arduino knowledge on the editor side.  Brilliantly simple.
Title: Re: Total rewrite of the Arduino App needed!
Post by: Grumpy_Mike on Jul 06, 2012, 08:47 am
Quote
a sane editor (line numbers?

We have that already, the small number at the bottom of the page is the line number of the current cursor. Why do you want all the lines numberd?
Title: Re: Total rewrite of the Arduino App needed!
Post by: nickgammon on Jul 06, 2012, 08:49 am
We want "go to line", Mike. So if you get an error on line 243 you can go to it, without just scrolling around looking at that number in the corner.
Title: Re: Total rewrite of the Arduino App needed!
Post by: Grumpy_Mike on Jul 06, 2012, 08:54 am
Error messages and line numbers are one out due to the editor starting at line 1 and the compiler at line 0.
When you get an error the appropriate line is almost always highlighted, mind you that is not always where the error is it is just where the compilers ally gave up.
Title: Re: Total rewrite of the Arduino App needed!
Post by: nickgammon on Jul 06, 2012, 09:02 am
I usually get an error at line -1.
Title: Re: Total rewrite of the Arduino App needed!
Post by: nickgammon on Jul 06, 2012, 09:45 am
I think the OP has gone to ground. So we are just talking amongst ourselves here.
Title: Re: Total rewrite of the Arduino App needed!
Post by: bbccdde on Jul 06, 2012, 12:24 pm

Have you clicked the "use external editor" button in preferences?


Hi, westf!

Thanks for Your reply! Actually, I had tried that "external editor" mode previously (since it caught my interest), but it had confused me, since it prevents editing in the Arduino IDE itself - and thus I switched it off again. In that way, I have failed to realize that, when using this mode, the IDE does indeed reload the document each time a compile or compile/upload is started (unlike when the "external editor" mode is switched off).
This mode is actually quite helpful if one knows about it. Although I really would prefer the IDE to play well with an external editor even in normal editing mode - and to reload a document automatically every time it was saved in an external editor (I believe that this should be standard behavior of a modern software).

I started using that external editor mode now. Thanks for pointing this out to me!

Best,
Björn
Title: Re: Total rewrite of the Arduino App needed!
Post by: bbccdde on Jul 06, 2012, 12:40 pm

We want "go to line", Mike. So if you get an error on line 243 you can go to it, without just scrolling around looking at that number in the corner.



Hey, Nick - Dear all,

thanks for Your discussion! I wanted to chime in and say that I also think that implementing this line numbering on every line would be really great - for exactly the reason that Nick pointed out. Also, at the current moment, the IDE (version 1.0.1) seem to have this bug that it gives an offset in the line numbers (at least sometimes). Well, I am sure that the developer of IDE version 1 are still ironing out bugs here.

I do think that the Arduino IDE as it is is very well suited for beginners, and that it does a very good job in abstracting away all the complexities that seem to historically have gotten into the way of the occasional tinkerer. But should that be a reason not to try to improve it? Trying to raise the standards (what I believe roddi has simply tried to suggest - even though he may not have expressed it well enough) doesn't need to get into the way of simplicity. Actually, I do think that, by trying to follow standards (such as standards of C++ etc. - what roddi has suggested), we would help the users later (imagine people would want to move away from Arduino, and start developing other software; following standards is always an important way to teach people). But I can't really comment on how hard it would be to implement - just wanted to chime in that I generally find it a good idea.


Best regards!
Björn
Title: Re: Total rewrite of the Arduino App needed!
Post by: pjrc on Jul 06, 2012, 04:41 pm

Also, at the current moment, the IDE (version 1.0.1) seem to have this bug that it gives an offset in the line numbers (at least sometimes). Well, I am sure that the developer of IDE version 1 are still ironing out bugs here.


This is, or was, issue #907.

http://code.google.com/p/arduino/issues/detail?id=907

I submitted the patch to fix these line number bugs on May 6.  Unfortunately, that was not early enough to make the 1.0.1 release on May 21, but it was committed to github on May 27, so this is fixed in the latest code and will be in 1.0.2.
Title: Re: Total rewrite of the Arduino App needed!
Post by: funkyguy4000 on Jul 06, 2012, 05:23 pm

I think the OP has gone to ground. So we are just talking amongst ourselves here.


Yup, OPs argument was beaten.  Dead thread
Title: Re: Total rewrite of the Arduino App needed!
Post by: bbccdde on Jul 06, 2012, 06:34 pm


Also, at the current moment, the IDE (version 1.0.1) seem to have this bug that it gives an offset in the line numbers (at least sometimes). Well, I am sure that the developer of IDE version 1 are still ironing out bugs here.


This is, or was, issue #907.

http://code.google.com/p/arduino/issues/detail?id=907

I submitted the patch to fix these line number bugs on May 6.  Unfortunately, that was not early enough to make the 1.0.1 release on May 21


Hi, Paul!

Great news. Thanks for the work!

Best regards!
Björn
Title: Re: Total rewrite of the Arduino App needed!
Post by: hilukasz on Oct 19, 2012, 01:22 am
I've implemented some changes to the current system. I did a post on how to modify them as well if you are interested. It's here: http://hellowoo.com/arduino/dark-ui-theme-syntax-highlighting/
Title: Re: Total rewrite of the Arduino App needed!
Post by: giodamelio on Oct 19, 2012, 05:47 am
I use ino (http://inotool.org/) and Sublime Text 2. They are a match made in heaven, Sublimes awesome fetures and then a simple "ino build; ino upload" to the command prompt.
Title: Re: Total rewrite of the Arduino App needed!
Post by: graynomad on Oct 19, 2012, 04:13 pm
Thanks for putting me onto Sublime Text, that's a really nice editor. I've been using Notepad++ which is great but might try Sublime for a while and see how to goes.

I'll check out ino as well.

_____
Rob