Shall we fall foul for toys? Have we not Hiren here?
Sometimes, when we enter a new technology, we make progress by imposing structure on the chaos in an almost autistic fashion. "Structured programming" enabled a generation of programmers to master challenges during the 1970s when in fact programming was advancing rapidly in such phenomenae as unix.
When I started with .Net objects I realized the difference between stateful and stateless to be key and also needed a coherent way to multithread and the result was the "methodology" found in Build Your Own .Net Language and Compiler.
I found, also, that it gave me a great deal of serenity to implement a "core" set of properties and methods consisting for the most part of ClassName, inspect, test, object2XML and Name.
For me, the ideal object was developed in this Classical methodology and like a tragedy by Racine, the object's development itself, although intense, needed to adhere to the Three Unities of time (developed in a continuous session) place (developed in a single folder of solution files) and of course action (developed with a single mission statement).
However, this high style and all this drama also gets in the way of new experiences.
Today, I needed a crummy little object that would encapsulate EITHER "no limit" OR "a limit >= 0".
In C this would have been a union of an int and bool consistently False, or worse, -1 would have "meant" no limit as it so often does.
Object design liberates us from having to map the non-numeric real world onto the integers like dull fellows and instead our representations can be pure logic, free of unnecessary mathematics and numerization for the sake of it. When sorting cards for the Registrar in 1971, I had an epiphany: the sorter did not "care" about numbers at all. It was sorting grades.
At the same time, I did not want to embark on the High Drama of my development methodology, involving as it would the creation of a Big Boxed Comment with an object reference manual, and the "core" methods. My good taste has probably been questioned by maintenance programmers as I have myself pronounced deep curses on many programmers in turn, but I have enough to adhere to ANOTHER principle, again derived from 17th-century French classicism as well as Salon painting of the French 19th century.
This was the felt need of artists like Racine, and the Salon painters, to address only Serious subjects.
In the 17th century it was in full force. All of Racine's dramas, as opposed to those of the more crowd-pleasing Moliere, are tragedies about people of high state and rank from the "high and palmy days of Rome", and Greece.
Indeed, Racine was even ashamed to write tragedies about Phedre and Britannicus for influenced by the severe French Catholic philosophy of Jansenism, Racine felt that Higher topics would be exclusively religious.
It is a mistake in programming to use a high and classical style for trivial goals and is reminiscent both of the ways in which the "mechanicals" of Shakespeare's Midsummer Night's Dream, and Ancient Pistol of his Histories, are funny when they strike classical poses, as in this scene between Pistol and two "hos":
PISTOL
I'll see her damned first; to Pluto's damned lake, by this hand, to the infernal deep, with Erebus and tortures vile also. Hold hook and line, say I. Down, down, dogs! down, faitors! Have we not Hiren here?
MISTRESS QUICKLY
Good Captain Peesel, be quiet; 'tis very late, i' faith: I beseek you now, aggravate your choler.
PISTOL
These be good humours, indeed! Shall pack-horses
And hollow pamper'd jades of Asia,
Which cannot go but thirty mile a-day,
Compare with Caesars, and with Cannibals,
And Trojan Greeks? nay, rather damn them with
King Cerberus; and let the welkin roar.
Shall we fall foul for toys?
MISTRESS QUICKLY
By my troth, captain, these are very bitter words.
Pistol is funny because he uses overelaborate speech to cheat hos in a ho house. Equally, a program which is written to an over-elaborate standard is amusing, or just annoying.
Of course, few programmers today make this mistake...perhaps for the same reason that the traditional English teacher's complaint of "over-elaborate writing" is seldom encountered in my own teaching experience, where the writing is simple to the point of incoherence. But I have been known to strike Ancient Pistol poses.
I was therefore delighted to remember that in .Net, a simple Structure can actually have state in the form of private variables and expose properties and methods. Declaring the oddly-shaped object as a lightweight (but not stateless) structure seemed an elegant solution.
A while ago, I speculated about the worth of a highly abstract set of objects because many things seemed in ordinary praxis to be, well, ordered pairs
Private Structure TYPorderedPair
Public objX As Object
Public objY As Object
Public Sub setOrderedPair(ByVal objNewX As Object, ByVal objNewY As Object)
objX = objNewX: objY = objNewY
End Sub
Public Overrides Function toString As String
Return "(" & object2String(objX) & "," & object2String(objY) & ")"
End Function
End Structure
[object2String is a method in the stateless utilities.dll shipped as part of the Apress software. It converts all .Net value objects and many reference objects to strings such that those strings can be displayed in common fonts.]
The problem is obvious. Object is overgeneral and too weak because in MOST cases x and y are numbers: yet Double as the type would not address the need, at times, to have an ordered pair of strings or even of two reference objects.
The long-term solution is of course generics in Whidbey.
But another problem is that the above probably needs to be Inherited. Most of us, and me some of the time, don't exist in the world of Bertrand Russell's Principia Mathematica, wherein sets, ordered pairs, and other faeryland creatures cavort. No, we live in the ordered pair of the real, comma, world.
Thus a partnership between two customers, some sort of cahoots, needs to be an object which is-an ordered pair.
You can do everything with delegation and you have to in VB-6 but reading Corey Haines' posts and, last year, my boss' C sharp code, I realize I need to Inherit more and Delegate less.
At the same time, I remain convinced of the utility of the Platonic abstractions. The problem is nobody pays me to write a truly killer diller Set object or else they give me a link to where they say it's been done, and I find some code I don't like.
I still want a book and a kit of really cool abstractions and I drafted a book about such a kit for O'Reilly. It's been canceled twice, once by O'Reilly (as a newbie author I didn't know the game well enough) and once by Addison-Wesley, who seem to be cutting back on VB offerings, plus I was late because of the Apress book. Today I am far too busy in China to present it again and it probably should be C sharp which would entail, for me, a couple of weeks getting completely up to speed in C sharp.
I know the book doesn't exist because the abstractions would be logical, and not mathematical, and would fully exploit threading. For example, I am as I have said working on an abstract class for traversing a tree AS WELL AS an array while emitting threads from a pool.
Programmers have been in my experience encouraged to be less grandiose in their ambitions, and I tried rilly hard to do this, in my patented passive-aggressive style, in the 1970s, only to miss the boat on micros, totally, while being Baxter Travenol's guru in MVS Cobol and quietly going bat shit. But I see in Kant where even the "shadowy notice of Fame" is as dust and nothing and at the end of the day, this stuff is just Fun.
Of course
Please send me the surface mail address. I have to replenish my own stock of my book copies on a trip back to the States next month (I work in China) and will mail your copy after Feb 24th.
I understand the price issue. I found Cormen's Algorithms, available only in hard copy in the States, in soft copy for 350.00 Hong Kong at Swyndon last month but now my China coworkers think I am rich, for this is about 400.00 yuan.I thought it was a steal, since in the States, Cormen is 75.00 USD whereas in Hong Kong I paid 50.00 USD.
But even in US terms I have always invested quite a lot of my income, proportionally, on tech books. In 1971 my girlfriend had to loan me money to eat because I was busy buying Knuth's volumes as they came out.
I got Cormen because I want to show my company that the best way to create valuable intellectual property is to develop new code, with proprietary enhancements, from public domain, best of breed algorithms!
Thank You So Much!
Hi,
Thank You So Much.....
i am so happy to hear from you, that too so soon ! i really am impressed by your promptness!
anyways ...... about your girlfriend giving you a loan ..... lol its is quite similar to my situation as i too many times go to have food at my girlfriends place ..... only coz i spent all my money to buy some computer device or a book .... lol !
anyways thats a matter of non-trivial importance..... but really .... i do want to thank you with all my heart and would like to express my gratitude in some way , maybe by sending you the first copy of the compiler that i would write after i am through with it :-)
my ground address is :
Gunish Rai Chawla
Flat no 1 & 2, Happy Ashiyana,
Idgah Hills,
Bhopal,
Madhya Pradesh ZIP CODE - 462001
INDIA.
Thanks Again!
Nemestay
Look for the book in the post next month since I have to get it from the States.
Nemestay salaam ne guan she no problem tovarish citoyen huzoor
Clappings !
hey nice try, i didnt know that you could make out hindi or urdu !
but i could only make out the words namastay,salaam and huzoor .... she , no problem were recognizable in english .....
the rest i couldent make out ..... coz they dont belong to my language set ..... :-) !
but .... hats of to yours multi lingual persona ! u keep on impressing me more and more each day ! .... need any help in hindi, urdu, punjabi,gujrati,marathi,bengali ...... ask me .... lol !
will wait !
With Lots of GRATITUDE !
Gunish


hi there,
hey there,
my name is Gunish , i am from India and a student in Final Semester B.E. and extensively working with computers and programing for the last 11 years.
This message is regarding a project that i am making ,
i have seen a lot of homeautomation stuff on the net and also corey is venturing out into making some, well i am making a generic device control language that can control various devices connected inside a location .... this control signal has to be streamed on WiFi ( 2.4 GHz WEP Enabled) ..... this is just the hardware part and
about the software ...... i am building a generic AI / Expert System That can translate senteces in Predicate Logic , into command sequences and so on .....
so basically i am working with two compilers ..... one is for the device control and other for the language .....
i have read books by aho,ulman ( AKA : The Red Dragon Book ) but couldent find much help as i want to port it to .NET
i have been trying to arrange money to buy ur book ( Build your own .NET Language and compiler) but your 50$ is 2500 Indian Rupees (i am from india) which is a lot of money for me, so i was wondering if you could send me a educational copy or a evaluation copy which i could use to make my dream project come true it would be very helpfull.
if not that it would be great just to hear any suggestions or comments on the project idea! ..... if interested i will be happy to send u a detailed discussion report on the project !
thanks,
Gunish Rai Chawla ( AKA : GRAC)