Sublime Forum

New concept of text editing for coders

#5

Very cool video - hopefully one day we might be able to get even a touch of the functionality in ST2 - being able to see the results and return values of code like that would make development so much easier

0 Likes

#6

That binary search was nuts, with the loop’s iterations in the columns :smile:

But really, it’s how it SHOULD be.

You go from edit,save, alt+tab, refresh,repeat to ok, so I’ve got an auto refresh on save as if that’s some kind of win. I’m messing around with a website atm and it’s so many kinds of suck.

You either edit CSS in Sublime and have to refresh the browser or use some shitty in browser editor. Both make me want to stab something.

0 Likes

#7

With things like this, it must ignore syntactical errors, otherwise you’ll be forever cluttered with “WHAT THE FUCK IS THE NAME OF THIS VAR??” when all you’ve typed so far is "var "

0 Likes

#8

Original video is entertaining and in many ways very impressive, but I don’t believe it’s “the future”, at least not for coders (developers/programmers/…) in general.

I agree, that we still drag some baggage from the teleprompter era around and we should probably abandon most of it long time ago. This is why we all use ST2 instead of emacs or vim or ed, a clean slate, right?

What I have a problem with, is the idea that “running code” using your brain is a something that we can (should?) eliminate, using instant feedback of some sorts instead.

It’s just too limiting. Running code is simple, understanding how it works and how it fits together is not. Try thinking about using such tools to solve even the simplest problems of concurrency, security, system integration. How do you show a deadlock? Or CSRF attack? Or a trashing under heavy load? Or cache invalidation rules? Or problem with your OO/functional design. Or even the most trivial recursion (think: quicksort).

Ultimately, if you’re doing something interesting, it’s you and your brain only, having a tool that will display your random button mashing in real time, on 2d screen won’t help.

I’m not saying such tools are useless, I’m just saying they have a limited scope/target audience. Artists, game developers (but not game engine developers), webmasters -> yeah, ok. DB engine, or a terminal emulator :smile: not so much.

0 Likes

#9

[quote]It’s alive!
Now about those insane canvas and stackety stack tricks … Yeah, nah, it’s not going to happen.[/quote]

Oh my GOD! you did the slider! fantastic!

Now if we can make a color picker already have a small part of the concept. I usually calculate Hex at hand.

Thanks castles_made_of_sand!

0 Likes

#10

https://github.com/weslly/ColorPicker

the future is here!

0 Likes

#11

this is pretty awesome. Looks more like something for xcode to look into. My favorite part was definitely how he made the binary search. I wonder how far one could take this concept with a sublime text plugin? Visualizing arrays and stuff would be pretty awesome.

Awesome. Can I have please?

0 Likes

#12

[quote]https://github.com/weslly/ColorPicker

the future is here![/quote]

Awesome!!! I’m not have to calculate RGB to Hex anymore!! Never!! thanks s0und!

I did start to use something like this https://addons.mozilla.org/en-US/firefox/addon/reloadevery/ to emulate realtime coding… but Im thinking that I have to do that via javascript… create a library that keep looking to the file changes. and use a sublime plugin to save in every change I made. Just for fun of course :smiley:

The visualization of iterations is freaking cool ! I gonna try to emulate that too.

0 Likes

#13

The point is that the right tools allow you to free up your mental resources precisely for the more interesting things such as building a conception of how the pieces fit together. It’s not an excuse to become mentally lazy, it just allows a redirection of effort.

It’s really not all that useful as it is. With Sublime you can only bind (in a roundabout way) to on_mouse_down and on_mouse_up events, you can’t get an on_mouse_drag ( the time between a press_command and a command in sublime-mousemap terms )

The plugin just does a 16ms set_timeout polling of the selection and alters the numeric value based on the new selection.

What that means is an inconsistent slider as it relies on character distance rather than pixels.

It was more of a joke and the “It’s alive!” a nod to the frankenhackery involved :smile:

0 Likes

#14

Exactly. Programmers should have to worry more about logic and the actual work and less about off-by-one errors and silly issues that this proposed editor would visualize in real time. While it is obviously not always applicable, it would be a huge benefit in some projects. Particularly for things with a GUI, lots of conversions, or lots of arrays.

0 Likes

#15

@C0D312 & @castles_made_of_sand

Then we agree completely. I’m all for using “powerful tools” and freeing wasted brain-cycles/time

It’s a nice idea, but I believe this was not the presenter’s main point. He specifically states, that his principle is “Creators need an immediate connection. So I can watch you change a line of code, an I can ask: did you immediately see the effect of that change? Yes or No? If no, I got to do something about that.”(52:30).

I strongly believe that this is a false direction for software development, for several reasons:

  1. There is an abundance of software problems that just don’t give at all to this way of thinking, or in different words, using the proposed approach require more, not less brain cycles than our current (think/code/compile/run/rinse/repeat process). Instead of one mental models to comprehend, you now have two.
  2. Even when the instant feedback works, it encourages a gradient-ascent approach to problem solving. If after a change everything is FUBAR, you will just undo and tinker in a different direction that “improves” things. It works for some problems, but for others leads to a sub-optimal solution.

IMO there are different, better approaches that solve real programmers’ problems. Like when you know what you want to do, you’ve got the working mental model and the tool (IDE/compier/text-editor/type system/…) gets in your way when you try to code a solution, or plays stupid, or generates technical problems that it should solve by itself, or requires you to do too much to introduce a simple change…

Think:

0 Likes

#16

encourages a gradient-ascent approach to problem solving

Not really sure what that means. I left school when I was 12 so the math just goes over my head :frowning: From what you said after, it sounds like an inefficient path of thoughtless trial and error.

Remember though, there’s sometimes more than one destination. Maybe you don’t even know until you get there?

There is an abundance of software problems that just don’t give at all to this way of thinking,

Like what? The examples in the video were just various cases of showing how instant feedback helps. The various flowers or details don’t matter as much as the root or principle.

Just cause we can’t get instant feedback with the, let’s face it, shitty tools around today, doesn’t mean it wouldn’t be a good thing.

there are different, better approaches that solve real programmers’ problems

Not sure it was touted as the be all/ end all or even something editor specific. At least that’s not what I took away.

Anyway, I can’t think of any circumstance when developing software having immediate feedback and insight into its workings would hinder rather than help. If you think it’d lead only to laziness I strongly disagree with you. At worst yes, you sit down on those shoulders and get taken for a ride. But at best, you stand up, and concentrate hard on keeping your elevation for the perspective it affords. One of the guys points was that the instant feedack and insight allows you to more quickly build accurate mental models. A mind once elevated…

Besides, when I’m dead tired, or really want to be doing something else, that easy ride would be most welcome! If our mental models are so great why is software so buggy? Why do we write tests?

0 Likes

#17

It means that while looking for a solution (a maximum) you always choose a direction that improves your current state.
This way you’ll reach local maximum, but then you’ve got nowhere to go, and global maximum can be somewhere else entirely: en.wikipedia.org/wiki/Local_maximum

There is an abundance of software problems that just don’t give at all to this way of thinking,
Like what?

Think what would be a helpful instant feedback for the following problems: OO Design, algorithm design, anything concurrency related, almost anything embedded or real-time, integration work (DB + UI + MQ+ FileSystem + XML + WebAPI + whoknowswhatelse), bugfixing.

I would love to be proven wrong and see how such tools could solving something more complex. Take a look at visualization of quicksort: en.wikipedia.org/wiki/File:Timsort-edited.png TBH I need more brain-cycles to understand what those images are showing, than to understand the algorithm itself.

Just cause we can’t get instant feedback with the, let’s face it, shitty tools around today, doesn’t mean it wouldn’t be a good thing.

Well, OK, I just don’t believe this can be achieved for a general case.

It’s always a funny exercise to run a tool on itself. Jon uses SublimeText to develop SublimeText, many compilers for language [X] are written in language [X], a schema for validating XMLSchema documents etc.
Can you think of a instant-feedback tool/editor/ide that will help develop better instant-feedback tools? I know I can’t :smiley: And TBH I hope I’m wrong :smile:

0 Likes

#18

You naysayer! :smile: Have some imagination!

0 Likes

#19


0 Likes

#20

:smile:

0 Likes

#21

I hate you all :mrgreen:

0 Likes

#22

Everyone else in 5 years

http://t1.gstatic.com/images?q=tbn:ANd9GcR8rVmjFQIbBtIIN398o-DGZov2tyoHF272yjAmoEFQcDED0Pnn

Wuub

http://t1.gstatic.com/images?q=tbn:ANd9GcTuDd59DgnDWi-pnpiSGrcoeuSg-OulM-RToy1v1b73pL5I3Wq5UQ

0 Likes

#23

Bahahaha. Well played sir.

0 Likes

#24

http://gmh.akalias.net/prefer-to-dream.gif

hurrah for MozRepl!

0 Likes