About

I am a software developer in Seattle, building a new AI software company.

Ads

August 2009

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
30 31          

Ads


« Scalability | Main | Perils of Blogging »

August 22, 2007

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8345242f069e200e54ecddb468833

Listed below are links to weblogs that reference Source Code:

Comments

NoiseEHC

I have been thinking for a long time to ask for some source code but never dared since probably you have much more important things to do.
What I am interested in is that you had an article about turning an imperative GUI to a functional one. You mentioned several transformations you did to your code. I would like to see some before/after code snippets to see what are the most difficult problems, how to solve them in an optimal way, and how to solve them in a fast way.
In fact I would appreciate some more Practical Functional Programming articles (part 1 to part 24 :) but probably just dumping your code would take less time...
Thanks!

dru

I am looking forward to see your functional code in .Net!

-d

Simon Johnson

In a way, I wish NStatic was open source. Perhaps not GPL but some sort Microsoft-esc shared source license.

I strongly suspect that I could learn a great deal from looking at the source code of a developer such as you. I get the impression that a lot of people who are reading about NStatic are thinking the same thing.

A question for you, I presume you have run NStatic on your NStatic source code? Has the process of building NStatic pointed out problems in your programing style that were not obvious before hand? If so, could you share what these are?

The reason I am so interested in NStatic is because it might show me how to think more "tightly". Has this been your experience of the product as you've developed it?

Simon.

damien morton

Also looking forward to seeing some of your code.

Wes

Certainly, if I wasn't able to sell my software for legal reasons or such, I would open source it.

I'll progressively share more of my code over time, and if possibly license some of my AI libraries if I remain commercial.

Wes

Is my code tight?

I think so,

- few redundancies
- extensive reuse
- small code base
- very few classes
- lots of closures
- heavy reliance on functional programming
- heavy reliance on code as data and declarative programming

Patrick Smacchia

What do you mean by?
- very few classes

that you use structure or that most of your state are enclosed in closures?

I also use a lot of closures by the mean of C#2 anonymous methods but once I'll migrate my code to C#3 most of them will suit better with lambda expression.

Closures and a more functional way of programming eliminate the need for creating new objects.

A lot of objects are truly unnecessary and serve as accidental helper functions. Think of Steve Yegge's Noun-Verb post in http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html.

These accidental classes are identified by compound names with verb-like suffixes like Facilitator, Factor, Procurer, etc...

Some classes in my code become the hidden compiler-generated display classes for captured locals in closures.

Other classes were necessitated by the presence of state and side-effects. These disappear as well.

Greg

Interesting. I've also written a persitent ArrayList / HashTable implementation in C#. Performance was the biggest hurdle. Two issues were overcome - serialization / deserialization and file seek speed.

What challenges did you face / overcome in implementing it?

I am using a different meaning of persistence here: Multi-versioned data structure rathers than serialization.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment