Discussion Locked

Software Dev Random Rantings

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
blog root

2 replies

by bork blatt

As a developer, I often find myself doing repetitive code for data access, or doing the same refactoring tasks again and again during maintenance. I have been developing a toolset that I use for some of these tasks, but to do them properly without huge effort and expense, is not possible.

I am not claiming to speak for anyone else here, I realise each company has its own preferred platforms, tools, methodologies, and ways of developing, but for myself, if I had anything I wished for, I would wish for the following:

Most common refactoring tasks built right into the IDE.

Many IDE's integrate tightly with the compiler, so that you have class trees, and instant hover-tips to show you things like the file and line number where a function (method) was originally declared, etc. Why not build in simple functions like renaming Objects, methods, properties, functions, etc? I would also like to see functions like adding or removing parameters to methods, or changing their types. Sure, the compiler could not automatically resolve all code pointing to these methods, but it could mark all the affected lines or add them to a "to do" list. The compiler has to sort out all naming ambiguities anyway, and would be the final authority on this, so why not use it to do refactoring?

Simple template-based code-generation

It will never be possible to completely generate a system with no human intervention, but many common coding tasks can be made more painless with code generation. Things like retrieving individual field values from recordsets, writing grouped reports, etc, could all benefit from this.

A Version control system that takes web development into account.

I have yet to find a tool which simplifies source control where you have a development web site that you develop on via HTTP (FrontPage etc.) All current tools are more suitable for compiled languages.

Anyway, these are my rants. Doubtless some tools already exist that I am not aware of, but any decent tools I have seen in the above categories usually have ridiculous price tags and thousands of extra features I'd never use.

Have any rants / wishes to add? Please do. Hopefully Borland, Microsoft et al are listening!

by bork blatt

This post was inspired by another post about spam blogs (splogs) which I misunderstood. You see, in my slight daze I was thinking about spam comments posted on blogs, not entire blogs which were spam. Anyway I think my ideas below (that were posted as a comment to the above blog entry) are a step forward from the current methods (CAPTCHA images and the like). Let me know what you think.

Why computers can't parse language like humans:

This is a really interesting problem. I have given a little thought (I really mean just a little, some people have made a lifetime study of this) to the complexities of natural language parsing, and at first, I thought it would be fairly easy to do. Yes, you can laugh and throw things now if you want.

I started to think of a simple parser. What if it analysed a sentence at a time, and categorised each word by type, for instance noun, preposition, etc. To determine if a sentence is valid, you just see if the word types fall into recognisable sentence patterns.

Then I realised how easy it would be to fake this out - by doing what they are already doing, namely stealing bits from others' blogs, or two, by using a very simplistic Madlibs style generator that just made nonsense that was grammatically correct.

I started to think about language, and how we learn it. I came to realise that language is how we express everything we understand about the world. It is not just nouns and adjectives, it is emotions, style, subtle shades of meaning. One word can have several different meanings depending on its context.

To simply try and put all this knowledge into a huge database will not help either, because people add facts to their knowledge base differently depending on pre-existing worldviews, and sometimes a convincing argument can sway their world view. A computer cannot do this, and (to my limited thinking) will battle to simulate it.

Use natural language questions to foil robots

My theory on preventing spam, is that instead of pushing the extremely difficult task of natural language processing onto the computer, which is very ill-suited for the task, let's push the burden onto the blog spamming software.

CAPTCHA images and simple validation schemes are problematic because of that - they are simple for computers to parse. They don't require intelligence and experience, merely crude pattern recognition. The only way to foil auto readers is to add noise (distortion, background noise) which also makes life more difficult for the humans.

What about this instead: a simple database with a pool of words, a pool of questions, and a linking table which puts words in certain categories. You pose a question like "Type in the colour from the list above" and list words like "aerosol, blue, printer". Screen readers can read it. People can solve this easily, not so the spam bots. Yes, they can just try and post with every word in the list, but you can blacklist or tarpit IPs with frequent failed tries.

What's more, the system is easily upgradeable. Spammers starting to write programs to find colours? Just update your database. Now start asking what are metal objects. Ask for the third last word in the original blog post. The possibilities are endless, and so darned easy to code.

This type of test is very difficult for computers, but simple for humans. I say let's use computers' weaknesses against the spammers, not put them in a position to use computers' strengths against us.

This discussion is closed to new replies.