Click here to Skip to main content
15,888,351 members

Jon Person - Professional Profile



Summary

    Blog RSS
43,194
Author
294
Authority
283
Debator
25
Organiser
1,179
Participant
0
Editor
0
Enquirer
Hi there! From 2004 to 2009 I ran a company called "GeoFrameworks," publishing two components called GPS.NET and GIS.NET which helped developers quickly write location-based services. Now, I've released the source code for GPS.NET to CodePlex for you to use as you see fit.

GPS.NET 2.0 on CodePlex
GPS.NET 3.0 on CodePlex

... I've also released the source code of a library called the "GeoFramework," a collection of commonly used classes such as Latitude, Longitude, Distance, Speed, and Position:

GeoFramework 1.0 on CodePlex
GeoFramework 2.0 on CodePlex

I'm now taking a break from programming, but I really appreciate the positive feedback from readers!
31 Dec 2004 CodeProject MVP 2005

Groups

Below is the list of groups in which the member is participating

Unknown

GeoFrameworks is a privately-held software design and development firm in Denver, Colorado, specializing in the creation of software components for Microsoft's .NET platform. Our products help developers vastly reduce their development time, save money, and quickly become experts with GPS and GIS technologies.



This is a Organisation
This member has Administrator, Manager, Author, Member status in this group

1 members

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralBetter Living Through Immutable Objects Pin
Jon Person14-Feb-05 13:22
Jon Person14-Feb-05 13:22 
Hi, my name is Jon Person, and I'm addicted to writable properties.

After several years of programming, I had gotten into the habit of making properties writable. It made great sense on the surface -- if the value can be changed then make the property writable and call it easy-to-use. Recently, however, I needed to make use of multithreading more than ever before and I quickly ran into synchronization problems. After several days of re-engineering to solve these problems, however, I'm now convinced that developers should try to make their objects immutable whenever possible to avoid complicated threading issues.

Immutable objects are objects whose properties cannot be modified once the object is created. All property values are instead set via the object's constructors. This approach forbids any "Set" accessors on properties, yet it makes an object completely thread-safe because there are no values to synchronize between threads. Another advantage to immutable objects is that they become simpler than their mutable counterparts. Many times, a mutable object must recalculate other properties within itself to stay in check. The "Angle" class of GPS.NET was a great example of this -- when the "DecimalDegrees" property changed, a lot of code went into recalculating the "Hours," "Minutes," and "Seconds" properties. Immutable objects can shed a lot of this overhead.

I'm now of the opinion that classes should be immutable by design unless a few conditions exist:


  1. If the class contains several properties, making it immutable may not be a good idea since it would require constructors with a lot of parameters.
  2. If the class requires significant initialization or finalization, it would not be a good immutable object because these processes would occur frequently whenever a property had to change.
  3. If the class uses a significant amount of memory, like a huge array, making it immutable might add too much overhead.
  4. If the class must source events or provide virtual "OnChanged"-type delegates, it cannot be immutable.
  5. An object should be immutable only if it's properties' types are also immutable. If you can drill-down from your object and eventually a property somehow, the class will not be fully thread-safe! This is why it's best to make your base types immutable first, and build from there.


This looks like a lot to sacrifice, but in my opinion the end result was still worth the effort to gain verifiably thread-safe code for downstream developers. The events were the only painful thing to remove because I had been relying on some of these events to tell a collection that its contents had changed. This, too, however, turned out to be alright to deal with, though it required some extra "IndexOf" code to find the index of an object before replacing it. Additionally, the new immutable classes got rid of some issues with "GetHashCode." This method is supposed to return the same value throughout the lifetime of the class -- even if the class is mutable. The newly-immutable classes now behaved with this rule.

The re-engineering process for each class broke down into several steps:

  • Having NUnit tests to test property behavior.
  • The return types for each property were verified to be immutable.
  • "Set" accessors for the class were removed.
  • Code from "Set" accessors were moved into constructors.
  • Methods which modified the class had their return value changed to return a new instance of the class instead.
  • All events and "OnChanged"-like virtual methods were commented out Frown | :-(
  • NUnit tests were re-run


After a few days of re-engineering, the GPS.NET 2.0 library is now mostly thread-safe by design and easier to maintain, thanks to immutable objects.
GeneralSolving bad form validation with your own Parse method Pin
Jon Person14-Feb-05 13:20
Jon Person14-Feb-05 13:20 
GeneralRe: Solving bad form validation with your own Parse method Pin
jblewis2-May-05 8:57
jblewis2-May-05 8:57 
GeneralWhy the Equals Method Has Different Meanings in Value Types Versus Reference Types Pin
Jon Person14-Feb-05 13:19
Jon Person14-Feb-05 13:19 
GeneralWelcome! Pin
Jon Person14-Feb-05 13:19
Jon Person14-Feb-05 13:19 
QuestionRe: GIS article. Pin
Monomachus2-Nov-08 0:55
Monomachus2-Nov-08 0:55 
AnswerRe: GIS article. Pin
Jon Person6-Nov-08 9:42
Jon Person6-Nov-08 9:42 
GeneralRe: GIS article. Pin
Monomachus4-Dec-08 6:17
Monomachus4-Dec-08 6:17 
GeneralRe: GIS article. Pin
Shooker5610-Jun-10 9:15
Shooker5610-Jun-10 9:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.