The Spirit of Open Source

One evening, recently, when surfing the web I've discovered a software program called "Notepad3":

http://www.notepad3.org
http://www.linuxfuture.org/archives/2008/07/entry_38.html

It was advertised to be "an improved version of Notepad2". The "key improvement" was said to be an installation package to add some Explorer context menu entries and setting the IE source viewer, a help file, some altered default configuration (through a .reg file), and some changed toolbar button images. Moreover, some menu items have been moved and renamed. Utterly promising (see image on the right).

It was very interesting to perform a source code diff of my original Notepad2 1.0.12 against the "improved version":

diff -u0 notepad2\Dialogs.c notepad3\Dialogs.c
--- notepad2\Dialogs.c
+++ notepad3\Dialogs.c
@@ -230 +230,3 @@
-        InvalidateRect(GetDlgItem(hwnd,IDC_WEBPAGE),NULL,FALSE); }
+        InvalidateRect(GetDlgItem(hwnd,IDC_WEBPAGE),NULL,FALSE);
+        InvalidateRect(GetDlgItem(hwnd,IDC_EMAIL2),NULL,FALSE);
+        InvalidateRect(GetDlgItem(hwnd,IDC_WEBPAGE2),NULL,FALSE); }
@@ -238 +240 @@
-        if (dwId != IDC_EMAIL && dwId != IDC_WEBPAGE)
+        if (dwId != IDC_EMAIL && dwId != IDC_WEBPAGE && dwId != IDC_EMAIL2 && dwId != IDC_WEBPAGE2)
@@ -273 +275,9 @@
-        SetCursor((dwId == IDC_EMAIL || dwId == IDC_WEBPAGE)?hCursorHover:hCursorNormal); }
+        if (hover_email != (dwId == IDC_EMAIL2)) {
+          hover_email = !hover_email;
+          InvalidateRect(GetDlgItem(hwnd,IDC_EMAIL2),NULL,FALSE); }
+
+        if (hover_webpage != (dwId == IDC_WEBPAGE2)) {
+          hover_webpage = !hover_webpage;
+          InvalidateRect(GetDlgItem(hwnd,IDC_WEBPAGE2),NULL,FALSE); }
+
+        SetCursor((dwId == IDC_EMAIL || dwId == IDC_WEBPAGE || dwId == IDC_EMAIL2 || dwId == IDC_WEBPAGE2)?hCursorHover:hCursorNormal); }
@@ -283 +293,7 @@
-        if (dwId == IDC_EMAIL)
+        if (dwId == IDC_EMAIL2)
+          ShellExecute(hwnd,"open","mailto:anas@linuxfuture.org",NULL,NULL,SW_SHOWNORMAL);
+
+        else if (dwId == IDC_WEBPAGE2)
+          ShellExecute(hwnd,"open","http://www.linuxfuture.org",NULL,NULL,SW_SHOWNORMAL);
+
+        else if (dwId == IDC_EMAIL)

diff -u0 notepad2\Notepad2.c notepad3\Notepad2.c
--- notepad2\Notepad2.c
+++ notepad3\Notepad2.c
@@ -61 +61 @@
-                           {2,IDT_FILE_METAPATH,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0},
+                           {2,IDT_FILE_HELP,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0},
@@ -1426 +1426 @@
-    case IDM_FILE_METAPATH:
+    case IDM_FILE_HELP:
@@ -1430 +1430 @@
-        char tchMetapath[MAX_PATH+4];
+        char tchHelp[MAX_PATH+4];
@@ -1435,2 +1435,2 @@
-        if (!SearchPath(NULL,"metapath.exe",NULL,COUNTOF(tchMetapath),tchMetapath,NULL))
-          lstrcpy(tchMetapath,"metapath.exe");
+        if (!SearchPath(NULL,"Notepad3.chm",NULL,COUNTOF(tchHelp),tchHelp,NULL))
+          lstrcpy(tchHelp,"Notepad3.chm");
@@ -1444 +1444 @@
-        sei.lpFile = tchMetapath;
+        sei.lpFile = tchHelp;
@@ -1452 +1452 @@
-          MsgBox(MBWARN,IDS_ERR_METAPATH);
+          MsgBox(MBWARN,IDS_ERR_HELP);
@@ -1454,2 +1454,2 @@
-        //if (32 > ShellExecute(hwnd,"",tchMetapath,tchParam,NULL,SW_SHOWNORMAL))
-        //  MsgBox(MBWARN,IDS_ERR_METAPATH);
+        //if (32 > ShellExecute(hwnd,"",tchHelp,tchParam,NULL,SW_SHOWNORMAL))
+        //  MsgBox(MBWARN,IDS_ERR_HELP);
@@ -1457 +1457 @@
-        // Set the metapath registry options if metapath.exe was found
+        // Set the help registry options if Notepad3.chm was found
@@ -1466 +1466 @@
-          hKey = RegGetKey("Software\\metapath\\Target Application");
+          hKey = RegGetKey("Software\\help\\Target Application");
@@ -2637,3 +2637,3 @@
-    case IDT_FILE_METAPATH:
-      if (IsCmdEnabled(hwnd,IDM_FILE_METAPATH))
-        SendMessage(hwnd,WM_COMMAND,MAKELONG(IDM_FILE_METAPATH,1),0);
+    case IDT_FILE_HELP:
+      if (IsCmdEnabled(hwnd,IDM_FILE_HELP))
+        SendMessage(hwnd,WM_COMMAND,MAKELONG(IDM_FILE_HELP,1),0);

Not to forget some changed copyright messages in the resource scripts and documentation files, as well as some moved menu items. My original Notepad2 source code tree consists of around 25'000 lines of code, the above modifications affect a handful of lines. That's it. No joke!

It's a copy of my original Notepad2 1.0.12. The copyright message in the "About" dialog box has been modified to display another name, e-mail and website address, and the "Browse" toolbar button to launch metapath has been redirected to open a help file. BTW: the changes are very clumsy and dilettante, the modified hover code doesn't even work properly, and the metapath registry settings are still written, but for the help file.

So this version contains even less features than my original Notepad2! Almost unnecessary to mention that the "help file" is just an assembly of copies of my readme files and my website documentation.

I need to say that a setup tool to configure Explorer context menus, or a registry file with a revised default configuration could be distributed separately, without the need to edit the source code. And there's even options in Notepad2 to load custom toolbar button images from external files.

Nonetheless, the author has chosen the name "Notepad3". Compared with the original Notepad, Notepad2 represents an evolution with new features. "Notepad3" implies the same, but with even less features, without any new development. Seems that the play on words is used to fool users into believing that "Notepad3" is something more advanced. The popularity of Notepad2 is being taken advantage of to attract some attention ― I have no idea what else might be the motivation of the author.

The author justifies the publication of "Notepad3" with the added installation and documentation (which is actually my documentation, and has always been there). Innovation equals zero. This causes confusion about the different versions available, and the reputation of my software is harmed when associated with that kind of sloppy, offending descendants (and, it makes me think how indiscriminate some well-known software sites are concerning additions to their repositories).

I have no problem with new versions of my software being released, even with minor changes ― my licensing conditions are fully met. The problem here is that the author made minor changes to the code and branded it in a very disingenuous and deceiving manner.

I have been working on Notepad2 over more than 10 years, altogether. The above hacks may have been done in a few minutes.

There have been similar cases in the past, already, but this one really beats everything. I'm not sure if I'm going to release any more open source versions of Notepad2, in the future. Ain't fun like that.

Update: July 06, 2008


© Florian Balmer 1996-2014
Page created: June 30, 2008
Page last modified: July 06, 2008