Last Train Home

July 29, 2004

Languages

I've been thinking a lot lately about computer languages and language development, in the context of the Intentional Programming stuff that we have been covering on the CGN recently. It now seems so silly. Java versus C#. Perl versus Python. It's all seems to be such a non-issue if we have domain specific languages where you can define the solution in a syntax that is very closely aligned with the problem space. Doesn't that make more sense?

Posted by jherr at 07:12 AM | Comments (0)

CGN spam

Somebody spammed the generator comments last night. Ugh. I had to do the SQL to delete all of it by hand. What a pain. I can't believe someone spent the time to do that.

Posted by jherr at 07:10 AM | Comments (3)

July 27, 2004

Justin Greenwood of MyGeneration

Justin Greenwood of MyGeneration talked with me about his code generation system for .NET.

Posted by jherr at 02:22 PM | Comments (0)

July 16, 2004

Good week for CGN

It's been a banner week for CGN so far. The interview with Charles Simonyi has doubled real traffic to the site. And that's without being Slashdotted or mentioned on other big sources like The Server Side or O'Reilly. I definitely need to spend the time to get more big names.

Posted by jherr at 07:47 AM | Comments (1)

July 13, 2004

Charles Simonyi Interview

We got a lot of feedback on our interview with Sergey Dmitriev where he talked about he new Intentional Programming system called MPS. Much of the feedback pointed to Charles Simonyi, so on a lark I got in contact with him and he was happy to talk about his work in the field of Intentional Programming.

You may know Charles from Hungarian Notation, but don't let that stop you from having a look. Intentional Programming is all about creating domain specific languages and using code generators to turn those code written in those languages into executable system cod

Posted by jherr at 05:18 PM | Comments (0)

July 12, 2004

Server Side

The server side has picked up the Sergey Dmitriev interview. I hope they pick up the Charles Simonyi update.

Posted by jherr at 02:27 PM | Comments (0)

July 07, 2004

Sergey Dmitriev

I've done about fifty interviews now for the Code Generation Network and none of them has been as cool as my talk with Sergey Dmitriev about what he is doing with his Meta Programming System (MPS). With this thing you can quickly define a syntax, an editor and a code generator for an arbitrarily complex Domain Specific Language.

I didn't get to see it in action during the interview but we got together a couple of days later to show it to me and I was blown away. Even in it's rough form it shows great potential for creating a new higher level of abstraction in programming beyond Object Oriented, and beyond Code Generation, that Sergey is calling Language Oriented Programming.

Extremely cool stuff. I am very excited.

Posted by jherr at 08:55 PM | Comments (1)

Java Embedded Languages Article

My article on Java Embedded Languages came out today. Woo hoo!

Posted by jherr at 10:02 AM | Comments (0)

PHP Advice

I got a request for some additional book advice this morning. I wrote so much in return I figured I would blog it:


I haven't read the O'Reilly book (Web Database Applications with PHP & MYSQL), but PHP and MYSQL Web Development (second edition) is not well organized and it's section on database programming, if followed, will have you writing sites that are vulnerable to SQL injection attack.

Advanced PHP Programming is one of the best books on PHP I have ever read. It covers database access properly and then covers a wide range of important topics.

Any book on SQL should do for the basics of MySQL programming. It's important to know that most MySQL installations lack transactions (the ability to bundle a bunch of updates into a unit and roll them back if one fails or the connection is lost). And it also lacks stored procedures (the ability to write functions that are installed in the server and can be invoked just like SELECT, INSERT, UPDATE or DELETE statements.) However, it should be fine for what you want to do. I mention the limitations only because you will run into trouble if your design depends on them and they are not there.

The biggest things to keep in mind when you are writing your application are:

  • To separate the database access layer from the front end HTML layer.
  • To check the IDs coming back from the user against their user ID in the session to ensure that the user is seeing only what they should be able to see. This check should be done at the database access layers. You should pass in the active users ID with every database request.
  • To use PEAR DB for the database access to keep your database access vendor neutral.
  • To use the '?' notation in your SQL statements to allow the database to cache your queries properly and to avoid injection attack.
  • To use Smarty to create a 'code-behind' structure to your HTML pages that will separate the business logic access from the HTML formatting.
  • Avoid PHP globals.
  • Avoid keeping UI state (e.g. the transient form variables in a multi-page form) in the session variable. Use hidden form fields instead.

That should about do it for the basics. If you do all that you should have a high quality site.

Posted by jherr at 08:48 AM | Comments (4)

July 06, 2004

Friendster and PHP

Friendster has gone PHP. This has rekindled the dogged PHP scalability wars. Friendster was a notable Java installation and going PHP doesn't bode well for the perception of Java as a major we player.

Chris Shiflett weighed in and cited several sources about PHP Scalability. He said that my article was wrong because performance != scalability. I agree that performance is not scalability, but it is the first issue that Java folks raise about PHP because it's a scripting language. So in my article I decided to tackle the performance issue in isolation. Although I went to the trouble in the preface of the article, to state that scalability was not just about performance.

He goes on to say that this post got it right, and I agree, but the comments after the post prove that you have to get Java folks to move past the performance argument first before you can talk about other scalability issues. Like the availability of talent, the maintainability of the language, the fact that less code is less bugs, and so on.

Posted by jherr at 09:31 AM | Comments (8)

Wiki spam

This morning my personal Wiki was spammed with three online Casino messages. And yesterday the Connections blog was hit with over four hundred spam postings. These people are just off the wall. They have no respect for any of the community foundations of the Internet.

Posted by jherr at 09:20 AM | Comments (34)

July 02, 2004

XsRQL

Interesting. Howard Katz has a Posted by jherr at 10:18 AM | Comments (0)

Tron Lightcycles

GLTron is very cool. It runs really well on my OS X box and has a nice retro feel.

Posted by jherr at 09:58 AM | Comments (0)

July 01, 2004

Compuware Interview

I had some fun at JavaOne talking to Compuware about OptimalJ 3.2. The guys really opened up and talked plainly about MDA and Microsoft.

Posted by jherr at 10:10 AM | Comments (0)