Category: Technical stuff

Arnor Baldvinsson
11/02/11

Dr. Explain 60% off at BitsDuJour

For the next 16 hours or so you can get Dr. Explain at BitsDuJour for just $66, 60% off the regular price of $165.

Dr. Explain is a nicely featured help authoring tool that can produce .chm, .rtf, .html and .pdf files all from the same source.

Definitely worth checking it out!

Arnor Baldvinsson
09/19/11

HTML5 is hot; Get IE-10 and start playing

HTML5 has been in the news a lot this summer!

When Windows 8 was announced by Microsoft in May 2011, there was a very strong reaction from the developer community. The reason was that the announcement talked about using HTML5 and JavaScript to create applications for Windows 8. Many developers saw their world crumble. And predictions of doom were everywhere. They said Microsoft was going to abandon .NET and no legacy Win32 applications would be able to run on Windows 8, everything would have to be re-learned and re-written. What was missed was that while HTML5 and JavaScript can be used to develop new applications for Windows 8 - they are not necessarily a requirement!

I was a bit skeptical about the overwhelming visions of doom! I found it very unlikely that Microsoft would throw away millions of man-years of work invested in the .NET platform and support for Win32 applications. It simply didn't sound like a good business move. While Microsoft has certainly developed technology in the past that didn't last long and was soon overtaken by something else they invented, a lot of their stuff has stuck around for a long time. In the Clarion world we have come to love and hate DDE, which dates all the way back to Windows 2 which was released in 1987! It is still used in parts of the Windows Shell - I believe also in Windows 7, not sure about Windows 8. ODBC is another old technology that Microsoft used and while they were not the developers of it, without Windows supporting it, there wouldn't have been much ODBC going around for us:)

As Windows 8 progresses, it is getting clear that HTML5 and JavaScript are the new kids on the block - if you can call JavaScript new as it was developed by Netscape in 1995, then called LiveScript. You will still be able to create applications using your trusty development tools and they will still run on Windows 8. But if you want to get into the new Metro look and all the new fancy stuff in Windows 8, you need to take a good look at the development tools that Microsoft is already putting out.

Two days ago I blogged about Windows 8. There I included a link to the Windows 8 download page where you can download the latest Windows Developer Preview, which includes Visual Studio 11 Express. Visual Studio 11 is designed to create Windows 8 applications. Couple of days ago, Microsoft put up a page with First look at Visual Studio 11 Express. This page includes links to various other places, but for clarity I'm going to duplicate them here:

Tour of the IDE for JavaScript developers
Tour of the IDE for C#/C++/Visual Basic developers
Using the JavaScript project and item templates
What's New in Visual Studio 11
Getting started with Windows Metro style app development

One of the nice things about VS11 is that projects and solutions are backward compatible with VS2010. What I find interesting is that VS11 has quite a number of new features for C++. My personal guess is that C++ is still very much the core of Windows and some of those changes, such as AMP (Accelerated Massive Parallelism) was a feature added to help make touch as smooth as possible. It seems to be designed to speed up the data transfers between the CPU and the GPU using parallel data transfers.

But I'm getting sidetracked! I was talking about HTML5. You can now download Internet Explorer 10 with the Developer Preview and start playing with it. I suggest you check out Microsoft's Internet Explorer Blog as it has all sorts of information about Internet Explorer.

IE10 looks quite different from IE9

. It doesn't even have an address bar! This allows the browser to become more of a website reader than a website navigator as we are used to in earlier IE versions.

I haven't had a chance to play with Windows 8, VS11 or IE10 yet. Had to work on a top-priority report for a Clarion client so I haven't had a chance to take a look but I plan on taking some time this week and load a virtual machine in VirtualBox and see how it works. I'm excited about all this new stuff, to see how we can help our customers move forward. Clarion will be our primary development tool for a long time to come, but if you have any questions or suggestions about our products and Windows 8, please let me know!

Arnor Baldvinsson

Arnor Baldvinsson
09/16/11

Windows 8 download and testing

I'm sure you have heard that Windows 8 is in town. I have downloaded the full 64 bit Windows Developer Preview with Developer tools as well as the 32bit Windows Developer Preview without the developer tools to be able to check out both 64 and 32 bit as well as the developer tools.
The Developer tools edition includes Visual Studio 11 Express, Expression Blend 5 Developer Preview and 28 Metro style apps, including the apps from the BUILD conference.

You should stop by and watch the videos posted from the BUILD conference in Anaheim, California, where Windows 8 is being presented. This one shows nicely how the Metro interface works in a 93 minute presentation

You can download Windows 8 from http://msdn.microsoft.com/en-us/windows/apps/br229516 The downloads are ISO DVD images and the one for the full install with the Developer Tools requires a DVD-9 format, i.e. dual-layer DVD. So if you want to burn it to a DVD you need software and burner that can handle burning a dual-layer DVD.

In order to run Windows 8 it would be advisable to install it on a virtual machine rather than mess with creating separate partitions to install it on. VMWare users need to upgrade to VMWare Workstation version 8 in order to be able to install Windows 8. However, there is an alternative, an open source project called Virtual Box from Oracle. You can download it from http://www.virtualbox.org/wiki/Downloads I have been using VMWare 6.5 for almost 3 years now and not had much complain about it, but VirtualBox has got some nice reviews, particularly about being noticeably faster than VMWare - I welcome any speed increase I can get! I plan to do some testing of VirtualBox and see how it holds up - expect a review or some posts about it soon.

PCWorld has put together a short tutorial on how to install Windows 8 Developer Preview on Virtual Box I plan to play with this a little bit over the weekend and get a feel for both VirtualBox and Windows 8. Can't wait to see how Windows 8 holds up.

Arnor Baldvinsson

Arnor Baldvinsson
06/01/11

Out of milk - Android app of the week

Out of milk is one of those apps that you can't understand how you lived without!!! It was one of the first apps that I got for my phone. Now I don't know how I could function without it! One of my favorite features is the ability to use the camera in the phone to scan bar codes on products to get them into the shopping list. So far it has pulled about 90 percent out of its database. It also has a to-do list and a pantry list, but I haven't used either of those much so I can't comment on those features. But I would strongly recommend that you check it out for yourself:-)
At $ 4.99 it's not free, but to me it has been worth every single cent!

Arnor Baldvinsson

Arnor Baldvinsson
05/29/11

Mobile app to control your computers

During a skype discussion this application, PC Monitor, came up and I thought I would share this with you. Please visit http://www.mobilepcmonitor.com/ for the product website.

PC Monitor is a an application for your iPhone, Android or Windows Phone 7, that can monitor computers running Windows, Linux or Mac OS. It is free for up to 5 computers and for more than 5 computers you can buy annual subscriptions that start at US$ 49.95 for up to 10 computers and US$299 for up to 100 computers.

If you monitor or manage computers, then this is definitely an app you should take a look at. I can also see this app used as a safety device to monitor computers in an office or at home when you are not at the same location as the computers.

You can also send commands to the computers you monitor and get notifications when something happens on the computer, such as when the computer is rebooted, low on battery, when user logs in or out, etc.

Arnor Baldvinsson

Arnor Baldvinsson
05/26/11

Cleaning up your applications

Every now and then I do a "File | Save as" in C6 to clean out the gunk that Clarion collects in the apps from time to time. Been working on a fairly large app with a lot of browses and forms in it and today after adding a browse/form to it and doing some work the IDE crashed. Been working in this VM for probably 2 weeks or more without rebooting it (and Clarion 6.3 has been running that whole time) and decided it was time to do this trick again. The app file went from 7.8MB to 5.8MB! Now it loads much faster and generates faster also:) I don't know if this still applies in C7/C8 but wouldn't be surprised if it did. If you are not doing this regularly or semi-regularly to apps that you are working on a lot, your apps are collecting gunk that does nothing but slow Clarion - and you - down! It's simple:

1. Open your app

2. Use "File | Save As" to save it to a new name (I use appnameX.app)

3. CLOSE the app. This is an important step I have found.

4. Move the original app (appname.app) out of the folder for
backup IN CASE something fails (it has never failed for me, but you never know!)

5. Open the appnameX.app

6. Use "File | Save As" to save it back to the original name.

7. Keep going:)

I try to do this like once a month or so, depending on how much I work in the apps. After I posted this I received word from one guy who did this to his app and it went from 15MB to 1MB!!!)

Arnor Baldvinsson
02/06/11

Powertoolbar bugfix

Ever since we took over the PowerOffice tools in December of 2008 there has been a bug in the PowerToolbar that I had just about given up on ever finding. It was to a point that I have been considering pulling the product off the market if I couldn't find and fix this bug, because this was becoming more and more of an issue.

The problem would only manifest on Vista, Windows Server 2008 and Windows 7 machines. The code that themes the menus is different for XP and older operating systems and there is no problem. What happens in Vista and newer operating systems is that some menus were not themed at all and this would offset the settings so that icons would be out of sequence, some items wouldn't be themed correctly, menu items would disappear, text was missing etc.

Last week I decided to take this week and dig into this and either find it and fix it or basically give up on it and throw in the towel. This was the fourth time I dedicated a week or so of work to try to find this. I couldn't get going on this for real until Wednesday and spent Wednesday and Thursday tracking things. Yesterday, Friday, I had isolated the problem to what appeared to be the WM_DRAWITEM message not firing for some of the menu items and by last night I was completely confused. It made no sense that messages that fire when a menu item is drawn were not firing. No sense at all! So I decided to do the sensible thing and sleep on it!

When I got up this morning I had formed a bit of a battle plan and decided to start from the other end of things. Write code to track down the handles of the menus and then duplicate the steps that PowerToolbar takes in order to gather information about the menus and see if something went missing. My thought was that perhaps there was something in the menus that caused them not to be traversed by the API calls made to gather information about the menus, items and sub-menus.

I wrote a simple class that looped through the controls on the appframe window and put the menus and menu items into a queue. I then used GetMenuItemCount() to get the number of items in each menu as well as the handle (PROP:Handle) for each menu. I used OutputDebugString, my favorite method of debugging, to output the information into DebugView and then checked out each menu and the information. I started noticing a trend! Every menu that was not themed correctly had a negative value for the handle. I was on to something, but what?

After a lot of experimenting it was obvious that something was preventing the code from detecting the menus with negative handles and thus not theming them, setting everything off. I checked a couple of methods that gather information about the menus and menu items and also set the menu to be owner drawn. It didn't take long for one particular API to stand out: GetSubMenu(). It retrieves the handle of sub-menu from a menu handle and thus makes it possible to "walk" the menu structure using API calls.

But it wasn't the actual call to GetSubMenu() that was interesting, rather the check that came after it:

hSubMenu = PTB:GetSubMenu(hMenu, Pos-1)
If hSubMenu > 0 Then SELF.GetMenuInfo(hSubMenu, Feq).

Looks good to me! But when I carefully read the information about GetMenuInfo on MSDN I realized that the function returns 0 ONLY if it fails or if the handle is not returned. The handle can be negative and now everything came together in my head and I realized this was why it couldn't handle the negative handles - it would only recurse if the menu handle was a positive number greater than zero!.

The bottom line was that I had to add the "<" character in two places and the problem was solved. I changed the code above to:

hSubMenu = PTB:GetSubMenu(hMenu, Pos-1)
If hSubMenu <> 0 Then SELF.GetMenuInfo(hSubMenu, Feq).

in two places and the problem disappeared! This is already out for beta testing and I hope to release this early next week! I feel very good about finally finding this and figuring out the fix.

Arnor Baldvinsson
12/22/10

Skype down

I use Skype quite a bit for all kinds of contact with clients and programmers and it has become part of my life. I just found out that it has been down all day, at least for me and millions of other users. Click here to read more about this problem on the Skype blog.

Here are couple of other links that have some more information:

http://blogs.wsj.com/digits/2010/12/22/skype-down-for-millions-of-users/

http://blog.tmcnet.com/blog/tom-keating/skype/skype-down.asp

Hopefully they will get it back up again soon:)

Arnor Baldvinsson

Arnor Baldvinsson
11/16/10

Disappearing application...

I'm sure we have all seen this from time to time! We run our newly compiled program only to have it disappear all of a sudden for no apparent reason. We search and search and search... Finally we find, using whatever debugging methods we choose, that the program goes down when it assigns a value to a variable. Doesn't make any sense at all until we, hours later, realize that the darn variable is a REFERENCE variable! Yep, we accidentally hit the "Reference" checkbox on the column property window.

This looks all so simple and happy, doesn't it?

But there is a deadly problem lurking on that window that is so easy to overlook!

Do you see what it is?

No?

Look again!

The "Reference" checkbox!

In the past years I have probably lost more time to this than anything else and it is nobody's fault but my own!

It happens once in a while and that is the problem. If it happened every day I'd expect it, but it happens perhaps every 3 months or so.

I'm still not sure what I do to accidentally check it! The hot key for it is Alt-F and I'm very used to very quickly hit Alt-F-S to save. Years ago I found that key combination to be easier and more universal than Ctrl-S for Save so I stuck with Alt-F-S and I'm wondering if that's what I'm accidentally doing. Or maybe I accidentally click on it. Don't know.

Whatever the reason is, every so often I check the "Reference" checkbox and it's always when I'm implementing something new. So I, rather logically, assume that it is whatever new I'm adding, not that new variable I just added. After all, what in the world could go wrong when creating a simple variable? As it turns out, quite a lot can go wrong;)

So what happens when you try to assign the "July 31, 2009" date value to a reference variable? Chances are very good that the program is going to fall over in a dramatic way - no GPF, no nothing. It just disappears! It is unlikely that the value 76186 is pointing to anything useful!

It would be nice if a warning message was implemented in Clarion 7 as an option so that it would warn when the Reference checkbox was checked when creating or modifying a variable with something like: "Are you sure you want to create a Reference variable?" or "Are you sure you want to change "Loc:FromDate" into a Reference variable (&Loc:FromDate)?" It would save me some time and definitely some frustration when I accidentally check the "Reference checkbox"!

Happy bug hunting:)

Arnor Baldvinsson

Dave Harms, the editor of Clarion Magazine, published an article appropriately titled The future of Clarion.NET (subscription required).

To quote Dave: "Six years ago this month, at the only Florida DevCon of the decade, SoftVelocity's president Bob Zaunere announced Clarion.NET, the company's upcoming flagship product for Microsoft's .NET framework. "

Dave's conclusion is "Yes, Clarion.NET has a future, but at present it's not a very bright one. There's no AppGen yet, and past performance suggests that even if one does appear shortly it will take a long time before it is usable, particularly for newer technologies such as WPF."

So where is Clarion.NET?

From my perspective Clarion.NET doesn't exist. I bought a license a couple of years ago or so (don't remember exactly) and nothing much has happened since. I have not even bothered downloading the new builds. There is no application generator, no templates, just an IDE and a Clarion# compiler. I can just as well use Visual Studio and compile in C# or VB.NET. To me there are only two reasons to use Clarion#: Support for TPS files and queues. On the other hand, I don't want TPS files in .NET and from what I understand, collections and LINQ in .NET can easily be used instead of queues. So the advantages of Clarion# for me just aren't there.

Will SoftVelocity ever deliver Clarion.NET? I don't know. The product was developed outside of SoftVelocity and it feels like there is no communication about it. SoftVelocity deletes any threads from the ClarionSharp newsgroup that queries into the status of Clarion.NET. No information at all escapes except what SoftVelocity posts on their blog-site, the last one from just over a month ago, showing one screen-shot from the data pad and one screen-shot from the "Embed interface" which quite frankly is not looking like anything that is going to materialize anytime soon.

The silence of Clarion.NET

It is a well known secret by now that the Clarion.NET product was developed by Arcadia, a company in St. Petersburg, Russia. Arcadia has long experience in software development in Scandinavia. The contract was supposed to start in mid-2004 and take 4.5 years (or 500 man months) with a team of 10 developers. I don't see anything wrong with this, but something has definitely gone wrong in this relationship and one has to wonder if this project is dead. The absolute lack of public communication from SoftVelocity regarding Clarion.NET is worrisome - the silence is indeed deafening.

Starting something new

In the beginning of 2010 I decided to write off my investment in Clarion.NET and not have any expectation of it ever being released. This was actually a relieving decision as it transferred me out of a black hole that the Clarion.NET world had become and into the very exciting other .NET world! I went from negative to positive:) My commitment to the other .NET development environment was further strengthened as I started thinking about what benefits there would be to use Clarion.NET - and I found the benefits were precious little.

While I would miss some of the Clarion functions and syntax, I have done enough programming in both C and PHP to be able to embrace the syntax structure and case sensitivity of C#. I also have some BASIC programming in my background, BASIC being the first computer dialect I learned almost 25 years ago, so I would be Ok with VB.NET. I will blog later on what the initial pros and cons of C# vs VB.NET are for me.

Don't get me wrong: Just looking at all the stuff that is available for all the different options in .NET is an absolutely daunting task! But at the same time, it is energizing and fills me with optimism about programming because I see all those things that I can do! There are all those tools and products available in the .NET world for just about every conceivable task. And the millions of articles and blog posts about the various technical aspects are out there, too. Thousands up on thousands of detailed examples on sites such as Code Project. All right at my fingertips, ready for me when I need them.

What about Icetips products?

Does my decision to move to Visual Studio instead of Clarion.NET affect my support for Clarion as a desktop programming environment? Absolutely not! I will continue to work actively with Clarion, support my Clarion third party products, and add to those products, for a long time to come. I have absolutely no intention to stop using Clarion for desktop development, but I'm simply not waiting for Clarion.NET any more.

Considering Visual Studio

If you are considering looking into .NET - and in my opinion you should - you can download the free Visual Studio 2010 Express version right now and start playing with it! For the time being, I'm not sure what exactly the limitations are in the Express edition, but it looks like database access is limited to SQL Server Express and Access databases. Which admittedly should be just fine to start with, although it will not give you much freedom in accessing your existing databases unless they are in either of the supported formats.

The Professional Edition costs $549 if I'm reading things correctly. You can compare the various commercial versions to see what is included in each one. I have the BizSpark package from MS which is free to start, is valid for 3 years and costs $100 at the end and it includes a license for VS 2010 Ultimate so I'm good to go.

Learning .NET

The really cool thing about Visual Studio and .NET is that there are more resources available out there than any one of us can even imagine! As an example here is just one tutorial website for Windows Presentation Foundation at http://www.wpftutorial.net/

So where does this leave you? Where do you stand? What are you looking to get out of programming in .NET? What do you want to accomplish? Food for thought...

I have not done any .NET work yet. My plan is to start easing into it in the next month or so. I have some small stuff I can start with. Setting up a mySQL .NET provider, hooking up to my remote database and creating a browse using WPF will be my first step. I'll see if I can glue all the pieces together to make one browse app. I'm going to start messing with ASP.NET, set up a domain to test with online and see how it works. Then I'll take it from there. What are you going to do? Think about it:)

Starting the journey

In the coming months I will be taking a journey, studying .NET, experimenting with it and learning how to use it. I will blog about my experiences and perhaps I can help you along on your journey. I will shortly be setting up a new domain that I will use exclusively for exploring ASP.NET and SilverLight, which are my primary targets for .NET at this moment. I will also be exploring WPF, like I said, for some in-house programs, which quite frankly will mostly be to cut my teeth on WPF and desktop programming in .NET. My plan is to have something that connects to a database up and running before September 20!

Arnor Baldvinsson

1 2 3 4 5 6 >>

February 2012
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Poll

Are you using Clarion 8 or Clarion 7?

View Results

Search

XML Feeds

multiple blogs