Nothin’ But .NET, or “How to justify ignoring your home life”

Just finished Jean-Paul Boodhoo’s Nothin’ But .NET course and everything you’ve heard about it is true. This was, I believe, the first course where I was paying rapt attention and still got lost. It was a fleeting moment but it was glorious! It was like the restaurant scene in The Meaning of Life where my brain is Mr. Creosote and JP is the Maitre d’ trying to cram one more wafer of knowledge into it.


There are at least a dozen blog potential posts scattered throughout the week but I’ll limit my own coverage to one since I believe Master Simser will probably cover the actual content better than I could. So I’ll let him deal with any confidentiality conflicts with JP and instead, I’ll post more personal highlights


Day One


JP covers factory methods, state-based vs. interaction-based tests, MbUnit vs. NUnit, guard clauses, and delegates. It’s 8:35am.


At 6pm, we lose a couple of people who favour family over brain-scrambling. JP is adamant that it’s cool but there’s rejection in his eyes and for the remaining three hours, he covers only thirty-six topics, down from his usual rate of fifty-nine per hour.


At the end of the day (a respectable 7:15ish), I decide that what JP really needs is a soundtrack. I vow to remedy this tomorrow.


Day Two


8:30AM – I initiate the course soundtrack with Also Sprach Zarathustra.


1:00PM – Afternoon musical inspiration: Kids In The Hall Theme


6:15PM –  I concede defeat and stop trying to keep up on my own laptop.


7:03PM – He invites me up to implement a test. I GOT TO TOUCH JP’S KEYBOARD! See entry for day five.


9:15PM – JP claims he’s raring to keep going but prefixes this statement with a half-hidden yawn. We let him off the hook…this time.


Day Three


Today’s musical selections: Feelin’ Groovy (take note of the opening lyrics), Delilah (by request), and Linus & Lucy


8:30AM – JP claims not to have gotten any sleep last night. Despite this, I switch from tea to a double double with a shot of espresso at Starbucks to try to get my brain vibrating on the same frequency. Also, Jolt. JP orders water.


11:00AM – We take a break while he rants about properties. Or methods or operators or something. Frankly, I’m just glad he’s distracted enough that I can catch up.


7:15PM - He laments that we’ve missed a couple of topics so he refactors the app we’re working on so quickly, we travel back in time a few hours so that we can get back on track.


2:35PM – Maintainability trumps all other abilities. It takes me a while to determine he is talking about code and not children.


6:45PM – At one point in my life, I was able to play Flight of the Bumblebee on the piano fairly respectably. I may as well have been playing chopsticks compared to what it takes to keep up on my laptop. Interestingly, Bumblebee is probably an accurate description of the colour of JP’s laptop.


8:15PM – It occurs to me that ReSharper has so many keyboard shortcuts, you could conceivably finish your application by mashing on your keyboard at random.


Day Four


Morning inspiration: He Ain’t Heavy (He’s My Brother) (by request)


9:30AM – We finish implementing the dependencies on the domain. JP claims, “Now we can *really* start moving”


1:00PM – He starts playing his own music to code to. *NOW* we’re talking. There is a minor quibble about the selection but they are quickly smacked down (oddly enough, with a ReSharper shortcut).


3:35PM – I thought the music would lull him a little but he actually appears to be speeding up. He no longer moves his hands to type. Instead his hands hover over the keyboard and the appropriate keys press themselves out of respect. Or, more likely, fear.


6:55PM – We settle in for a long night because JP claims he has to catch a flight tomorrow night at 7:30.


10:45PM – We wrap up and I check in with the missus back home in the Bahamas who accuses me of neglecting my daughter, cheating on her, and eating too much cholesterol-laden pizza. Take note, prospective students, Nothin’ But .NET is bad for the home life. Even if half your family is two countries away.


Day Five


 9:45AM – JP’s laptop has just undergone some minor emergency surgery for the last hour and a bit but steadfastly refuses to boot up. We hold a small service and JP performs a rousing rendition of The Rose with the rest of the class backing him up in five-part harmony. The Bumblebee is down and I volunteer my laptop as a surrogate for the day. It is promptly pimped out with “only the minimum [I'll] need to work effectively”. I’m left with 2Gb of hard drive space and much software that will expire in thirty days.


1:25PM – Now I get it! He’s pre-recorded everything he’s done and is playing back at four times the normal speed and only *pretending* to type. Don’t worry JP, you’re secret is safe with the Hillbilly.


5:30PM – “Oh yeah, I cancelled my flight tonight. Is everyone okay to stay a little longer?” I’m too scared to leave as every single thing he covers feels like my entire career depends on my knowing it.


9:00PM – I have to physically pry JP off my laptop. He breaks free of my grip but amid cries of “Stop him! Before he refactors again!” we manage to subdue him with a Bumblebee to the left temple.


I jest, of course (which I mention only because I’ve name-dropped JP so much that I’m afraid some humourless Googler will come hunting me down). The course was a delight as my dear grandpappy would say if he had all his teeth and could speak (and were still alive). Especially give my recent odyssey into self-improvement, career-wise at least. Having tried self-study for the last few months on many of the topics, it was great to have them explained in a structured, albeit rapid-fire manner and to have a context for the many patterns discussed as well as some nuggets about how some of them fare in the real-world. And there is absolutely no denying JP’s passion for what he does which in and of itself elevates this above many similar courses.


The hard part now is going to be reining myself in. Not since the three-day recap of the Hillbilly’s family tree has my brain been so abuzz with possible avenues of opportunity. It will be a case of holding a hammer and trying not to look at everything like it was a nail. We were hit with so much so fast, there is an overwhelming urge to apply as much as we can as soon as we can so the knowledge does come dripping out of our ears.


And in that respect, I’m planning to spend some quality time with the resulting code over the coming weeks, adding remaining functionality and refactoring existing stories. Perhaps integrating NHibernate or Windsor just to say I did.


But I’m not looking forward to all the cash I gotta start laying out when all this trial software expires….


Kyle the Supersaturated

  • http://www.igloocoder.com The Igloo Coder

    So on day three JP was going so fast that time shifted? I can’t think of anything else that would cause you to post an order of 830am, 11am, 715pm, 235pm, 645pm and 815pm. I just had a thought, but perhaps JP really is Q from Star Trek and he’s using his powers to make all of this happen……I’m going to have to go think about this over a scotch.

  • The Coding Hillbilly

    Re-read the entry for 7:15pm on that day.

  • Steven R

    I was trying to finalize all of the final details of my house with lawyers, mortgage brokers and builders when I took JP’s course. Probably wasn’t the best time to neglect the home life now that I look back on it.

  • Ayende Rahien

    Can’t you create a global ThreadLocal variable, set it in the beginning of the request and then read it from your calback?

    • http://kyle.baley.org Kyle Baley

      Yes, I probably could.

  • Anonymous

    If you have an audit field called dateModified, then you are doing it wrong. How can you audit something that you modify? That destroys the prior state, as well as the prior modification audit record.

    Any auditable system has to be append-only.

    • http://kyle.baley.org Kyle Baley

      I don’t know about that. Without knowing what we’re using the fields for, it’s kind of bold to assume we’re doing it wrong, yesno? I would think most people would look at dateModified and conclude that it means “date any fields other than the audit fields changed”.I could have called the fields “meta info we care about” but “audit fields” already brings up useful connotations that I didn’t want to have to explain.

      • Anonymous

        No more bold than ”
        IT’S BETTER THAN THE WAY YOU’RE DOING IT!” :)

        My point is that you capture only the date of the most recent modification. You don’t capture the history of changes to the entity. To me, “audit” implies that I can see the full history, hence the need for an append-only model.

        • Damien

          I agree – it’s fine to record “createdAt/By” and “deletedAt/By” because, *in those instances*, these are events that occur only once, and by a single user. But Modification is something that can/will occur multiple times.

          I had intended to post exactly this point, but found that Michael had already beaten me to it.

          • http://kyle.baley.org Kyle Baley

            Folks, when I said “IT’S BETTER THAN THE WAY YOU’RE DOING IT!” that was meant to inspire you to show me up by describing a better way of doing it, not discuss the semantics of the field names I used.

            “Audit fields” was clearly the wrong term to use. Please disregard it and substitute “stuff we care about”. Of the six fields, the dateModified is actually the one we use most often, primarily in administrative functions and reports.

    • Bediuzzaman

      The Sixth Word 

      In the Name of God, the Merciful, the Compassionate.

      Verily God has purchased from the believers their persons and their property that Paradise might be theirs.

      If you wish to understand how profitable a trade it is, and how honourable a rank, to sell one’s person and property to God, to be His slave and His soldier, then listen to the following comparison.

      Once a king entrusted each of two of his subjects with an estate, including all necessary workshops, machinery, horses, weapons and so forth. But since it was a tempestuous and war-ridden age, nothing enjoyed stability; it was destined either to disappear or to change. The king in his infinite mercy sent a most noble lieutenant to the two men and by means of a compassionate decree conveyed the following to them:

      “Sell me the property you now hold in trust, so that I may keep it for you. Let it not be destroyed for no purpose. After the wars are over, I will return it to you in a better condition than before. I will regard the trust as your property, and pay you a high price for it. As for the machinery and the tools in the workshop, they will be used in my name and at my workbench. But the price and the fee for their use shall be increased a thousandfold. You will receive all the profit that accrues. You are indigent and resourceless, and unable to provide the cost of these great tasks. So let me assume the provision of all expenses and equipment, and give you all the income and the profit. You shall keep it until the time of demobilization. So see the five ways in which you shall profit! Now if you do not sell me the property, you can see that no one is able to preserve what he possesses, and you too will lose what you now hold. It will go for nothing, and you will lose the high price I offer. The delicate and precious tools and scales, the precious metals waiting to be used, will also lose all value. You will have the trouble and concern of administering and preserving, but at the same time be punished for betraying your trust. So see the five ways in which you may lose! Moreover, if you sell the property to me, you become my soldier and act in my name. Instead of a common prisoner or irregular soldier, you will be the free lieutenant of an exalted monarch.”

      After they had listened to this gracious decree, the more intelligent of the two men said:

      “By all means, I am proud and happy to sell. I offer thanks a thousandfold.”

      But the other was arrogant, selfish and dissipated; his soul had become as proud as the Pharaoh. As if he was to stay eternally on that estate, he ignored the earthquakes and tumults of this world. He said:

      “No! Who is the king? I won’t sell my property, nor spoil my enjoyment.”

      After a short time, the first man reached so high a rank that everyone envied his state. He received the favour of the king, and lived happily in the king’s own palace. The other by contrast fell into such a state that everyone pitied him, but also said he deserved it. For as a result of his error, his happiness and property departed, and he suffered punishment and torment.

      O soul full of caprices! Look at the face of truth through the telescope of this parable. As for the king, he is the Monarch of Pre-Eternity and Post-Eternity, your Sustainer and Creator. The estates, machinery, tools and scales are your possessions while in life’s fold; your body, spirit and heart within those possessions, and your outward and inward senses such as the eye and the tongue, intelligence and imagination. As for the most noble lieutenant, it is the Noble Messenger of God; and the most wise decree is the Wise Qur’an, which describes the trade we are discussing in this verse:

      Verily God has purchased from the believers their persons and property that Paradise might be theirs.

      The surging field of battle is the tempestuous surface of the world, which ceaselessly changes, dissolves and reforms and causes every man to think:

      “Since everything will leave our hands, will perish and be lost, is there no way in which we can transform it into something eternal and preserve it?”

      While engaged in these thoughts, he suddenly hears the heavenly voice of the Qur’an saying:
      web http://www.nur.gen.tr  www.saidnur.com  www.nurpenceresi.com.tr http://www.fgulen.com.tr  www.herkul.org http://www.3dmekanlar.com  www.nurris.com http://www.bediuzzaman.net
      “Indeed there is, a beautiful and easy way which contains five profits within itself.”

      What is that way?

      To sell the trust received back to its true owner. Such a sale yields profit fivefold.

      The First Profit: Transient property becomes everlasting. For this waning life, when given to the Eternal and Self-Subsistent Lord of Glory and spent for His sake, will be transmuted into eternity. It will yield eternal fruits. The moments of one’s life will apparently vanish and rot like kernels and seeds. But then the flowers of blessedness and auspiciousness will open and bloom in the realm of eternity, and each will also present a luminous and reassuring aspect in the Intermediate Realm.

      The Second Profit: The high price of Paradise is given in exchange.

      The Third Profit: The value of each limb and each sense is increased a thousandfold. The intelligence is, for example, like a tool. If you do not sell it to God Almighty, but rather employ it for the sake of the soul, it will become an ill-omened, noxious and debilitating tool that will burden your weak person with all the sad sorrows of the past and the terrifying fears of the future; it will descend to the rank of an inauspicious and destructive tool. It is for this reason that a sinful man will frequently resort to drunkenness or frivolous pleasure in order to escape the vexations and injuries of his intelligence. But if you sell your intelligence to its True Owner and employ it on His behalf, then the intelligence will become like the key to a talisman, unlocking the infinite treasures of Compassion and the vaults of wisdom that creation contains.

      To take another example, the eye is one of the senses, a window through which the spirit looks out on this world. If you do not sell it to God Almighty, but rather employ it on behalf of the soul, by gazing upon a handful of transient, impermanent beauties and scenes, it will sink to the level of being a pander to lust and the concupiscent soul. But if you sell the eye to your All-Seeing Maker, and employ it on His behalf and within limits traced out by Him, then your eye will rise to the rank of a reader of the Great Book of Being, a witness to the miracles of Dominical art, a blessed bee sucking on the blossoms of Mercy in the garden of this globe.

      Yet another example is that of the tongue and the sense of taste. If you do not sell it to your Wise Creator, but employ it instead on behalf of the soul and for the sake of the stomach, it sinks and declines to the level of a gatekeeper at the stable of the stomach, a watchman at its factory. But if you sell it to the Generous Provider, the the sense of taste contained in the tongue will raise to the rank of a skilled overseer at the treasuries of Divine compassion, a grateful inspector in the kitchens of God’s eternal power.

      So look well, O intelligence! See the difference between a tool of destruction and the key to all being! And look carefully, O eye! See the difference between an abominable pander and the learned overseer of the Divine library! And taste well, O tongue! See the difference between a stable doorkeeper or a factory watchman and the superintendent of the treasury of God’s mercy!

      Compare all other tools and limbs to these, and then you will understand that in truth the believer acquires a nature worthy of Paradise and the unbeliever a nature conforming to Hell. The reason for each of them attaining his respective value is that the believer, by virtue of his faith, uses the trust of his Creator on His behalf and within the limits traced out by Him, whereas the unbeliever betrays the trust and employs it for the sake of the concupiscent soul.

      The Fourth Profit: Man is helpless and exposed to numerous misfortunes. He is indigent, and his needs are numerous. He is weak, and the burden of life is most heavy. If he does not rely on the Omnipotent One of Glory, place his trust in Him and confidently submit to Him, his conscience will always be troubled. Fruitless torments, pains and regrets will suffocate him and intoxicate him, or turn him into a beast.

      The Fifth Profit: Those who have experienced sapiental knowledge and had unveiled to them the true nature of things, the elect who have witnessed the truth, are all agreed that the exalted reward for all the worship and glorification of God performed by your members and instruments will be given to you at the time of greatest need, in the form of the fruits of Paradise.

      If you spurn this trade with its fivefold profit, in addition to being deprived of its profit, you will suffer fivefold loss.

      The First Loss: The property and offspring to which you are so attached, the soul and its caprice that you worship, the youth and life with which you are infatuated, all will vanish and be lost; your hands will be empty. But they will leave behind them sin and pain, fastened on your neck like a yoke.

      The Second Loss: You will suffer the penalty for betrayal of trust. For you will have wronged your own self by using the most precious tools on the most worthless objects.www.nur.gen.tr  www.saidnur.com  www.nurpenceresi.com.tr http://www.fgulen.com.tr  www.herkul.org http://www.3dmekanlar.com  www.nurris.com http://www.bediuzzaman.net

      The Third Loss: By casting down all the precious faculties of man to a level much inferior to the animals, you will have insulted and transgressed against God’s wisdom.

      The Fourth Loss: In your weakness and poverty, you will have placed the heavy burden of life on your weak shoulders, and will constantly groan and lament beneath the blows of transience and separation.

      The Fifth Loss: You will have clothed in an ugly form, fit to open the gates of Hell in front of you, the fair gifts of the Compassionate One such as the intelligence, the heart, the eye and the tongue, given to you to make preparation for the foundations of everlasting life and eternal happiness in the hereafter.

      Now is it so difficult to sell the trust? Is it so burdensome that many people shun the transaction? By no means! It is not in the least burdensome. For the limits of the permissible are broad, and are quite adequate for man’s desire; there is no need to trespass on the forbidden. The duties imposed by God are light and few in number. To be the slave and soldier of God is an indescribably pleasurable honour. One’s duty is simply to act and embark on all things in God’s name, like a soldier; to take and to give on God’s behalf; to move and be still in accordance with His permission and law. If one falls short, then one should seek His forgiveness, say:

      “O Lord! Forgive our faults, and accept us as Your slaves. Make us sure holders of Your trust until the time comes when it is taken from us. Amen!”, and make petition unto Him.www.nur.gen.tr  www.saidnur.com  www.nurpenceresi.com.tr http://www.fgulen.com.tr  www.herkul.org http://www.3dmekanlar.com  www.nurris.com http://www.bediuzzaman.netThe Second Word

      In the Name of God, the Merciful, the Compassionate.

      Those who believe in the Unseen. 1

      If you want to understand what great happiness and bounty, what great pleasure and ease is to be found in belief in God, listen to this story which is in the form of a comparison:

      One time, two men went on a journey for both pleasure and business. One set off in a selfish, inauspicious direction; the other on a godly, propitious way.

      Since the selfish man was both conceited, self-centred, and pessimistic, he ended up in what seemed to him to be a most wicked country due to his pessimism. He looked around and everywhere saw the powerless and the unfortunate lamenting in the grasp and at the destruction of fearsome bullying tyrants. He saw the same grievous, painful situation in all the places he travelled. The whole country took on the form of a house of mourning. Apart from becoming drunk, he could find no way of not noticing this grievous and sombre situation. For everyone seemed to him to be an enemy and foreign. And all around he saw horrible corpses and despairing, weeping orphans. His conscience was in a state of torment.

      The other man was godly, devout, fair-minded, and with fine morals so that the country he came to was most excellent in his view. This good man saw universal rejoicing in the land he had entered. Everywhere was a joyful festival, a place for the remembrance of God overflowing with rapture and happiness; everyone seemed to him a friend and relation. Throughout the country he saw the festive celebrations of a general discharge from duties accompanied by cries of good wishes and thanks. And he also heard the sound of a drum and band for the enlistment of soldiers with happy calls of “God is Most Great!” and “There is no god but God!” Rather than being grieved at the suffering of both himself and all the people like the first miserable man, this fortunate man was pleased and happy at both his own joy and that of all the inhabitants. Furthermore, he was able to do some profitable trade. He offered thanks to God.

      After some while he returned and came across the other man. He understood his condition, and said to him: “You were out of your mind. The ugliness inside you must have been reflected on the outer world so that you imagined laughter to be weeping, and the discharge from duties to be sack and pillage. Come to your senses and purify your heart so that this calamitous veil is raised from your eyes and you can see the truth. For the country of an utterly just, compassionate, beneficent, powerful, order-loving, and kind king could not be in the way you imagined, nor could a country which demonstrated this number of clear signs of progress and achievement.” The unhappy man later came to his senses and repented. He said, “Yes, I was crazy through drink. May God be pleased with you, you have saved me from a hellish state.”

      O my soul! Know that the first man represents an unbeliever, or someone depraved and heedless. In his view the world is a house of universal mourning. All living creature are orphans weeping at the blows of death and separation. Man and the animals are alone and without ties being ripped apart by the talons of the appointed hour. Mighty beings like the mountains and oceans are like horrendous, lifeless corpses. Many grievous, crushing, terrifying delusions like these arise from his unbelief and misguidance, and torment him.

      As for the other man, he is a believer. He recognizes and affirms Almighty God. In his view this world is an abode where the Name of the All-Merciful One is constantly recited, a place of instruction for man and the animals, and a field of examination for man and jinn. All animal and human deaths are a demobilization. Those who have completed their duties of life depart from this transient world for another, happy and trouble-free, world so that place may be made for new officials to come and work. The birth of all animals and humans forms their enlistment into the army, their being taken under arms, and the start of their duties. Each living being is a joyful regular soldier, an honest, contented official. And all voices, either glorification of God and the recitation of His Names at the outset of their duties, and the thanks and rejoicing at their ceasing work, or the songs arising from their joy at working. In the view of the believer, all beings are the friendly servants, amicable officials, and agreeable books of his Most Generous Lord and All-Compassionate Owner. Very many more subtle, exalted, pleasurable, and sweet truths like these become manifest and appear from his belief.

      That is to say, belief in God bears the seed of what is in effect a Tuba Tree of Paradise, while unbelief conceals the seed of a Zakkum Tree of Hell.

      That means that safety and security are only to be found in Islam and belief. In which case, we should continually say, “Praise be to God for the religion of Islam and perfect belief.”

      * * *www.nur.gen.tr  www.saidnur.com  www.nurpenceresi.com.tr http://www.fgulen.com.tr  www.herkul.org http://www.3dmekanlar.com  www.nurris.com http://www.bediuzzaman.net

  • Wilmer Comeaux

    I have always tried to approach auditing and logging as a cross-cutting-concern that is attachable/detachable via configuration. My business process usually doesn’t care who updated an entity, or when. But, somesone will always need a report that shows the information. As Michael said, append-only is the only way to get a true log or audit of what has happened. And there are plenty of good ways to accomplish that and not have your repository or entities even know it is happening.
    I’ve been using frameworks like Spring for years to handle this – it is one of the textbook examples of a cross-cutting concern, even if your business process makes use of the audit-information.

    Also, as noted by Michael, if your entities have dateModified, modifiedBy, etc then there are better ways. I won’t say you are “doing it wrong” because, occassionally there may be a good reason for doing it. :) However, I have always found a more generic audit system is far more useful. I don’t often want to know who all has “updated a person”. What I find more valuable is knowing, “what was happening in the system when this person was updated”. A general auditing system will, however, provide both.

    Plus, you never have to write it more than once. :)