1. Computing
Send to a Friend via Email

Learn WPF and XAML

In case you haven't heard, Windows Forms is going away ... someday. All of the hot, new stuff is written in WPF and XAML. About Visual Basic has an easy-to-read introduction to WPF, and a collection of supporting articles too!

More on WPF and XAML with VB.NET
Visual Basic Spotlight10

Goodbye ...

Friday August 24, 2012

Wishing Bug-free Code to Everyone!

It's with quite a bit of regret that I must tell you that I won't be the About Visual Basic site guide starting next month. This will be my last blog. It's been real and it's been fun!

I originally decided to become the About Visual Basic guide after I retired from a career writing code and managing other programmers. I started using Visual Basic with version 1.0. I knew immediately that this new way of writing code would be a world class revolution.

Unfortunately, the company I worked for at the time had other ideas. Top management was married to IBM. They spent millions on IBM technologies like IMS, token-ring networks, PL/1, and OS/2 that became tombstones along the way in IBM's horrible and prolonged death march. (Corporations, unlike people, can die and then come back to life. That's what happened to IBM.) The company I worked for even made major investments in Lotus, Novell, WordPerfect and an IMS based code generation technology called Pacbase that was recommended by their consulting partner, Arthur Anderson.

It is difficult to imagine a longer and more consistent string of completely wrong technology choices!

All the while, I tried in vain to convince top management that Personal Computers, Visual Basic, and the Internet were really the future. I conducted the very first Internet demo the President of my company had ever seen. He told me I was wasting my time. Looking back on it now, I really don't know how I survived.

The bottom line was that when I retired, I had a driving need to get back to the technology foundation that made sense to me: Personal Computers, Visual Basic, and the Internet. I became the About Visual Basic guide and I've been writing about it for a decade now. Along the way, I also co-authored a book about it:

Pro ASP.NET 4 in VB 2010

I wish I could tell you what the future of Visual Basic will be, both here at About.com and in the world. But my crystal ball is foggy on those. Change is in the air in both. The only thing that is completely clear is that they won't be the same. Windows 8 is such a dramatic departure from anything Microsoft has done before that it's almost unrecognizable. It will be fascinating to see whether it will be a breakthrough or a train wreak.

Visual Basic continues to be a great development environment - I think the best environment - for the jobs it has always done well:

  • Desktop applications
  • ASP.NET server based applications
  • Office automation

It's not so clear that it will be the best answer for the new world of mobile applications, cloud based computing, and game programming. In fact, it probably won't be. Microsoft seems to want to pretend that all computing can still be wrapped up in a huge package labeled "Windows". IBM died because they could not see out of their own internal hall of mirrors. I wish Microsoft the best ... but they may be dying of the same disease.

In any case, it's time for me to conquer new worlds too. I've often described myself as a novelist trapped in a techie's body. Maybe you will see a novel with my name on it someday. If you do -- buy it!! But until then ... may your code always run flawlessly the first time.

Filter Function - String Processing in VB.NET

Sunday August 19, 2012

Strings may be the second most useful "type" in VB.NET. (Integers are probably the first.) So there is a lot of useful string processing built into VB.NET. The Filter function is one and a new article here at About Visual Basic gives you a fast explanation showing how to use it.

The Filter Function in VB.NET

Shallow Copy versus Deep Copy

Sunday August 12, 2012

Although you will find these terms mentioned in technical articles, you won't find any methods with these names. In fact, "Shallow Copy" is the only type of copying directly supported by a method and that one is named MemberwiseClone. (Where Microsoft got that name, I do not know. If you think you can explain it, let the rest of us know.)

 A new article on the site explains what they are and how to use them.

Shallow Copy versus Deep Copy

Does this Microsoft Example Make Sense To You?

Saturday August 4, 2012

Check out the example at Microsoft's page about the String.Clone Method. A snippet of the code there ...

' Create a Unicode String
with 5 Greek Alpha characters
Dim szGreekAlpha As New String(
     ChrW(&H0391), 5)
' Create a Unicode String
' with a Greek Omega character

Dim szGreekOmega As New String(New Char() {
     ChrW(&H03A9), ChrW(&H03A9),
     ChrW(&H03A9)}, 2, 1)

This is possibly the worst example of Microsoft documentation I have encountered. (And that's saying something.) And it's used many times to document the different versions of .NET.  Here's just a few of the things wrong with it:

1 - Greek letters have absoutely nothing to do with what they're explaining.

2 - It's totally unnecessary to use things like Unicode characters expressed as Hexadecimal numbers and an obscure New constructor that picks the second element from an inline array. Why do they do those things?

3 - They never explain any of it or even tell you what the result should be. To see that, you have to copy it into your own environment and run it.

But the most egregious fault is ... It doesn't tell you anything about String.clone! (Except maybe basic syntax ... and that's shown earlier.)

Can anyone tell me what I'm missing?

In any case, this was one reason I wrote a new article for the site: Copying Reference Types. Hopefully, this article explains it.

©2014 About.com. All rights reserved.