Girlfriend 6.0 vs. Wife 1.0-Comparative Trial

Last year a friend of mine upgraded from GirlFriend 6.0 to Wife 1.0 and found that it’s a memory hog leaving very little system resources available for other applications. He is now noticing that Wife 1.0 is also spawning Child Processes which are further consuming valuable resources. No mention of this particular phenomena was included in the product brochure or the documentation, though other users have informed him that this is to be expected due to the nature of the application.

Not only that, Wife 1.0 installs itself such that it is always launched at system initialization, where it can monitor all other system activity. He’s finding that some applications such as PokerNight 10.3, BeerBash 2.5, and PubNight 7.0 are no longer able to run in the system at all, crashing the system when selected (even though they always worked fine before). During installation, Wife 1.0 provides no option as to the installation of undesired Plug-Ins such as MotherInLaw 55.8 and BrotherInLaw Beta release. Also, system performance seems to diminish with each passing day.

Some features he’d like to see in the upcoming wife 2.0.

1. a "Don’t remind me again" button
2. a Minimize button
3. An install shield feature that allows Wife 2.0 be installed with the option to uninstall at any time without the loss of cache and other system resources
4. An option to run the network driver in promiscuous mode which would allow the system’s hardware probe feature to be much more useful.

I myself decided to avoid the headaches associated with Wife 1.0 by sticking with Girlfriend 7.0. Even here, however, I found many problems. Apparently you cannot install Girlfriend 7.0 on top of Girlfriend 6.0. You must uninstall Girlfriend 6.0 first. Other users say this is a long standing bug that I should have known about. Apparently the versions of Girlfriend have conficts over shared use of the I/O port. You think they would have fixed such a stupid bug by now. To make matters worse, The uninstall program for Girlfriend 6.0 doesn’t work very well leaving undesirable traces of the application in the system. Another thing — all versions of Girlfriend continually popup little annoying messages about the advantages of upgrading to Wife 1.0.

EasySMSv0.1 for Windows Mobile 6.x – Source Code

My previous post http://www.naresh.se/2009/09/24/easysmsv0-1-for-windows-mobile-6-x/ describes in detail why I created EasySMSv0.1 for my Windows Mobile device. Just search the Internet for “tmail.exe crashing in Windows Mobile” and you will find loads of people with the problem. Not one of them has been able to find a proper solution. I have created the application to have a possible solution to typing in an SMS and sending it to your list of contacts. Some applications like “BaselsSMSer” were good but had their shortcomings. No copy, paste content features, no group mailing, etc. were pretty frustrating. And some like “Power SMS” were completely useless and did not meet my criteria. And most of these were paid. Phew.. so I created my own.

Now as promised, I have published the source code for the software. It can be found on my forum at: Source Code for EasySMSv0.1.

The same post also talks about other features that I am planning to add to this software. So this is not the last of the EasySMS versions that you have seen. If you have ideas and feature requests, do not hesitate to reply me on the forum thread or this post.

Have fun computing…

EasySMSv0.1 for Windows Mobile 6.x

The tmail.exe (i.e. the messaging application) on my Windows Mobile v6.1 is crashing all the time and it really frustrates me. The other effect was that I was not able to write to my contacts or do anything with the messaging application which left me paralyzed and it also felt as a big drop in the functionality of my Windows Mobile device. I have an ASUS P570 updated with the latest code. The repetitive crashing started happening after I was in Germany and I don’t know why, it has never stopped. Google search brought up a lot of people with similar problems and as always people had lots of advice to give. I didn’t want to do a hard reset on my device because it has a lot of data and registry settings as well as is very tightly coupled to applications on my storage card. After some searching around, I found Basel’s SMS Sender to be quite a tool but it lacks functionality like sending to multiple contacts, copy, paste of the content, etc.

So I decided to write my own app which satisfies my requirements. The binary CAB installer for EasySMSv0.1 is available at http://funcomputing.uuuq.com/downloads/ … taller.CAB

The application can send SMS to one or multiple contacts from phonebook to other numbers then mobile, with multiple concatenated SMS support. It also takes in numbers typed in directly and as an added bonus, allows you to spam the people around. Though I do not recommend using it since spamming others will get you into their black book and you will be charged for each and every SMS that you send.
The application works pretty good. I will soon post the source code and am also thinking of future enhancements to make.

 

Please use the thread http://www.naresh.se/phpBB/viewtopic.php?f=17&t=12 in my forum to discuss and submit bugs/ideas for the application, etc. The source will be published on the link in the forum thread which can be downloaded only if you are a registered member of the forum. Enjoy and keep computing.

One more language! – NOOP (NOP) from Google…

I first started working with languages when I was born! Seriously, I had to learn the so called “Human Languages” to communicate with other humans, a couple of them were basically restricted to my region/country and one which is accepted universally (at least with the people I am working with). During my school days I started with another set of languages which one needed to grasp in order to communicate with a mathematical machine known as ”Computer”. In that sense, my first computer language might be Finite State Machine/Automata (FSM/FSA) which I studied in my school. Then BASIC, C, C++, Java, etc. during my graduation period. After that variants of those main languages with use of extra class libraries such as Visual Basic, Visual C++ (with MFC & ATL), ASP, JSP, JDBC, ODBC, etc. Recently I am doing more and more stuff in CSharp (C#).

Imagine the mess I am getting myself into working with different languages and not to mention various libraries which provide similar functionality in different ways. And then comes one more language NOOP which runs on JVM and is very much similar to Java! Huh, is it not more class libraries? Maybe instead of Java Main it might have a NOOP Main which ultimately calls Java Main from inside some class/wrapper library? So why is Google inventing a new language instead of just releasing some strongly typed libraries? As I understand, it wants to be everywhere. The day is not far when Google will come out with its own high level assembler.

Anyways, one of the interesting thing I found was that NOOP would not have any statics. So no singleton entities or maybe singleton implemented using some intricate library calls. No implementation inheritance means no subclassing and I don’t even want to know how OOD will survive without that. Or maybe I am too old and too much into assembly! No primitives is something I am looking forward to but I am not sure what kind of load that will put on the system. Again it might be good for user mode non-critical applications but can it do any real mathematics (try building a calculator with inter changeable types i.e. simply using objects and typecasting or leaving it to the compiler’s mercy for runtime interpretation of values).

Lets see how it turns up and if Google somehow manages to impose it on us gullible folks once again. Check out more on: http://code.google.com/p/noop/

Cross-Threaded Calls in .NET!

Now-a-days everybody has a Multi-core environment and you are required to code threads and/or multiple processes to be scalable and fully utilize the current hardware systems. And yes, it also proves that you are a good coder and are keeping up and committed to development of multi-threaded, multi-core applications. Now, now, I am talking a bit silly since threading is a concept existing since the dawn of computing. It was pretty much explicit and you can feel the power when you code in C or C++. But when it comes to high level frameworks and languages like .NET, C#, VB.NET, etc. the simplicity of using threads might become a big problem and lead to no understanding of how things actually operate. Of course execution context is something to learn about and a good programmer should always be aware of what execution context his/her thread/process is executing in otherwise he/she would find himself/herself in a lot of problems related to thread synchronization, deadlocks, etc.

I am still pretty new to C# and decided to use threads in MultiDoc2HTML v0.2 (v0.1 is available on Multiple HTMLs into a Single Document – MultiDoc2HTML v0.1). The logic as explained in other articles on the blog is quite serial and repetitive i.e. one cannot use multiple threads to do the job since each and every operation has to be done one after the other. In short, it is a batch operation which is not a direct candidate for multi-threading. But still there are ways to attack the problem and use threads especially for this particular logic. Not to deviate from the topic at hand, I will write about that in some other post.

For the time being, I wanted to do the batch execution in a separate thread (I could have used background thread for that but I think thread is more clean then background thread). Anyways, I will create one more version with background thread later on. But for the time being, I created a separate worker thread to do the batch processing and the main thread keeps updating the UI properly i.e. show the progress bar. It uses a timer tick event to do it i.e. Progress bar is not a visual indication of amount of work done/left. It is just there to tell the user that the worker thread is doing its work. The worker thread does the batch execution and generates an event to notify the main thread when all the processing is done. I would like to put the progress bar to the maximum value to be esthetically correct since having it midway would not be a justifiable execution complete message.

Now I thought that the event would post a message in the application message queue and the WNDPROC will call the proper event handler. But it does not seem to be the case since the event handler which is in the main thread gets called from the worker thread’s context. It sounds strange but that is the way events are working in C# i.e. the execution context of the event handler is same as the execution context in which the event is raised. Internally it might be handled as a direct call instead of PostMessage() that we c++/Win32 people normally expect.

Anyways, one of the problem with these kind of cross-threaded calls is that one cannot update the UI controls in such callbacks. They are deemed unsafe and they are unsafe since the execution contexts are totally different. The .NET compiler/interpreter fortunately helps us to identify such calls. The solution is to check for property InvokeRequired for the control and if it is true, do a self delegate and delegate our call. The next time, InvokeRequired will be false and the call will be made from the main thread’s context since we had delegated it previously. Its a bit twisted but thats how it is supposed to work. I would especially do an InvokeRequired check in events since they are more or less the mechanisms that I use for inter thread communication.

And remember that you need to do this for all the individual controls and it can become quite cumbersome. Fortunately templates are to the rescue. I found a nice snippet on the internet which allows us to make cross-threaded calls without creating delegates explicitly and checking for InvokeRequired on every control function/property. The CrossThreadUtility class is static with a static InvokeControlAction method as shown below.

    public static class CrossThreadUtility
    {
        public static void InvokeControlAction(t cont, Action action) where t : Control
        {
            if (cont.InvokeRequired)
            { 
                cont.Invoke(new Action>(InvokeControlAction), new object[] { cont, action }); 
            }
            else
            { 
                action(cont); 
            }
        }
    }

To use it in your code, just call the InvokeAction in the following manner. I wanted to change the progress bar value to maximum.

CrossThreadUtility.InvokeControlAction<ProgressBar>(prgBarProgress, tempPrgBar => tempPrgBar.Value = tempPrgBar.Maximum);

The first template parameter is the type of control. In my case it is System.Windows.Forms.ProgressBar, prgBarProgress is my variable associated with that control, tempPrgBar is a temporary progressBar variable created for delegating the cross threaded call. The statement after => is that function that I to call or the property that I want to set. And all these works like a charm.

Use it and forget the headaches about cross-threaded calls and delegates. Have fun computing…