Hacker News new | ask | show | jobs
by gmarcus 4595 days ago
I am of the opinion that semantic markup is not an indicator of a quality product. Tradeoffs need to be evaluated including maintainability, code sharing, knowledge transfer and rapid prototyping among other factors. Purists that say no markup in HTML are constrained to a religion, just as any other must do that drive decisions. I argue that you employ not just the tools, but the techniques and strategies that will allow you to advance. Every situation is unique.

Regarding this technique...

In some circumstances, it is more than justified. Adding another layer of encapsulation can allow for a separation of concerns that may accelerate some stages of development.

I ask myself, is this more of a tooling question? If, we had a view of our stack that a) allows for these encapsulations and b) surfaces the right information at the right time would we not make use of it?

For example, my personal frustration is that when building a new feature for Rails for example, I have to conceptually traverse the full stack (html/erb, css/sass, javascript/rjs, views, helpers, layouts, controllers, model, database) -- substitute your own versions these separations depending on your stack. That means that adding a new checkbox to a form could potentially touch 9 different layers! Do I really have to hunt and peck for 9 different files to add 1 checkbox? Oh yeah, don't forget your tests...10!

I think that organizing the layers allows different experts to optimize different layers...a good thing!, but at the cost of being able to see 1 slice of the 10 layer cake.

I often search (and have not yet found) a set of tools that will allow me to view my stack depending on my current task and goals. I am not talking about edit/debug/optimize type views that come with some IDEs. I mean the logical grouping of all concerns related to my current feature.

This is a tooling issue in my opinion. Why can't my editor give me the right view of my stack at the right time? At a minimum, let's have our editors filter project files (and database views) depth first, grouped to all files that are relevant to the feature I am currently implementing. Sure, I can quick open and type out some names, but I would rather have my editor show me the relevant files (and only the relevant files) that make up my current slice of my cake.

Is there an editor, or plugin out there that will do this today?

Or what about 1 step further... Instead of surfacing files, what about surfacing just the chunks of code that are relevant. What if my editor let me author bits of all parts of the stack for 1 feature in 1 logical file, and save it out to the traditional locations expected by my framework. I personally would be more efficient, and effective, if I could see my snippets of html/javascript/css/controller code/model code all in 1 tight view. No more would I have to keep all the connections in my head, they would be laid out right there in 1 file. Also required for this type of productivity would be simple ways to reuse and refactor.

Just looking for a tool that will let me have my cake and eat it too.

1 comments

You are searching for the IntelliJ IDEA Project Scopes feature [1]. It let you view group of files either manually set or automatically, based on what changed, what belongs to a particular problem, etc. Basically it exactly does what you are searching for :) 1 step further: it only can do this with regular expression; you can edit a regular expression in a new window and it automatically change it on the relevant place real time.

[1] http://www.jetbrains.com/idea/webhelp/scope.html