First thought. Seems to me that far more important than using the same language for the client and server is being able to write the client and server code in the same file.
That is something I've been waiting for for a long time.
These days, I'm thinking a lot about 3D printers, desktop manufacturing and software to create physical things.
Last year I did some art pieces using software to generate drawings for laser cutters and 3D printers, and I'm continuing along the same line. I want to move this stuff into the browser, and the combination of CoffeeScript and Raphael.js is turning out to be pretty good for this. (Did I mention I really, really like CoffeeScript?)
I also dabbled a bit with Prolog, wondering whether it can be used as a high-level description language for machines or other complex objects. The really interesting question is if you can use the built-in inference engine of Prolog to help with the design. (Aside, here's a silicon layout engine in Prolog) I haven't got very far with that yet, but I'm now considering how Prolog can be combined with or made to output OpenScad (or PyScad) code.
A couple of days ago Simon Wardley posted on his blog that he was searching for a SpimeScript :
So, I want to return to ... the formation of Spime Script. We're entering a phase where hardware will become increasingly as malleable as software which leads to a problem of choice - if I want to change the function of something, do I do this in software or hardware? The tendency today is obviously towards software because its more malleable but the future is never the past. However this creates a problem of skill - will I need to become proficient in both software and CAD / electronic design?
In reality both CAD and whatever software language you use, compile down to instruction sets and the function of the device is the interaction of these instruction sets - one which is substantiated physically and the other which is substantiated digitally.
Turning this on its head then why not write the function of what you want, the function of the device? Compilers can therefore undertake the complex decision trees (which is what they're good at) required to determine what element of that function is encoded as physical and what element is digital.
A future language is needed, something whereby the output is both physical and digital and I describe merely the function of what I'm after.
That's a really exciting vision.
Now, here's what I think is really important for a SpimeScript.
It should learn from HTML / CSS.
While HTML / CSS is a pain in many ways, there's a very interesting insight in it about design. That design comes in layers. It's partly about the separation of logical structure and visual style. It's partly about the cumulative effect of the Cascade in Cascading Style Sheets. It's partly about the fact that the browser has reasonable defaults for the geometric properties of logical structure. (Today, those defaults look rather out-of-date but there would be little to stop a browser manufacturer making their defaults look more like Readability or Twitter Bootstrap.)
So here's the main feature request for a SpimeScript. It should be possible to define the logical structure of, say, a machine and have some layout-engine give it plausible default geometric properties. But it should also be possible for designers to layer optional design hints on top of that layout in the form of extra constraints and have the engine deal with fitting them together.
As with the silicon design case, there must be some prior art here, but I'm not quite sure where it is. Electronic Design Automation maybe.
Surely all practical knowledge is anecdotal and, therefore, an unwarranted step from the particular to the universal. All advice in this “genre” (Tom Peters, Charles Handy, Seth Godin etc. etc. etc. ) comes with an implicit health warning. And anyone with any experience of the world will apply salt as a matter of course.
Should we hold that against Ries in particular?
So his models come from the software industry. OK. But someone else’s advice will come from banking, or food retail or oil or the military. Each with some parallels to your business but each with its own idiosyncrasies as well.
One thing you can say in favour of Ries’s bias is that more and more things are getting automated and so more and more of our world “is made of software”. Software processes are replacing other kinds of process that were embodied in administrative or managerial practices or hardwired into physical machines. In this world, improvements in software are often more effective than improvements in other areas.
You’re a coder yourself. You probably know your Mythical Man Month etc. You know perfectly well that software doesn’t benefit from heavy bureaucratic management. But that exciting and effective software usually does come from small, enthusiastic, “agile” teams.
So, if software is becoming an increasingly important factor in business. And software thrives under agile conditions, it would follow that business in general will probably benefit from agile.
Disclosure : I’m a software guy myself, so I’m totally down with the land-grab programme.
One of my favorite business model suggestions for entrepreneurs is, find an old UNIX command that hasn't yet been implemented on the web, and fix that. talk and finger became ICQ, LISTSERV became Yahoo! Groups, ls became (the original) Yahoo!, find and grep became Google, rn became Bloglines, pine became Gmail, mount is becoming S3, and bash is becoming Yahoo! Pipes. I didn't get until tonight that Twitter is wall for the web. I love that.Marc Hedlund via Coding Horror
What "templating" means to most people is a way of having the developer write out HTML basically the way that you would send it to the browser and then having a way to include a few things -- typically variable substitution by using special tags lik <% ... %> or similar.
In our case, no one writes any code that looks like HTML/XML literals, so there's nothing in our codebase that really matches what most people think of as templates. We do have view code but that interleaves calls into the model and application logic along with a Python code description of what the HTML for that component should be, which is different from templates which are usually based around the ideas of separating logic and data fetching from this.
# HTML library
# basic level
def tag(name,x,*argv) :
if x is None :
return u"<"+name+u"/>"
if argv != (None,) :
inside = u''.join(argv)
else :
inside = u''
if isinstance(x,dict) :
# we're passing a dictionary of attributes for the tag
s = u"<%s " % name
s = s + ' '.join(['%s="%s"'%(k,v) for (k,v) in x.iteritems()])
s = s + u">"+inside+u"</"+name+u">"
return s
# or there are no attributes, just inner
return u"<"+name+u">"+x+inside+u"</"+name+u">"
# Now we'll actually make some tags
tags = ['html','head','body','script','p','div','table',
'tr','th','td','ul','ol','li','dt','dd','h1','h2',
'h3','h4','h5','h6', 'style','pre']
loc = locals()
def setit(loc,t) :
loc[t] = lambda x=None,*argv : tag(t,x,*argv)
for t in tags :
setit(loc,t)
# Use like this
html(
head(),
body(
h2("Header"),
p('para1'),
p('para2')
)
)
What I take away from these stories is that pushing out ugly prototypes of your products will not prevent you from building a world-class engineering organization in the future.
?- X.
% ... 1,000,000 ............ 10,000,000 years later
%
% >> 42 << (last release gives the question)
A server error occurred. Please contact the administrator.
It's easy to add generality to a spec. It makes you look really smart, especially when someone else is going to do the coding. But too much generality too soon makes the code age prematurely; you can get old, brittle, confusing code that looks like it's yellowed with age, even though it's not even finished yet.