Holy Snikies – Emit jQuery with C#!!! October 29, 2009
Posted by ActiveEngine Sensei in .Net, ActiveEngine, C#, New Techniques.Tags: jQuery
add a comment
Brief but exciting and really cool.
There’s a new .Net solution called JSM that will take code like this:

and emit this:

Head over this nice presentation for further details, or read this gentleman’s post. This looks very cool. Question is whether you can use plug-ins as well.
Source code is here.
Food For Thought … December 8, 2007
Posted by ActiveEngine Sensei in .Net Development, ActiveEngine, C#, Mythology, Problem Solving.Tags: C#, elitism, Java, Kingdom of Nouns, OOP, paradigm
add a comment
This post by Stevey discusses Java but could be easily applied to C#. For any of you old-time procedural coders that the Alt.Net bullies like to kick around, here may lie some vindication:
ActiveEngine Sensei’s Mother Comes to Visit – Lessons in Design Patterns December 5, 2007
Posted by ActiveEngine Sensei in ActiveEngine, C#, Design Patterns, Mythology.Tags: ActiveEngine, C#, Decorator Pattern
add a comment
For Thanksgiving Sensei’s mother came to visit the dojo, but this time she brought a new addition to the family, her dog. This puppy is lovable enough, and like all puppies needs training, which Sensei felt compelled to provide. When Sally got out of line and starting biting, Sensei held her down gently but firmly around the collar bone. This is an old trick that Cesar the Dog Whisperer practices with the smaller dogs – firm, gentle and consistent.
After two times, Sally stopped nipping at Sensei. “Wow, that really works quickly”, Sensei’s mother says.
“It’s easy to do, here’s how, ” and he showed her. The next time Sally started nipping, Sensei’s mother repeated the maneuver many times and lo and behold, Sally learned to not bite.
There are some lessons to be learned here for those who wish to practice Agile, Test Driven Development and implement design patterns: you must learn good technique from good practitioners, then repeat, repeat, repeat while seeking feedback. There’s no short cut to internalizing execution, and certainly no short cut to understanding when and why to apply design patterns. This begs the question for senior team members when do you make design decisions and what justification can you convey to junior team members concerning your choices?
Sometimes this can be very easy. The decorator pattern is a great example, as the justification answers the question of “I have many variations to accommodate in a billing process, and do not want a proliferation of classes or difficult logic to support all the exceptions.” To make this connection between technical implementation with business requirements takes practice, and the articulation of the justifications is a great way to obtain fluency. Repetition and review and those key ingredients that help create a powerful ActiveEngine toolkit.
New Blood in Deadwood December 4, 2007
Posted by ActiveEngine Sensei in .Net, ActiveEngine, C#, Problem Solving.Tags: C#, dynamic loading, reflection
add a comment
Somehow this blog is taking on a real western theme, yet there are moments interspersed with Budo philosophy. Who knows, maybe we’ll even have Kung-fu. No jokes about Neo, so be warned.
Anyway, The Code Slinger has two great posts on some work he has been doing with dymanic object instantiation and MSIL. True to the philosophy of ActiveEngine, he is asking why 5 times and proving that his ideas work. Check out his posts:
Dynamic Object Instantiation Part I
Dynamic Object Instantiation Part II
Drive-by Specficiations – Part 1 November 16, 2007
Posted by ActiveEngine Sensei in .Net Development, ActiveEngine, Business Processes, C#, Problem Solving, TDD, Test Driven Development.Tags: Refactoring, Test Driven Development
3 comments
Here’s a concept that’s new for the business community. A team will produce a product that meets your goals, but must write programs to test your new program.
Why? That must be more inefficient since you’re doing twice the amount of work. Why can’t you just do what we listed on the specification we gave you? What about all that talk about necessary and sufficient?
Test Driven Development is often mis-understood, and that’s unfortunate as the business community can greatly benefit from this approach to developing software solutions. Yes, there is additional programming required, but think of this effort as validation of a contract, and that contract is the set of criteria that you have given the developers. By following the proscribed approach, the developer will have thought through each facet of the code that leads to the fulfillment of the specification. No other code is written other than that which will fulfill passing a test. This greatly focuses on what is necessary and sufficient as nothing should be concentrated beyond the boundaries of the set of tests. The test are like that piece of paper with stick figures Al and Wu used to communicate to each other.
It must be noted that an advantage here is that when changes are made later on, as they always will be, the tests can be repeated again and it can be quickly determined if the alterations have broken other facets of the program. Luckily the execution of these tests can be automated, for as you can imagine you quickly end up with lots of tests.
Only after all tests are passing then the developer can perform enhancements as the tests will gage whether or not the program still functions as specified. Most programmers forget this part, as the artisan within can often subdue pragmatism, and some, but not all developers, will continue to will continue to develop code that will be used for the future, yet will not have hit the targets of the original specification. The tests will help re-enforce the boundaries. Who? Wu? No who, Wu! No Wu? Right here on the paper you idiot!! Yes, you should really yell like that at the programmers!
Heres a set of criteria, the basis of our program:
Process an increase in commission of sales for each customer:
- For customers that have been with our product line UltraSlim for 5 years or less, increase by 4%. All other UltraSlim customers increase by 6%.
- For customers that have been with our product line UltraSmart for 3 years or less, increase by 2.5%. All other UltrSmart customers increase by 3.5%
- Do not apply a commission for those customers who have been with either product line since 3rd quarter of the current sales year (calendar year based).
Seems like a lot? Consider this, if this is the criteria and the means for communicating you quickly begin moving in concert and hit those sweet spots of productivity. You’ll find that you’ll discover contradictory criteria that you may have supplied, and you’ll both spot errors more quickly. That flow productivity and ideas will become your ActiveEngine for great software creation.
The next part in the series will discuss how these tests are validated, and will be technical in nature but of benefit to the business community, as when done properly they will communicate what the developers are doing with the code.
Surely you must be joking … November 16, 2007
Posted by ActiveEngine Sensei in .Net Development, ActiveEngine, C#, Problem Solving.Tags: ActiveEngine, bad software, C#, desktop support, SubinACL, Windows registry
add a comment
It takes all types of people to run a corporation, but only certain individuals can tap into the ActiveEngine and put things into overdrive. This post is not about a great new design pattern that solved a problem or fit neatly into a methodology. More time for that in another post.
This is about the onerous task of updating 200 desktop computers with a technology that barely passes for worst practices from 1997. Yep, ten years of garbage code and retarded customizations, compounded by bad design and awful practices, 10 servers to update and 200 desktops to uninstall the old version and update with next version, the operative word being next.
For those not of the techie world, this can be a technician’s nightmare. This complexity is increased when the software manufacturer pretends that they themselves have wisdom greater than the rest of software industry,shun standard practice, and create some unique yet “better” software update process. Processes that can not be controlled, that when followed would result in 200 computers updating automatically at once, and sentencing a corporate network to a speedy death.
Can you see the challenge? The task, create an update process that circumvents the software manufacturers, is automated with measurable outcomes, saves time, and executes successfully. The risk, if you fail the company can’t invoice or collect the next month end close. Oh, and by the way, the sales force uses a pseudo workflow engine based on this mess as well. Better not disappoint that bunch of patient delicate artisans.
A team of heroes was assembled, people who had the strength of will to overcome the repeated failures and obstacles that such a nightmare offered. A team that turned on the ActiveEngine and fought like hell. For the most part, automation of software processes could be accomplished easily enough, but for a software push to operate successfully presupposes that all target desktops are in a state to be updated, and this is where the nightmare truly began. Picture this:
- 43 desktop computers could not be connected to remotely, meaning that files could not be copied from a central source using automation. So updates had to be processed by a technician logging directly into the machine.
- 15 desktop computers continued to execute update processes that prevent the crucial update from completing successfully.
- 27 computes had corrupted Windows Registries, meaning that network administrator ids could not install new or remove old software, period. This could be repaired but the duration of this task took 10 -15 minutes. If the repair process failed the computer could be rendered useless.
This last issue was the deal breaker, as it indicated that a computer was no longer under control. Scary thought. You see, you wouldn’t find out that the Windows registry was corrupted until 2/3 of the install was completed. The figure above was ascertained after the entire set of 200 computers were updated. The prospect of failure heading into this mess was down right terrifying as what was not known could not be known.
Immediately diagnostics were performed on the registry. For non technical folks, this means that files containing more than 120,000 lines of code and security settings had to be examined. On a lucky break the starting point of the issue was ascertained, but this starting point was narrowed down to c. 20,000 lines. More comparisons to functioning registries were attempted, but the problem remained that comparisons were limited to eyeballing lines of registry keys. The support folks groaned, but offered their standard answer of “we’ll have to compare this manually”.
Unacceptable. That’s acquiescing, not thinking.
The heroes researched and found SubinACL, a tool that creates text file of all registry keys and ACL’s for those keys. The problem still existed that there was no way to compare text files from machine to machine. Not until the ActiveEngine kicked in and agile minds woke up, and a process to index the files – assign the same value for the same registry entry across all files – was created. Next, the files were imported into Access where the registry keys could be queried based on their ACL characteristics, eliminating any need for reading lines of registry dumps. 683 culprit lines were identified, 13 of these were unique. A text file with the new ACL’s was created and SubInACL was executed with this file to apply to the security settings for every machine. Yes, one day’s worth of programming eliminated weeks of work. The beauty of the brute force method was that if the settings were already correct, SubInACL would not apply the changes.
The code for this process will be discussed in a later post. It was a quick and dirty, actually really dirty, C# console app. Extensible enough to make quick changes and now subject to a re-write in hopes to create a flexible text file parser that will accept user defined fields that can be applied to the parsing process on the fly.

Subscribe to this Blog!