I'm really having a good experience with a language I'm just starting to pick up, Ruby. It's opened my eyes to a new way of coding, and a new way of thinking. If you hadn't already heard, Ruby is supposed to be coded in a meticulous manor and religiously scripted manor. The language itself can be used to express solutions in a multitude of different ways just like any other language, but in the ruby community, they have all adopted a set of standards and principals that most code documentors adhere to. The "Rubyist Rules" that most closely relate to this blog title (I'm getting there, don't worry) are
1) Functions and variables should be depicted in their most clear form
Using underscores in favor of camelCase is both appreciated by non-english coders, and even I, a camelCaseProfessional am having a better time now that it's finally grown on me (month 3, lol).
2) Functions should be short, and bountiful
Shorter functions means having more of them, but it also means there is more jumping around that you need to do in order to follow your code. Fortunately I found an IDE that can jump around (eclipse with ruby-sdk 2.0 or something). There's a trade off here. When debugging, it's a little less fun to be jumping around, seemingly everywhere. BUT, when you're reviewing your code statically, it's way more pleasant to see all your little methods instead of a big mess of something great. I code C# in big mess. In ruby, I code scattered messes, but I don't debug, instead I unit test! That's not the topic, but it is my opinion that smaller functions is competitive with larger, "all inclusive" functions (I do appreciate them, seriously).
That brings me to the blog title. I'm noticing while tracking through my static code, I should be able to pull up a mouse over indicator of what the function I'm looking at relates to. I should be able to glance to see the proximity of the related code. I should also be able to "Brand" the method that I'm looking at into categories. Here's what I mean. I happen to be working on a command line project, and I need to do user prompting. I've taken to start the method names of my prompt methods with user_wants_to_bla?. They all look the same mostly, they have some console output code at the top, and then an infinite loop broken when the user finally hit's the 'y' or 'n' key. These functions should be color coded (background slightly tinted) so that they are easy to detect, even from 20 meters away. To achieve this throughout beta, the method would have a comment at the top of it (consecutive comment markers would be respected), and the IDE would read the word Category: and see that it ends in a color prompt.
(To Color code background of methods)
Eventually, you would be able to specify method prefixes and the comment line would automatically fold out of the way.
That's just the start of what I would do. What about holding the shift key and mouse-overing to pull up an overlay that served as sort of a mini-map of the code in that file, and highlighted would be all the sections that said function called, or when called it (color coded). Throw in some multi-monitor support for this feature and you've just split the IDE market right open like a ripe Piñata.
I'd also put in a HUD-style display that lists off function names and their relative distances from the method being inspected (cause it totally matters). This opens up the door to a filter box where you can specify "uses my_method_name" or "Category: Prompt" and even outside contributor's ability to "tag" methods that they worked on, for say "UI, highlighting, background". And once that's settled, I'd like to be able to shift click and see aesthetically pleasing ribbons weaving from the method name to parent and child methods in the background. Programming at a glance has the potential to be very efficient, especially when you really know the code you're working on well. Nuclear technicians don't work with awkwardly placed dials and gauges (anymore) and neither should we.
Finally, I'd ensure that there was "method moving" functionality that allowed you to drag and drop your methods.
In ruby, a lot of these features don't even exist, let alone their accessibility, but I'd definitely like to see it happen. I haven't worked on an IDE before, but I think that might be my next 'hobby thing' and see what makes eclipse tick, and how I would do things if I were designing my own IDE. I think I'd do mine like a command line based thing. Any individual writes a command line app that takes in as it's input, the whole source code text bing worked on, and then outputs what ever the command was written to do (say, find the positions of all the methods who's name matches user_wants_to*. Then their command (or method really) would output each of those lines and you could register a 'filter' that operates in the paint method, and paint the background of those source code segments an arbitrary color. I have a feeling the way eclipse is set up, that it's not quite that easy, but we'll see. I'm sure drawing images in the background like cool ribbons is out of the question atm, lol, but there seems to be a popup window api that could perhaps render jpg type data.
1) Functions and variables should be depicted in their most clear form
this_is_a_variable_to_be_used_only_once_here = "This is kind of a bad example because the variable name's length should somewhat correlate to its importance..."
Using underscores in favor of camelCase is both appreciated by non-english coders, and even I, a camelCaseProfessional am having a better time now that it's finally grown on me (month 3, lol).
2) Functions should be short, and bountiful
Shorter functions means having more of them, but it also means there is more jumping around that you need to do in order to follow your code. Fortunately I found an IDE that can jump around (eclipse with ruby-sdk 2.0 or something). There's a trade off here. When debugging, it's a little less fun to be jumping around, seemingly everywhere. BUT, when you're reviewing your code statically, it's way more pleasant to see all your little methods instead of a big mess of something great. I code C# in big mess. In ruby, I code scattered messes, but I don't debug, instead I unit test! That's not the topic, but it is my opinion that smaller functions is competitive with larger, "all inclusive" functions (I do appreciate them, seriously).
That brings me to the blog title. I'm noticing while tracking through my static code, I should be able to pull up a mouse over indicator of what the function I'm looking at relates to. I should be able to glance to see the proximity of the related code. I should also be able to "Brand" the method that I'm looking at into categories. Here's what I mean. I happen to be working on a command line project, and I need to do user prompting. I've taken to start the method names of my prompt methods with user_wants_to_bla?. They all look the same mostly, they have some console output code at the top, and then an infinite loop broken when the user finally hit's the 'y' or 'n' key. These functions should be color coded (background slightly tinted) so that they are easy to detect, even from 20 meters away. To achieve this throughout beta, the method would have a comment at the top of it (consecutive comment markers would be respected), and the IDE would read the word Category: and see that it ends in a color prompt.
(To Color code background of methods)
# Category: user_prompt #111100
def self.user_wants_to_install_key_to_github?
puts "Gas can automatically install this ssh key into the github account of your choice. Would you like gas to do this for you? (Requires inputting github username and password)"
puts "[y/n]"
while true
upload_key = STDIN.gets.strip
case upload_key
when "y"
return true
when "n"
return false
else
puts "Plz respond 'y' or 'n'"
end
end
end
Eventually, you would be able to specify method prefixes and the comment line would automatically fold out of the way.
That's just the start of what I would do. What about holding the shift key and mouse-overing to pull up an overlay that served as sort of a mini-map of the code in that file, and highlighted would be all the sections that said function called, or when called it (color coded). Throw in some multi-monitor support for this feature and you've just split the IDE market right open like a ripe Piñata.
I'd also put in a HUD-style display that lists off function names and their relative distances from the method being inspected (cause it totally matters). This opens up the door to a filter box where you can specify "uses my_method_name" or "Category: Prompt" and even outside contributor's ability to "tag" methods that they worked on, for say "UI, highlighting, background". And once that's settled, I'd like to be able to shift click and see aesthetically pleasing ribbons weaving from the method name to parent and child methods in the background. Programming at a glance has the potential to be very efficient, especially when you really know the code you're working on well. Nuclear technicians don't work with awkwardly placed dials and gauges (anymore) and neither should we.
Finally, I'd ensure that there was "method moving" functionality that allowed you to drag and drop your methods.
In ruby, a lot of these features don't even exist, let alone their accessibility, but I'd definitely like to see it happen. I haven't worked on an IDE before, but I think that might be my next 'hobby thing' and see what makes eclipse tick, and how I would do things if I were designing my own IDE. I think I'd do mine like a command line based thing. Any individual writes a command line app that takes in as it's input, the whole source code text bing worked on, and then outputs what ever the command was written to do (say, find the positions of all the methods who's name matches user_wants_to*. Then their command (or method really) would output each of those lines and you could register a 'filter' that operates in the paint method, and paint the background of those source code segments an arbitrary color. I have a feeling the way eclipse is set up, that it's not quite that easy, but we'll see. I'm sure drawing images in the background like cool ribbons is out of the question atm, lol, but there seems to be a popup window api that could perhaps render jpg type data.
0 Comments On This Entry
Trackbacks for this entry [ Trackback URL ]
Tags
My Blog Links
Recent Entries
-
-
Cooler IDEs NOW! (and open source) Am I right?on Oct 12 2011 10:06 AM
-
-
-
Recent Comments
Search My Blog
0 user(s) viewing
0 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)
Categories
|
|



Leave Comment










|