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.
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.
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:
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.
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.)
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.
People have been writing tools to generate scanners and parsers for decades. YACC is probably the most famous. It was created in the 1970s, and, since it stands for Yet Another Compiler Compiler, it probably wasn't the first attempt at the problem.
YACC is a pain to use, though. It uses a parsing algorithm that has great worst case performance but causes massive headaches for programmers. Essentially, you have to ensure that your grammar conforms to the LARL(1) rules. You'd better know what that means before you use it, too!
The .NET Framework has a lot of really great things in it. I've just started playing with a few corners of it, and I love the amount of stuff that it's got in it. Some things really irritate me, though, and it's a lot more satisfying to talk about that stuff!
C# and the CLR make it really hard to hide information. First of all, the .NET framework is built around inheritance. Everything is inherited from something else, and if you want to extend an object, then you're going to inherit, too. Inheritance hides almost nothing, but you already knew that, and, presumably, you don't use it as much as the programmers in Redmond.
That's not what I want to talk about here. I'm going to complain about the member access rights that C# and the CLR support.
In C#, there are four different member access rights. The usual private, protected, and public member access rights are supported. They also support "internal", which is the same as not exporting a function from your DLL in C++. The CLR supports one additional one called "Family and Assembly" which is the same as a protected member that is not exported from the DLL.
It's missing two extremely useful access rights, however. Java's package level scope and C++'s friendship. Both of these allow a programmer to grant access to a limited number of functions and classes. Java's package level scope is the optimal one, in my opinion. This allows a programmer to give limited access to a limited number of classes. Friendship allows complete access to individual classes and functions.
In the C# world, you're expected to grant public access to functions that should only be used by one other function outside your class. You're supposed to be happy about it, too!
What is SMF? According to simplemachines.org, Simple Machines Forum, or SMF, is a free, professional-grade software package that allows you to set up your own online community within minutes -- aka, it's forum software.
SMF is written in the popular language PHP (Andy may disagree) and uses a MySQL database.
This is an extremely powerful and easy-to-use forum, probably one of the more robust systems I've come across. Considering the price -- FREE -- you can't beat it.
Here's a list of some general features:
Advanced permission and user management
Supports multiple languages at once
Open and well-documented source code
Tracking of new and old unread topics, not just from your last visit
Designed for optimal performance and scalability
Multi-media output (XHTML, XML, RSS, WAP)
Multi-language support from a large community
Package manager that automatically installs or uninstalls mods (also known as hacks) as well as product updates
For an exhaustive list of features, visit the SMF features list here.
The minimum system requirements are as follows (most hosts will easily meet these requirements. If not, reconsider who you're hosting with) :
At least 512 kilobytes of storage space in the database, although more is highly recommended
About two and a half megabytes of storage space on the web server, although more is recommended
Our forum, located here, currently has over 100 members, and more than 300 posts and continues to run as smoothly as the day we launched. Granted, I'll come back to you when we get into the tens of thousands, as that will be the true test of scalability. The update/package manager works like a charm and I'm surprised at how compatible my heavily modified theme has been with each update. An update has yet to break my theme. knock on wood The system notifies you when an update is available for SMF itself and any mods that you might have installed. Click the link for the update, and via FTP, SMF automagically downloads the update. Then visit the Package Manager, click the "Apply Mod" link and you're set.
Free themes are available to customize the look and feel of the forum and install with ease. Modifying a theme is also a breeze if you have any working knowledge of HTML and CSS. Knowledge of PHP is also a great benefit, but not required.
The Simple Machines website offers a ton of mods to make the forum fit your needs. They offer mods for New Features, Feature Enhancements, Themes, Buttons and Avatars, Administrative Functions, BBC, Attachments, Permissions, Postings, and Profiles. They one area that SMF currently seems to lack is the ability to monitor posts easily. As an admin you can subscribe to a board, but that will only notify you of "new" posts, not comments to existing posts. Apparently this is an issue that is to be addressed in the 2.0 version. The first beta release of 2.0 was delivered last August. According to the forums over at Simple Machines, the following is a summary of some of the new features:
Database abstraction - with support for PostgreSQL and SQLite planned alongside that of MySQL
Automatic installation of packages into themes other than just the default
Email templates to simplify customization of forum emails
Moderation center including post, topic and attachment moderation - to allow approving of user content before it is made public *WOOHOO*
User warning system
Additional group functionally including group moderators and requestable/free assignable groups
WYSIWYG editor to provide an intuitive user interface to those users not familiar with BBC
Permission improvements such as group inheritance and permission profiles to further reduce the complexity of the permissions system
File based caching for a performance increase on all forums regardless of whether an accelerator is installed
Mail queuing system to stagger the sending of emails to improve performance on large forums
Advanced signature settings to allow the administrator of a forum to more tightly control the contents of users signatures
Personal messaging improvements including ability to automatically sort incoming messages and a variety of display options
Improved upgrade script with better timeout protection and simpler user interface
Custom profile fields to enable administrators to add additional member fields from the administration center
User configurable posts and topics per page; an improved calendar interface
Option to allow guests to vote in polls
Apparently, version 2.0 has been in the works for quite some time. As you can tell, the team is very committed to the success of this open source project and their goal is to provide the next generation of forum software. They are well on their way.
Our forum is currently running on a shared host -- iPower. I did need the assistance of the host to get the application installed as it's not one of the standard apps they natively support. And, as you may well know, shared hosts typically grant very little access to the system. They are apparently upgrading to a new server platform, which will hopefully include Fantastico, giving the user a little more freedom to install software. After the system was installed we did run into an issue where, on certain systems/networks, accessing the forum would result in the index.php not being recognized as a web page, but rather a file -- a download dialog would be presented instead of the file being rendered in the browser window. In the end it was a server configuration error of "unknown" somewhere in the PHP installation. Sorry I couldn't pry more information out of the lovely techs at iPower. However, other individuals experienced this issue and it's fairly well documented throughout the forums over at simplemachines.org.
Since the forum launched, we have had very few cases of users experiencing usability problems with the forum -- partly due to the wonderful theme, maybe? It works like any other forum available on the market. This is my first undertaking in administering a forum, and SMF has made life easy for me. As new requirements arise, the mods have been more than helpful in addressing those new requirements. The admin section of the forum provides an abundance of features to organize, monitor, and optimize your forum.
One other bit of functionality worth noting is that of the integration of SMF into various CMS systems. They've developed four bridges to help integrate SMF into e107 CMS, Mambo, Xoops, and iGamingCMS. To further entice you to make the switch from your current CMS/forum software, they've answered the question, "What about my current content?" They've also been nice enough to develop converters, to convert your other forum software into SMF. They offer 35+ different converters.
If you're looking for an easy-to-use, powerful forum application, consider SMF.