Posts

Showing posts with the label programming

DOMCursor, a tool for filtered DOM tree cursoring

While working on Leisure , I searched for tools to traverse text in DOM trees, but most of the ones I found were fairly limited.  One nice one is Rangy ( https://github.com/timdown/rangy ), which has a TextRange that can traverse by characters and words with rules for skipping over invisible text, collapsing contiguous whitespace, etc. Leisure, however is what you might call an “ultra-rich text” environment and needs more power.   This isn't my announcement of Leisure, by the way -- it's got a bit farther to go for that -- so consider this a teaser :). Leisure documents are orgmode files and the environment has a couple ways to present them, some of which sprinkle controls and views in among the editable text. During the design, I decided to use the contenteditable attribute and use the text in among the sprinkled controls and views as the actual document text, as opposed to emulating document editing, like code mirror does . Over the years, I experimented with different ...

Trying out a Coding Dojo

We had our first Coding Dojo session, today.  I wanted to start a "Programming Dojo" and I found that some people had already been doing that for years , so I decided to use their wisdom :).   Here's a great video, linked from the same site. The guy making this gestures with the camera a lot.  If you get easily motion-sick, maybe you should just listen to it. The idea is to have 2 people pair programming in front of a group, with the group kibitzing.  Techniques are discussed only in the context of code and programming is the path to learning in the coding dojo.  I'm introducing people, here, to functional programming concepts.  Here is the "kata" we used, today: Kata: Person Learning about "selector functions" 1. Write a "person" function, person(name, address, gender):  it returns a "person"; something which can be used to retrieve the values you man not create a new array, object, or string you may use comparis...

Code Google

UPDATE: Added structure and a few more ideas... Intro Have you ever seen someone include a giant open source library in a project, just to access some small part of its functionality? It's very important to have someone else write, debug, and maintain a large part of your code, but when you do this over and over, it can add quite a lot of bloat to an app for comparatively little gain in functionality. This is a huge problem, as I see it, but maybe there is a solution? What about allowing people to integrate only small subsets of modules into their code. I'm calling this idea "code google," for lack of a better term, although it's a LOT more than just search. It involves search, analysis, IDE integration, and social networking, so that library developers can track what parts of their code are actually being used. It's far from trivial to implement, but I think it could be very useful Before our company started, a friend and I wrote a fair-sized ga...