The Next JavaScript...

Wednesday, April 23, 2008

ECMAScript 4.0 (ES4) is on its way. This will be the next standard for JavaScript. It's not going to be usable on web pages for a while, though. In fact, I suspect I won't be using it on my web page for at least 5 years. The problem is simple: as long as people still use older browsers, you won't be able to assume that people have it.

However, the features in it are an interesting look at what the standards committee thinks is wrong with the current JavaScript. This is not a minor patch release. This is a dramatically overhaul of the current JavaScript (ES3). Oh, they've included a lot of minor things that are simply broken in ES3. These changes are certainly interesting, but today I'm going to talk about their major focus. They want to make it easier to develop large applications in JavaScript. Clearly, they understand that people are starting to develop large applications for web browsers, and they feel that there are problems with the currently available technologies for this.

I don't have any experience with developing what I'd call a large JavaScript application, but we are starting to develop an extension of PC-Doctor for Windows that uses JavaScript in numerous places to control its behavior. In my dreams, I imagine that it will eventually become a large application made up of plugins that run on JavaScript.

Let's go through the major features that the committee thinks I'll need as our technology gets bigger...


Continue reading...

Twitter Facebook Digg The Next JavaScript... Bookmark The Next JavaScript...  at reddit.com

The Cost of Complexity

Tuesday, April 15, 2008

This article is going to have more questions in it than answers. It's about a problem in software development that I'm not sure I've worried about enough. I've certainly thought about it for specific cases, but this is the first time I've tried to think about the problem in general.

My main question revolves around the cost of complexity in software. There is certainly a large cost in making software more complex. Maintenance becomes more difficult. Teaching new employees about the project becomes harder. In the end, you will get fewer engineers who understand a complex project than a simple one.

Unfortunately, almost any non-refactoring work will add to the complexity of a project. However, some changes can have a large effect on the complexity in a short period of time. Adding a new library or technique to the code base, for example, will make it so that the new technology will have to be understood by people working on the project.

What I really want to know is how much can this cost of complexity be mitigated? Besides switching libraries to add, what can be done to decrease the cost? My question is based on the assumption that some complexity is essential. So, given that you're going to add a new library to the code base, for example, what can be done to reduce the cost?


Continue reading...

Twitter Facebook Digg The Cost of Complexity Bookmark The Cost of Complexity  at reddit.com

Running Rails on Debian Etch

Monday, April 7, 2008

As the company Rails evangelist one of my challenges has been working out a consistent and understandable deployment strategy. One of the biggest challenges is that I may not have access to the root user acct. Additionally we are generally required to stay within the Etch distro, going with Lenny (testing) requires special approval. A final challenge is that compilers are not allowed on the production server.

The "Ruby gem problem" is the result of not having access to the root user acct. On development servers Ruby gems are easily managed using the root acct with the "gem" command. But without root on the production server, how do get our gems installed? Well, you might think we can just request the owner of the root acct to install gems, but not so fast - the gem command does not place files in accordance with the Linux FHS (see http://www.pathname.com/fhs/pub/fhs-2.3.html). And furthermore, the manager of the server has no interest in keeping track of Ruby gems and managing them seperately. If it's not related to "apt", you've got some explaining to do.


Continue reading...

Twitter Facebook Digg Running Rails on Debian Etch Bookmark Running Rails on Debian Etch  at reddit.com

The visitor pattern from the GoF is frequently overlooked by programmers who are used to object oriented programming. However, in some cases, it is significantly cleaner and easier to use than an overridden function. Unfortunately, it's easier to misuse as well, and, when it is used poorly, it can be a real mess.

I was going to tell you about my static analysis project and how I'm using the visitor pattern there. Then I took a glance at the wikipedia article on the visitor pattern. It's clearly written by a OOP fanatic who's never seen the alternatives, so I'm going to contrast my implementation of visitor with the one there.

The contrast is useful because wikipedia's implementation is written using object oriented principles. Part of my goal with this post is to explain about OO alternatives. My implementation is written using compile time polymorphism rather than runtime polymorphism. As we'll see, this is significantly prettier and more flexible than runtime polymorphism.


Continue reading...

Twitter Facebook Digg The Visitor Pattern as an Alternative to OOP Bookmark The Visitor Pattern as an Alternative to OOP  at reddit.com

Object oriented programming is extremely popular these days. It's so popular that some people aren't even aware of alternatives to it. The reason its popular is clear: OOP works well a lot of the time. Traditional object oriented programming styles have some significant disadvantages in some circumstances, however. Some of the alternatives are worth looking into when those disadvantages become awkward.

As part of the static analysis project that I'm working on, I'm trying to use alternatives wherever I can. In part, this is because the advantages are substantial for the project I'm working on, but I'm also curious how far it can go and what will happen when I push it too far.


Continue reading...

Twitter Facebook Digg Alternatives to Object Oriented Programming Bookmark Alternatives to Object Oriented Programming  at reddit.com

Apple's MacBook Air was hacked in just two minutes at the CanSecWest security conference's PWN 2 OWN hacking contest, with former National Security Agency employee Charlie Miller walking away with a $10,000 prize.

My thoughts - Charlie Miller and others live in an interesting dichotomy of worlds between good and bad. They make good money exploiting digital weaknesses and for now, do good by reporting weaknesses to manufacturers. The pull to exploit others for their own benefit must always weigh on their mind.

This reminds me of a marketing principle - one's best creativity comes when reflecting on one's most mischievous or devious past actions. Digging up those memories reminds us how we broke the rules then and gives us ideas how we can properly break the rules of "in-the-box" thinking today to create new and innovative marketing ideas.

Goes to show that little devil on my shoulder isn't so bad after all.

Twitter Facebook Digg Apple MacBook Air Hacked In Two Minutes Bookmark Apple MacBook Air Hacked In Two Minutes  at reddit.com

For those of you just tuning in, I'm working on a project to statically analyze an untyped code base to try to bring some of the advantages of typed languages to the code base.

The first step is to figure out which language I should write a static analysis tool for. This is obviously an important decision with quite a few implications both at the beginning, during the creation of the parser, and at the end when we try to find an actively developed code base to look at.

The first requirement is that it be a relatively popular, untyped language. Let's look at some languages:


Continue reading...

Twitter Facebook Digg Requirements of a Language to Statically Analyze Bookmark Requirements of a Language to Statically Analyze  at reddit.com

Mixing C and C++ Code

Tuesday, March 18, 2008

One of the early steps to my static analysis project is to parse the language that I'm going to analyze. I'd like to form a relatively clean Abstract Syntax Tree that I can play with later.

C++ has a lot of advantages over C for this sort of thing. It's got an enormous amount of machinery that can be used to build high level abstractions without sacrificing much more runtime overhead than you're willing to pay for.


Continue reading...

Twitter Facebook Digg Mixing C and C++ Code Bookmark Mixing C and C++ Code  at reddit.com

Static Analysis of Untyped Languages

Monday, March 10, 2008

A while ago I wrote about whether or not untyped languages were a good idea or a bad idea. I didn't come to any real conclusions at the time, and it's bothered me. I'd like to outline a way to gather some real conclusions now. I still won't be able to come to a conclusion, but I think this approach sounds interesting.

There are a number of advantages and disadvantages to untyped languages. One of the disadvantages is that, because variables have no type, you can assign the wrong type to them. A strongly typed language can avoid most of this problem. (You might still have problems involving type conversion, but a good programmer or a strict language can avoid those problems.)


Continue reading...

Twitter Facebook Digg Static Analysis of Untyped Languages Bookmark Static Analysis of Untyped Languages  at reddit.com

I found this Netflix article just fascinating - Netflix has found a way to extract value from knowledge experts thousands of miles away who are giving the company value before ever getting paid.

We at PC-Doctor have our own software development challenges and we sure should look closely at the way Netflix is innovating. To sum up the problem. Netflix is trying to improve upon Cinematch, its movie recommending software, in an effort to increase and retain subscribers. To do so, it didn't hire more developers, it outsourced the work . . . sort of . . . or at least their model seems to work like outsourcing. Yet, their model is many times better.


Continue reading...

Twitter Facebook Digg Netflix uses One Million Dollar Prize to Solve Customer Recommendation Software Problem Bookmark Netflix uses One Million Dollar Prize to Solve Customer Recommendation Software Problem  at reddit.com

« previous page   (Page 2 of 8, totaling 73 entries) » next page