Pages: [1] 2   Go Down
Author Topic: Be able to set a region in a defined piece of code  (Read 3384 times)
0 Members and 1 Guest are viewing this topic.
The Netherlands (Rotterdam)
Offline Offline
Full Member
***
Karma: 1
Posts: 169
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

Some time ago I've requested the following feature.

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

I really like this feature, mainly because it enhances the IDE overview. How do I know I the feature will be added to Arduino 1.0?

/me
Logged

0
Offline Offline
God Member
*****
Karma: 2
Posts: 596
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If a sketch code becomes so large it needs "regions" then it's probably better broken into multiple files or better yet one or more libraries.
I don't say that regions wouldn't be handy, but IMHO they'd add complexity for newcomers without bringing in real innovation.

All of this IMHO, of course :-)
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, in Visual Studio, which I use on a regular basis, the ability to collapse blocks of code (if blocks, comment blocks, whole functions, etc.) is a very handy feature. Once a function has been developed, and tested, and known to work, that function can be collapsed, to allow more of the code being developed/tested/debugged to be seen.

I have classes (not for the Arduino) that run 60,000 lines of code. The scroll bar, with nothing collapsed, is so small it is nearly invisible to these old eyes. Collapsing code that has been proven to work makes it much easier to work with.

Just my 2 cents worth.
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yea I use the block/code collapse feature in notepad++ (wish gedit had it) all the time, even if your not whipping up 60k lines it just makes things easier cause you can focus on the troubled parts, with out getting mixed up in totally unrelated code as your scrolling
Logged


0
Offline Offline
God Member
*****
Karma: 2
Posts: 596
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So it seems code regions are useful in very large projects. That's just why they shouldn't be included in the Arduino IDE. For small projects, they're not so useful it seems, and Arduino is not targeted towards experienced developers who need to write thousands of lines of code (which probably wouldn't fit in the uP anyway).
Let's protect the Arduino IDE from that dreadful virus called featuritis. Advanced developers can always switch to a more advanced and featurefull editor, after all.
Logged

Seattle, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 248
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Let's protect the Arduino IDE from that dreadful virus called featuritis. Advanced developers can always switch to a more advanced and featurefull editor, after all.

I second that emotion.
Logged

.andy

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So it seems code regions are useful in very large projects.

only if you choose to ignore my post where I try to say its very useful in projects of all sizes, next time I will just be blunt instead of assuming the reader would figure that out

I personally am not sure where the line is on noobie stuff, "we" hand them a kinda pricey board that could burst into flames, show them how to mess with mains current, then turn around and say a +/- expansion box in the IDE is too confusing for them
 smiley-razz

a system like notepad++ uses is automatic with the blocks of code, if you dont want to use them you just dont click on them, the VB type system above you add lines, again if you dont want them you dont use them

I think its a good option
« Last Edit: July 31, 2010, 04:17:41 pm by Osgeld » Logged


0
Offline Offline
God Member
*****
Karma: 2
Posts: 596
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I personally am not sure where the line is on noobie stuff, "we" hand them a kinda pricey board that could burst into flames, show them how to mess with mains current, then turn around and say a +/- expansion box in the IDE is too confusing for them

After all you may have scored a point :-)

Well I just don't like code folding. Let alone that regions thing which is supposed to be code folding on steroids. And let's keep ms crap out of arduino!

Ah, I feel better now... /me takes a deep breath

 ;D
Logged

Seattle, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 248
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
next time I will just be blunt instead of assuming the reader would figure that out
I understood your point and was not ignoring your post.

But the discussion is not only about whether a feature is useful in small or large projects. There is also value in keeping the complexity of the IDE user interface low. It is one of the great successes of Arduino that extreme novices can use the tool with very little confusion.

Every feature that gets added, regardless of how useful or simple, adds to the cognitive load in learning a new tool. Compare the novice's reaction when confronting for the first time, say, Photoshop vs iPhoto.

I don't know for sure where a code expand/collapse feature would land on the various usability/complexity cognitive axes, but I do know that it is healthy to have a good discussion about it before adding a feature.

Not doing that leads to the way of Microsoft Word and who knows what else...

"Lasciate ogne speranza, voi ch'intrate"
"Abandon all hope, ye who enter here"
-  Dante Alighieri
Logged

.andy

Nowhere
Offline Offline
God Member
*****
Karma: 3
Posts: 852
|-\ |\|\
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am not leaning towards this idea either.
Sure, it would be useful, but I've found in some of my projects the cluttered cluster of functions that are not currently collapsible may have been beneficial; they drove me to organize things in classes and libraries, which IMO organize things even better.

I also like the simplicity of the IDE, leaning me further from the regions idea.  I sort of like having only 2 areas of text (code section and message box thing for errors and stuff), 3 scroll bars, a row of tabs, and 6 or 7 buttons in the window.
I agree that arduino MUST NOT become like Microsoft word...*shudder*
 smiley-grin
Logged

Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

being one of the more clunky broken "IDE's" I use its almost right up there with wordpad, least wordpad saves on exit...

anyway I will agree that isnt the most important thing, but for version 1 overall there doesnt seem to be that many great ideas making it in, and a lot of bugs in the IDE automatically get shoved off onto processing and deemed "unfixable" so what is acceptable? (keeping in mind people have used a computer before arduino and things like options are abundant)
« Last Edit: August 01, 2010, 01:21:31 pm by Osgeld » Logged


Seattle, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 248
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I disagree that the IDE is broken and clunky. I find its clarity and simplicity to be one of its strengths.

Edit the code, upload it to the board, it runs. That is very easily explained and easily grasped by novices.
Logged

.andy

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hold shift bump delete watch half a page vanish, doesn't save on exit(lost entire nights worth of effort over that one), sometimes doesn't save when manually saved, has issues with library locations, its HUGE (seriously 230mb for a text editor? over half of that is java), and you cant even change the font size

yup, not clunky at all  smiley-wink

but that is what one gets trying to shoehorn something into a framework that is not designed for it, its like trying to write a IDE out of love2d or pygame or processing (oh wait)
« Last Edit: August 01, 2010, 03:25:20 pm by Osgeld » Logged


Nowhere
Offline Offline
God Member
*****
Karma: 3
Posts: 852
|-\ |\|\
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
hold shift bump delete watch half a page vanish,  ctrl-z? doesn't save on exit(lost entire nights worth of effort over that one) when I exit, it asks if I want to save, maybe I don't know what you mean by "exit" , sometimes doesn't save when manually saved, I've never had problems with that has issues with library locations, Again, never been an issue for me its HUGE (seriously 230mb for a text editor? uhh, it's a bit more than just a text editor, you have a whole programming language included over half of that is java), and you cant even change the font size yes you can, look in the preference file

I also disagree that it is clunky.
Logged

Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
ctrl-z?
so users that cant be expected to handle a + box next to their code is now a keyboard shortcut expert, its broken behaviour with what anyone expects out of text entry

Quote
when I exit, it asks if I want to save, maybe I don't know what you mean by "exit"

my bad they fixed that in 18, it did nothing for the longest time

Quote
I've never had problems with that

I cant make it repeat reliably, but if you save a sketch outside of the default location it will pop up quite quickly

Quote
Again, never been an issue for me

try putting a lib in your sketchbook folder

Quote
uhh, it's a bit more than just a text editor, you have a whole programming language included

that's kind of the problem, the linux download is 7mb! yes you have to add dependencies like java and avrgcc, but

A) who doesnt have java already
B) the entire package of avrgcc is like 30mb

Quote
yes you can, look in the preference file

and again a simple minded user's head would explode if extra options were added, but if they really need to, they can hunt down and edit preferences.txt
 :smiley


whatever, I don't want to argue about it till the end of time

« Last Edit: August 01, 2010, 08:19:16 pm by Osgeld » Logged


Pages: [1] 2   Go Up
Jump to: