Login | Register
 
  Books Written by Brian Nantz  
  Links  
 
  Right To Left  
Author: host Created: 11/17/2005
This is a web log of things I have learned and hopefully can save you some time.

UI Development
By host on 8/24/2003
UI development is probably the most challenging aspect of programming I have run into yet. Yes, creating a useful Webservice or middle tier data api gives a great feeling of accomplishment. I personally find a framework like Apache’s Avalon or Microsoft’s Application Blocks to be incredibly useful. However, to a user the only thing that matters is how easy and intuitive the UI is to use. The look and feel of a program certainly improves it in the perspective of the user, unfortunately, what comprises a good UI is as individual as the users themselves. But nothing compares to the experience of creating a UI that you and all your experimental users like. I find that most people can not explain how to create a good UI, “It just comes with experience.” But there are a lot of examples to tell you what NOT to do in a UI. There are a few good organizations like Usability Net and User Interface Engineering that I have found useful. IBM has some good stuff on their site about user design. I especially like t
More...

A common type system!
By host on 8/20/2003
One of the great training sessions I got at Camtronics was Essential .Net from Developmentor. The instructor and team participated in trying to name all the different ways to do a string in VC++, MFC, ATL, COM, etc.. We came up with 42 I think. Here are the ones I can remember: "I'm so sad" L"I'm so sad" W"I'm so sad" OLESTR("I'm so sad") SysAllocString(L"I'm so sad") _T("I'm so sad") _TEXT("I'm so sad") char * wchar_t * BSTR CAtlString CAtlStringA CAtlStringW CComBSTR CSimpleStringT CString CStringA CStringT CStringW DBTYPE_BSTR DBTYPE_STR DBTYPE_WSTR LPCSTR LPCTSTR LPCWSTR LPOLESTR LPSTR LPTSTR LPWSTR OLECHAR System::String TCHAR _bstr_t std::basic_string std::basic_string std::string std::wstring Are they Initalized?? Are they dynamic? Can I covert between them? I really like the common type system in .Net.
More...

Continuation of the Imaging Saga
By host on 8/13/2003
After capturing or importing an image, the next logic step is to allow the user to edit the image. The bitmap class in .Net is not adequate enough to resize a large image I’m not sure but it looks like Bitmap is using bit blipping and not interpolation and anti-aliasing. In looking for an image library that both supported .Net and had no runtime license I can across PhotoStudio.Net ($200). I liked the simplistic API and the willingness of NCT to make the source purchasable. PhotoStudio.Net is written entirely in managed code and that also was a big plus. Most vendors out there just put a .Net wrapper around their existing implementation. Luckily the price was right, I could not create an implementation that would cost less than $200. However, just before I found PhotoStudio.Net, I was searching for freely available code that I could use. I ran across several GNU implementations, but the library I had determined to use was Image Magic. I do not think it would be very difficult to create a .Net binding
More...

So many standards So little time
By host on 8/12/2003
I was assigned to create an image capture utility to work on the Windows platform. The spec is as follows: 1). The user should be able to see an onscreen “live-video-style” windows and click a capture button. 2). Advanced users may also want to import their pictures from their Super-Mega Pixel SLR type digital camera. OK can’t be too hard right? DirectX makes it all easy. I seem to forget that nothing is easy. After Marketing wavered a little in answering my question of what versions of Windows it would need to support, I went into research mode. Look at the standards I found: VFW Video for Windows, or VFW, is the multimedia technology that ships as part of Windows 95. It can be added to earlier versions of Windows when you install a CD-ROM title or other program that uses VFW. Its playback files have the extension .avi and can be played using Windows' Media Player. Since the files are large, they are often compressed using a codec. Video for Windows is no longer supported by Microsoft, and
More...

Configuration Information
By host on 8/11/2003
Today I was thinking that it would be great if I created a utility for my projects that allowed for generic storage of configuration information. I even started one as an example for the Web Service Security book I wrote. I don’t know about you but storing db connection strings (including usernames & passwords) in a text file on the server just makes me nervous. I would make the API easy to use and abstract the storage location (db, registry, xml, COM+) from the users. If I got really ambitious I could even add cryptography and dpapi to the equation. Then as I was cleaning out an email folder from a mailing list, and I ran across this (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/emab-rm.asp) as a suggestion for handling exceptions in ASP.Net. I then saw all the other Application Blocks and immediately installed them to find that they came complete with source. The one that immediately interested me is the Configuration Management Application Block, but many of the other
More...

P/Invoke GetLastError
By host on 8/10/2003
Luckily the WinIO Parallel Port API (http://www.internals.com/) didn’t really use pointers or structures and was easily wrapped in C#. I also like the consistent interface that worked on everything from Win98 to WinXP! Probably the handiest trick I came across in using P/Invoke was in retrieving Win32 errors. Instead of trying to import GetLastError and FormatMessage (which requires the use of pointers and the unsafe compiler directive), there is a much simpler way. Check out this one line treasure: Win32Exception w32e = new Win32Exception(Marshal.GetLastWin32Error()); Then you can just throw another exception: throw(new ApplicationException(w32e.Message)); and let the someone else handle it!
More...

No such thing as a small project
By host on 8/7/2003
Whether you are using .Net commercially, academically or just for your own edification, you will not use it for long before you will need to use Platform Invoke. P/Invoke is incredibly useful for calling into Win32 dlls for features not natively available in .Net. I recently ran into this while creating an internal tool for my employer. While I have worked on three separate major projects using .Net, I think this little app is more widely used than anything else I’ve done up to date. The hardest part of P/.Invoke is to the format of the dllimport correct. This reminds me of the days of VB when you needed to call into a VC++ dll. Yucky but necessary. Hopefully someone will take the initiative to post many of the signatures for public use. I have heard that Adam Nathan’s book on COM Interop includes many of these and I found this (http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=f1dd70e4-c212-4a6f-bff7-c82e34c8836f) project on gotodotnet but much more could be done. Well the
More...

My first log entry
By host on 8/6/2003
This log is mean to satisfy the irreplaceable engineering tool that we all learned about in school: the logbook. This technical log is meant for me to look back on and see what I have learned. Hopefully you will find it useful as well and perhaps help guide me through the journey of software engineering. Many of the founding fathers of science and mathematics all kept logs of their findings and ideas. Leonardo da Vinci is one such scientist and artist. The fact that da Vinci was left handed and wrote from right to left inspired the title of my log. Some say this was for obscurity. Some say he was one of the fathers of cryptography. His drawings and logs left behind were amazing, including flying machines one of which greatly resembles a helicopter. Picasso said “Everything you can imagine is real.” While I’m not sure that this is completely true, we probably all own Discs of music that we spin to listen to just as H.G. Wells described in the “Time Machine.” We also daily depend on nuclea
More...

  Right To Left  
  Right To Left  
You must be logged in and have permission to create or edit a blog.
  Right To Left  
  Right To Left  
Copyright 2005 by Nantz Consulting & Software LLC