Set lines to scroll on a laptop

I'm not sure if this just affects Gateway laptops or if all laptops are subject to this issue.  On a laptop even when the correct mouse drivers are installed you are not able to set all mouse properties.

One of the annoying ones is the "lines to scroll" for each mouse wheel rotation.  It defaults to a very annoying low amount of 1.  This is not very good at all.

To get around this you can use the TweakUI powertoy from Microsoft to change the lines per scroll.  Download the powertoy then open it, go to the Mouse branch then Wheel, make sure Use mouse wheel for scrolling is checked and then choose the Scroll by X lines at a time where X is the number of lines you want to scroll.

Comments [0]

Comments [0]

Language/Platform maturity

I've been thinking recently about a possible maturity index for languages/platforms.  I use Java and C# as my main development languages.  They are very similar in syntax and in function.  If you can do something in one language you can probably do it in the other.  The differences are usally a bit of "syntactic sugar."  The major difference is the maturity of the documentation and of the available "code in the wild" by which I mean demo, samples and full fledged open source libraries.  Java has this in spades.  C# and by association .NET have a lot of this and it is growing each day, however Java has a much bigger head start and a more-open source build-it-yourself mentality. 

Hence the point of this post.  VB was my first language.  I came in to it at version 6, obviously at the end of its life cycle.  However, VB was in its prime.  You could find books, magazines, samples and examples galor.  Programmers had explored every angle of VB, not only had they put on the rubber glove and explored its orifaces but they had opened it up and shined the light on its entrails.  VB was a mature, highly productive platform, which is something that Java is now and C# is definetaly becoming. 

This is not to put down C#.  On the contrary, when C# has the maturity that Java now enjoys it should be a true work of art.  I think that as the .NET platform enters into version 2 we should see C# hit its sweet spot.  The major thing I see holding it back is the lack of open-source (read FREE) software.  Obviously it is designed and publilshed by Microsoft for the intent of selling MS product.  I see promise in that most popular Java utility libraries (JUnit, JDoc, Log4J) have been ported to .NET.  I would like to see more enterprise applications out there.  An open source appserver and web server would be nice.  Some decent object pooling and threading libraries would help. 

I think these will come, its just a matter of maturity.

Comments [0]

The Prometheus Device

Pragmatic Labs is pleased to announce its second product offering tentatively code named "Prometheus"

Simply stated; Prometheus is a code generation tool for .NET applications.  However, Prometheus goes a step further then most generation tools.  Most code generation tools are tier specific, meaning that they target one tier of the application.  The most common example of this is the data access layer generator.  Generators of this type usually read a database schema and generate code for CRUD operations on the database

Prometheus is a step beyond the single tier generators.  Prometheus allows an application to be defined in a tier independent schema file using XML.  From this schema Prometheus generates the database creation script, stored procedures, the data access layer, the business logic layer and the user interface.  The reason this works is there are certain common patterns that emerge when building applications.  Harnessing the experience of developers and the distilled knowledge of design patterns, a rather full skeleton of an application can be generated very rapidly. 

 Prometheus allows for code extensibility with either inheritance or region directives.  No matter how good a code generator is there is still a need for manual coding to handle business logic and special case situations.  Prometheus seeks to coexist with manual code and provides a clear separation between generated and manual coding.

 Prometheus is currently scheduled for release in the fall of 2005.

 

Comments [0]

ASP.NET Object to Form binding

I found a way to “bind” objects to a web user control so that you don’t have to do this:

   Address a = new Address(….);

   This.txtLine1.Text = a.Line1;
   This.txtLine2.Text = a.Line2;

          
Instead you can just do this:
       

   UserControl.LoadData(a);

Then in the user control you have this:

   Public void LoadData(Address a) 
   {
      FormBinding.BindObjectToControls(a,this);
   }

You can also retrieve the fields once the user has made changes:
 
   FormBinding.BindControlstoObject(a,this);

 
It uses reflection.  It requires that the controls on the form be named the same as the properties of your object.  This actually makes the system very easy to read since your object properties, database fields, stored procedure variables and controls all have the same names. 
 
Here is the original source.

I’ve used this in two separate projects and it has worked very well.  If you combine it with code generation then you really realize some definite time savings with little (if any) performance penalty.  See the link for the article for more info.


Comments [0]

On Getters and Setters (Accessors and Mutators to the academic types)

In reference to this previous post, which was inspired by a java patterns book, Holub on Patterns: Learning Design Patterns by Looking at Code, I was again looking for the grail. 

Holub uses a builder pattern approach to avoid exposing each private field through a getter and setter.  This approach is interesting but it quickly becomes complicated in the implementation as a series of interfaces and implementations become necessary and this leaves the casual observer wondering if the getter/setter method might be much simpler to understand.

Holub's assertion is that accessors are used mostly for visual designer created UI's.  This may be true to a large extent but the alternative seems pretty convoluted.  Holub also argues that accessors are very procedural which may also be true and that object oriented progroms become procedural at the margins where they must communicate with procedural systems like UI and database access.  However, in the OO middle the program should be objects which consist of an almost service stack like service object which provides methods in which to accomplish tasks (isn't this procedural?).

Conclusion:  I have headed the warning of not to go crazy with accessors and mutators but the alternatives don't have a good smell. 

Comments [0]

Simple Tools are Sometimes (Oftentimes?) the Best

An article on OO design and CASE tools versus CRC cards and hand drawn diagrams.

I would have to agree that many times the tool causes such a disconnect from the model that it is more trouble then it is worth.  There is some fundamental mind-body link that causes the mind to be stimulated by drawing and writing. 

This is why the CRC cards, a white board and a digital camera are essentials for the SDK.

Comments [0]

The Pragmatic SDK

I am in the process of putting together my own SDK (Software Development Kit).  No this is not a 50 Meg download from my site but rather a portable software development toolbox that I can take on the road.
fLogViewer
Category Name URL
Text Editor

Crimson Editor

PSPad

Notepad++

Metapad

http://www.crimsoneditor.com/

www.pspad.com/

http://notepad-plus.sourceforge.net/uk/site.htm

http://www.liquidninja.com/metapad/

Source Control Subversion http://subversion.tigris.org/
Source Control Subversion Windows Shell Extension http://tortoisesvn.tigris.org/
Web Browser Firefox http://www.mozilla.org/products/firefox/
Design CRC Cards http://c2.com/cgi/wiki?CrcCard
Code Generation Code Smith http://www.ericjsmith.net/codesmith/
Archiving 7-Zip http://www.7-zip.org/
Various Excel http://office.microsoft.com/en-us/default.aspx
ftp/sftp FileZilla http://filezilla.sourceforge.net/
html/xml formatting HTML Tidy http://tidy.sourceforge.net/
Clipboard Manager CLCL http://www.nakka.com/soft/clcl/index_eng.html
Shortcut Manager

Winkey

QLiner Hotkeys

PC World

http://www.qliner.com/hotkeys/

Log File Viewer fLogViewer fLogViewer
Desktop Search Copernic http://www.copernic.com/en/products/desktop-search/

Comments [0]

Builder Pattern

Referring to a previous post, I have been looking at the ways a business object can be represented or accessed through various tiers.  Of the ways this may be done is using the builder pattern. 

The builder pattern leaves the the representation of an object open-ended meaning that an object can have many different representations.  However, we do not need to know all of the representation at the time of construction.  Additional representations of the object can be added later. 

I have seen this pattern used extensively in java and I am actively searching for examples in C#.  Java seems to be a very pattern rich language and often strikes me as an academic language.  More on this in another post.

Comments [0]

Should Objects Span Multiple Tiers

Should the code in an object span multiple tiers?  For example, should the object encapsulate the data persistence, the business logic and user interface layers?

Or should there be multiple objects to represent the object in each tier?

 

Comments [0]

About

[Insert Witty Saying Here]