Having a little one to look after has shed some light into how we get the software in most shops today. This quote is quite good in how it relates to our educational systems:
"For the true significance of Disneyland is that it reflects our notions of children - what they are, what is good for them, and what will please them. Children are a special class of human beings which came into existence with the industrial revolution, at which time we began to invent a closed world for them, a nursery society, wherein their participation in adult life could be delayed increasingly - to keep them off the labor market. Children are, in fact, small adults who want to take part in the adult world as quickly as possible, and to learn by doing. But in the closed nursery society they are supposed to learn by pretending, for which insult to their feelings and intelligence they are propitiated with toys and hypnotized with baby talk. They are thus beguiled into the fantasy of that happy, carefree childhood with its long sunny days through which one may go on “playing” - in the peculiar sense of not working - for always and always." - Alan Watts
Monday, February 9, 2009
Friday, November 28, 2008
QCon's DDD Track Gets an Shot in the Arm
While I did not formally attend QCon, I was invited to a couple of presentations by Greg Young. I saw some familiar faces there like Martin Fowler, Matthew Podwysocki, Jeff Brown, Jeremy Miller, Rod Paddock and others.
Eric Evans was very happy to see the Domain Driven Design track get some scalability/performance issues addressed. Greg's (at first glance) militant emphasis on Command/Query separation gave a clear and simple answer to avoid scaling issues when concentrating on designing and refactoring to a strong core domain. One key point to take away was the fact that our applications usually have 10X more read operations than write. This distinction is usually haphazardly represented in most designs we see today - and why we have so much money to make helping organizations scale up.
The one point I got from Greg some time earlier this year was to look at the business that you are trying to automate with an IT-free mind. That is, how would this be done (or how was it done long ago) with no computers and, instead, paper, pencils and people? They key information that is gathered out of that is the SLAs. Does that sales report need to have up to the millisecond information?
Greg has a link on his blog to the same presentation. I feel this one was more polished and was made more pleasing to the eye by incorporating some of David Laribee's use of images in stead of words. I'm hoping that the videos to the presentations get published soon. InfoQ, from what I hear, likes to spread out the release of videos over time to keep the site flowing with new material on a consistent basis.
On Saturday, Eric was kind enough to meet up with a handful of us and talk about DDD and life in general. He also toured around with us for a little bit. We saw some great views of San Francisco and a bit of the ocean shore.
It was a San-Fran-tastic trip!
Eric Evans was very happy to see the Domain Driven Design track get some scalability/performance issues addressed. Greg's (at first glance) militant emphasis on Command/Query separation gave a clear and simple answer to avoid scaling issues when concentrating on designing and refactoring to a strong core domain. One key point to take away was the fact that our applications usually have 10X more read operations than write. This distinction is usually haphazardly represented in most designs we see today - and why we have so much money to make helping organizations scale up.
The one point I got from Greg some time earlier this year was to look at the business that you are trying to automate with an IT-free mind. That is, how would this be done (or how was it done long ago) with no computers and, instead, paper, pencils and people? They key information that is gathered out of that is the SLAs. Does that sales report need to have up to the millisecond information?
Greg has a link on his blog to the same presentation. I feel this one was more polished and was made more pleasing to the eye by incorporating some of David Laribee's use of images in stead of words. I'm hoping that the videos to the presentations get published soon. InfoQ, from what I hear, likes to spread out the release of videos over time to keep the site flowing with new material on a consistent basis.
On Saturday, Eric was kind enough to meet up with a handful of us and talk about DDD and life in general. He also toured around with us for a little bit. We saw some great views of San Francisco and a bit of the ocean shore.
It was a San-Fran-tastic trip!
Tuesday, September 16, 2008
GITting Around
I've been very busy for the last 3 months or so, but now can start to blog again.
A few things have changed. One of them is source control. GIT is working out really well. I highly recommend people drop SVN in favour of it. You can get an overview and tutorial from many places, so I won't bother repeating any of that. For folks developing in a windows environment, I can help a bit with some specific issues one might run into with the switch.
1. Upon installing MSysGIT, the AutoCRLF setting should be set to false before you do anything unless you are writing a multi-platform app. If you don't, you run into the danger of having your CRLFs changed to LFs in the repository. Then GIT will report file changes where there are none.
2. Stop all that typing (unless you want to strictly use the GUI via git gui):
git config --global alias.st status
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.br branch
git config --global alias.me merge
git config --global alias.cl clean
git config --global alias.ps push
git config --global alias.pl pull
git config --global alias.rt reset
git config --global alias.rb rebase
If you want to configure bash on your machine, you could make aliases at that level - such as gci for "git commit".
3. Unless your SVN repo followed a strick trunk, branch, tag structure, don't bother with the standard layout option for cloning SVN with git svn. This leads to more headaches in the end. It's a long running process, so get it right the first time. Use --follow-parent to track moves, copies and renames.
4. Get hosting. Unfuddle is great as a free host environment. Don't get scared about the 200MB limit on the repository. GIT is very efficient and will take 1/30th the space that a SVN repo took. Unfuddle will email you when there are commits. It parses commit messages as well, so you can close an issue (tracked in unfuddle) with something like "closes #435". A commit with that message will close issue 435 in unfuddle. For $9/month you can get more users, 500MB limit and file attachments. The file attachment is a waste. I use www.drop.io to host files.
5. Setup your remote branches so you can simply "git ps" and "git pl" to send commits and receive commits from the remote repo. If you have a remote repo for the remote team over in India, you could set up something like this in the .git/config file for an "india" branch:
[remote "india"]
url = git@mycompany.unfuddle.com:mycompany/outsourced.git
fetch = +refs/heads/india:refs/remotes/india/master
push = india:master
[branch "india"]
remote = india
merge = refs/heads/master
6. Read up on GIT. It's quite different from SVN.
A few things have changed. One of them is source control. GIT is working out really well. I highly recommend people drop SVN in favour of it. You can get an overview and tutorial from many places, so I won't bother repeating any of that. For folks developing in a windows environment, I can help a bit with some specific issues one might run into with the switch.
1. Upon installing MSysGIT, the AutoCRLF setting should be set to false before you do anything unless you are writing a multi-platform app. If you don't, you run into the danger of having your CRLFs changed to LFs in the repository. Then GIT will report file changes where there are none.
2. Stop all that typing (unless you want to strictly use the GUI via git gui):
git config --global alias.st status
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.br branch
git config --global alias.me merge
git config --global alias.cl clean
git config --global alias.ps push
git config --global alias.pl pull
git config --global alias.rt reset
git config --global alias.rb rebase
If you want to configure bash on your machine, you could make aliases at that level - such as gci for "git commit".
3. Unless your SVN repo followed a strick trunk, branch, tag structure, don't bother with the standard layout option for cloning SVN with git svn. This leads to more headaches in the end. It's a long running process, so get it right the first time. Use --follow-parent to track moves, copies and renames.
4. Get hosting. Unfuddle is great as a free host environment. Don't get scared about the 200MB limit on the repository. GIT is very efficient and will take 1/30th the space that a SVN repo took. Unfuddle will email you when there are commits. It parses commit messages as well, so you can close an issue (tracked in unfuddle) with something like "closes #435". A commit with that message will close issue 435 in unfuddle. For $9/month you can get more users, 500MB limit and file attachments. The file attachment is a waste. I use www.drop.io to host files.
5. Setup your remote branches so you can simply "git ps" and "git pl" to send commits and receive commits from the remote repo. If you have a remote repo for the remote team over in India, you could set up something like this in the .git/config file for an "india" branch:
[remote "india"]
url = git@mycompany.unfuddle.com:mycompany/outsourced.git
fetch = +refs/heads/india:refs/remotes/india/master
push = india:master
[branch "india"]
remote = india
merge = refs/heads/master
6. Read up on GIT. It's quite different from SVN.
Tuesday, August 19, 2008
Messaging Update
Seems more multithreading was the culprit.
with on thread one:
lock (dictionary) { dictionary.Add("bum", "a homeless person");}
and seven seconds later on another thread:
lock (dictionary) { if (dictionary.Contains("bum")) C.Out("defined"); }
... Contains returned false!
FTW??
... or was it IIS.
*** UPDATE Sept 16 ***
It was IIS. After adding tons of logging and tracking thread IDs, app domain IDs and process IDs, it was apparent that IIS would load up more than 1 either app domain or process for the app.
The long term solution was to house the app in a windows service that communicated over WCF. It was a quick refactor and opens the door for using WCF to push to clients. The new question is, does WCF hold threads? Or can you have 100,000 seldomly active clients for, say, a chat application?
with on thread one:
lock (dictionary) { dictionary.Add("bum", "a homeless person");}
and seven seconds later on another thread:
lock (dictionary) { if (dictionary.Contains("bum")) C.Out("defined"); }
... Contains returned false!
FTW??
... or was it IIS.
*** UPDATE Sept 16 ***
It was IIS. After adding tons of logging and tracking thread IDs, app domain IDs and process IDs, it was apparent that IIS would load up more than 1 either app domain or process for the app.
The long term solution was to house the app in a windows service that communicated over WCF. It was a quick refactor and opens the door for using WCF to push to clients. The new question is, does WCF hold threads? Or can you have 100,000 seldomly active clients for, say, a chat application?
Don't Give Up on Messaging
Today at work the dreaded words were uttered: "Well if it's not working by the end of the day lets just go for the pull every 1 second solution."
After implementing all of the long running processes to a pub/sub model, it was not pleasant to hear that. I wasn't going to just give up on that much energy poured into the current (and best) approach.
After adding tons of logging and hammering the server to see where the leaks sprung up, I cornered the culprit. If you are pulling from MSMQ ad nauseum, and you are in a multithreaded environment, you need to protect yourself from the thread unsafe methods "Send" and "Receive" on your MSMQ object - usually done by creating the MSMQ object for just long enough to do 1 operation.
The place where this was being done was not a multithreaded scenario, so I got rid of the creation and disposal of the MSMQ object between receives.
That did it.
The other lesson here is to be careful when you do have a multithreaded app pulling from MSMQ. You may see same messages go missing. I know there are other MSMQ features that guarantee delivery, etc, but I expect this integrity out-of-the-box.
After implementing all of the long running processes to a pub/sub model, it was not pleasant to hear that. I wasn't going to just give up on that much energy poured into the current (and best) approach.
After adding tons of logging and hammering the server to see where the leaks sprung up, I cornered the culprit. If you are pulling from MSMQ ad nauseum, and you are in a multithreaded environment, you need to protect yourself from the thread unsafe methods "Send" and "Receive" on your MSMQ object - usually done by creating the MSMQ object for just long enough to do 1 operation.
The place where this was being done was not a multithreaded scenario, so I got rid of the creation and disposal of the MSMQ object between receives.
That did it.
The other lesson here is to be careful when you do have a multithreaded app pulling from MSMQ. You may see same messages go missing. I know there are other MSMQ features that guarantee delivery, etc, but I expect this integrity out-of-the-box.
Sunday, August 17, 2008
Alt.NET Canada
Too bad I had to miss this due to work. Here is Greg Young's Domain Driven Design presentation:
Tuesday, August 12, 2008
Project Management and Command/Query Separation
Just like we have issues mixing command and query when writing software, we run into similar issues when it comes to project management.
Say you have a project manager that is very technical. You would think that you could do no better. But alas, you will have bottlenecked his potential by requiring him to service the "queries" he has to provide for management (such as status reports, etc).
In the opposite corner, you can have a non-technical PM giving "commands" to the developers without the proper knowledge of the consequences of his actions.
Even in the well balanced scenario, you can overload a PM with a week or more worth of "queries"... or ask for too much direction.
So, can you scale your PM? If the role is clearly defined and we have a separation of command and query, yes you can.
Thoughts?
Say you have a project manager that is very technical. You would think that you could do no better. But alas, you will have bottlenecked his potential by requiring him to service the "queries" he has to provide for management (such as status reports, etc).
In the opposite corner, you can have a non-technical PM giving "commands" to the developers without the proper knowledge of the consequences of his actions.
Even in the well balanced scenario, you can overload a PM with a week or more worth of "queries"... or ask for too much direction.
So, can you scale your PM? If the role is clearly defined and we have a separation of command and query, yes you can.
Thoughts?
Subscribe to:
Posts (Atom)
