Simon Palmer’s blog

January 30, 2010

Textpad syntax file for Grails GSP

Filed under: Grails — simonpalmer @ 4:39 pm

Since I couldn’t find one on Textpad’s list, or anywhere else on the web, and nobody on Stackoverflow had one either, I thought I would write myself a syntax hilighting file for Grails GSP.

Here it is for anyone else who might find it useful. Because WordPress don’t allow upload of the .syn file extension I have renamed it gsp.pdf. Right-click on the link save it to your hard disk and rename to .syn file to have it work. It needs to go into your samples folder underneath your Textpad install location.

I have been building it as I have gone along, so it is likely to be incomplete. However, it has most of the commonly used tags so it works for me. I based it on an existing HTML template which also has reasonably support for Javascript, so it is a pretty good general Grails View syntax hilighter.

This seems particularly important for Grails since the IDE’s available are pretty bad (or expensive) and it sort of works better to have a favourite text editor in the mix as your primary editor. I have also added some of the common grails commands to Textpad and it is starting to function as a pretty good alternative to the STS Eclipse plug-in which Spring provide – which isn’t worth it in my opinion.

I have another one I am building for Groovy which I’ll post just as soon as I get it in a state where it does what I feel is the minimum to get by.

January 7, 2010

Back on Stack

Filed under: stackoverflow — simonpalmer @ 9:26 pm

I am back using Stackoverflow after falling out of love with it. I went back for a specific reason, which was entirely the right reason, namely that I had a difficult technical problem that I could not find any solution for. You can see the post which took me back here.

I got some great responses, although none of them led me to a real answer. I ended up logging a bug at Adobe about the issue. Lord knows what will happen to that and I still have a broken Flex socket server, but the experience was good enough that I have overcome my objections and re-joined the Stackoverflow community.

It is easy to spend (read waste) too much time there chasing rep points, and generally in response to questions that the posters ought really to be able to figure out for themselves. And my criticisms remain the same as they were, I have just got over them. Mostly.

There is a definite increase in the sorts of questions which start “I downloaded this code from the internet”, followed by “I have no idea what this bit does, but I changed it and now it doesn’t work”, followed by “can you tell me why”. Basically I think this is lazy and dangerous and I hope these ar students rather than professional programmers. Stackoverflow encourages this sort of behaviour because someone – probably in pursuit of rep points – will normally take the time to post an answer, sometimes a very good answer.

I’m not bothered about the rep any more, although it remains a nice idea and a very good way to get people hookes for long enough to see the real value underneath it. The self-regulation seems to be working reasonably well too and the excesses of the early days are all but gone and there are fewer people trying to be the SO police than there were – although that remains a problem.

So back on and getting and adding value. SO is now part of my technical infrastructure, which I suppose means it is succeeding.

Clever little fella

Filed under: Uncategorized — simonpalmer @ 2:52 pm

I was talking to Jack this morning and he was repeating back to me what I said. Then he suddenly started changing the odd word so that it was funny. This is a nice little game that he and I play quite often and I’m sure is quite common between parents and kids. It causes him to belly laugh when he finds a word which changes the meaning of the sentence and makes it funny.

If you think about it a sense of humour is a very sophisticated layer of communication which sits above mastering the mechanics of speaking, the detail of language and the meaning of words.

I was amazed. 6 months ago he was in nappies and barely able to talk. Now we are playing word games and he is deciding what is funny. That sort of transformation must belie a huge change inside his head.

I think I subscribe to the Noam Chomsky, Stephen Pinker view of the world that we have an innate ability to master language, and I suspect that the real key to it all is the development of memory. If you consider everything that is necessary to be able to communicate, vocabulary, syntax, grammar etc. it is all predicated on being able to remember things. I suspect that the transformation I have witnessed in Jack is the development of his memory.

He suddenly has an amazing vocabulary. Yesterday as he was struggling with unzipping his coat and he said quite clearly “absolutely ridiculous”. Later that day he was sitting on the loo and he looked at me and said “concentrate”. These are very sophisticated ideas and there is a complex context necessary for them to be applied appropriately, which they were.

Memory development is supported by the other amazing things he has started to do which is remember directions and locations. If we drive out from our home towards the North of London he can now tell whether we are going to the shopping mall, the chinese grocery store or Nanny’s house by the route we take right at the last moment.

So I’m obviously a proud dad – he’s only 2 1/2 – but I am also an amazed observer of the rate of development of the human brain.

Blog at WordPress.com.