About

Welcome to Allan's Ramblings!

Blogging about Technology and more.

Who am I?

Tag cloud

Archives

01 Mar - 31 Mar 2008
01 Apr - 30 Apr 2008
01 May - 31 May 2008
01 Jun - 30 Jun 2008
01 Aug - 31 Aug 2008
01 Sep - 30 Sep 2008
01 Oct - 31 Oct 2008
01 Nov - 30 Nov 2008
01 Feb - 28 Feb 2009
01 Mar - 31 Mar 2011
01 Jan - 31 Jan 2012

Calendar

« January 2012
S M T W T F S
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        

Links

The Active Network
Partners For Haiti
One Mile Clinic PNG

Search!

Last Comments

Allan Nienhuis (Cisco VPN for Win…): The Shrew.net client supp…
Allan Nienhuis (Cisco VPN for Win…): I updated the article wit…
Allan Nienhuis (Cisco VPN for Win…): I tried installing the sh…
allan (Javascript intell…): when MS ships Jquery with…

Stuff

Powered by Pivot - 1.40.5: 'Dreadwind' 
XML: RSS Feed 
XML: Atom Feed 

Dreamhost Trac misconfiguration

Friday 27 January 2012 at 2:10 pm Dreamhost is a great hosting company, and provides a lot of very nice 'one click installs' of common software packages.  I sometimes use Trac (http://trac.edgewall.org/) for managing hobby development projects, and the Dreamhost one click install worked great, except when it came to setting up authentication (requiring login). (more)

Comet or Long Loop message pattern

Saturday 26 March 2011 at 8:12 pm

A while back I posted a possible solution to dealing with long running processes in a web application. While that solution works for very basic processes, the use of threading in an asp.net application can be the cause of a lot of grief (there are just too many ways outside of your control for those threads to be aborted prematurely).

I did a little research and came up with a MUCH better solution - simply execute the ajax request for the long running process, and then listen for messages on another ajax request. The key to this working, however is to ensure that your long running process is a SESSIONLESS request, otherwise your request will block further ajax requests until it's completed.

(more)

Javascript videos

Sunday 20 March 2011 at 2:42 pm

If you are a web developer, you almost certainly need to program in Javascript.  If you need to program in Javascript, you need to watch this series of video presentations by Douglas Crockford.  

Hopefully most of you (web developers) know who Mr Crockford is, but for those that don't recognize his name: he works for Yahoo, and is a well known author and presenter on Javascript topics.  He is a member of the ECMAScript standards body and a general Javascript guru - developer of JSLint, the JSON spec and author of JavaScript: The Good Parts

These lectures were given to (some members of) the Yahoo development team.  The first lecture is a fascinating history of computing and language development which is really informative and sets up the other lectures (on Javascript) really well.  If you don't have the time for the first lecture you can dive in on the second one and get right into the language implementation details, but I really do recommend you start with the first video.  Each presentation is about 2hrs long, so make sure you've set aside enough time - it will be worth it!

I can't recommend this enough - if you're serious about your professional development as a web developer, Mr. Crockford's material is must-read and must-watch.


Long Running ASP.net Processes

Saturday 27 November 2010 at 09:33 am

The problem 

Sometimes, your web application needs to do something that takes a really long time - perhaps process a batch of files, backup or archive data, gather a bunch of data from external sources, or similar.  When dealing with this situation, you're faced with a few challenges:

  • browser and other timeout settings - web frameworks aren't designed to take more than a few seconds long to process a request and send back a response to the user.
  • user feedback - the user needs some sort of indication that the system is working as intended and not frozen or encountered an error.
  • user productivity - the user may want to do something else within your app while waiting for your process to finish.
I had to solve this problem myself a little while ago and thought I'd share my solution, which has a few concepts I did not find while searching for articles on the topic:
  • Status update in the form of a log or history of process rather than just a single %age complete number used in a progress bar
  • Providing parameters into the long running process, and
  • Getting access to the HTTPContext during the long running process.
(more)

Learning another language

Wednesday 07 October 2009 at 7:45 pm

I've been meaning to learn another programming language as a way of 'sharpening my tools', so to speak.  For years I've had my eye on LISP, but wasn't sure it would be worth my time, given the predominance of the MS .net stack, Java, javascript, and some of the new scripting languages - ruby, python, etc.  But I stumbled across a recommendation to watch a series of videos on LISP from MIT professors Hal Abelson and Gerald Jay Sussman.  They are freely posted here: http://www.archive.org/details/mit_ocw_sicp  Well I tried the first lecture, and while I chuckled at the dress and hairstyles of the early 80's, I was quickly hooked on the content.  I quickly realized that this wasn't just a course on LISP, but rather a great course on the really great concepts of computer programming.  I'm on the 3rd lecture so far, and having a blast.  This might be old-hat for some CS grads, but I'd still really recommend checking these out if you want to geek out on some advanced ideas.

Cisco VPN for Win7 x64

Sunday 09 August 2009 at 12:42 am

The Cisco VPN client won't run on 64bit versions of windows, and Cisco has no plans to ship a 64 bit client anytime soon.  In order to get VPN working on my shiny new Windows 7 x64 install, I tried to get the Cygwin/linux vpnc client working.  I ran into a number of problems, so this post explains how it can be done and hopefully will help you avoid the same problems I had.  I spent a lot of time researching information on the 'net, and wound up tweaking steps a bit and hacking scripts myself, but much of this is based on work by Li Zhao and Salty.

NOTE: update 22 Mar 2010 - The Shrew.net client supports Win7 now, and seems to work flawlessly. It’s a much better option if you don’t already have a need for Cygwin. 


To get Cisco VPN working on an x64 Windows 7, you need:

  • Cygwin - a wonderful set of tools to emulate a linux environment on windows
  • OpenVPN - to provide a virtual TAP network adapter
  • VPNC - the VPN Client
Here's how to do it: (more)

Speeding up the build – ditch the SSD and go for the RAM drive : Jeffrey Palermo (.com)

Wednesday 01 July 2009 at 06:41 am Speeding up the build – ditch the SSD and go for the RAM drive : Jeffrey Palermo (.com)

Thought I'd pass along props to Jeffrey Palermo for doing a great job on his post about using RAM drives to improve developer workstation performance - specifically running builds & unit tests.  He's done a lot of experimenting and has the data to back up his choices.  Definitely something to consider doing these days with RAM so cheap.

Kaban Development Oversimplified - putting limits on parts of your development cycle

Wednesday 27 May 2009 at 09:45 am

Jeff Patton has a great blog about Agile product development practices - mostly from the product/design perspective, but he's got some good project management information in there too.  He doesn't post very often, but his posts are real winners.

His latest article
is about Kanban Development - something that has been gaining traction and awareness in the Agile development community for the last year or two.  I won't expound much on it here, as Jeff does a much better job of it than I would - read his post!

 

Kanban development comes from Toyota's famously efficient and high quality product development & manufacturing teams - Kanban means literally visual card (or board), and is about the use of simple visual devices to control the flow of work through any system.

 

A common problem in software development is having too many unfinished work items on a person or team's plate at any one time.  This is usually a symptom of people not completely finishing the items before moving on to the next one, because they've run into some type of roadblock with their current item (need a question answered, waiting for the next build, or whatever).

 

The problem with this is that it increases the amount of context switching people have to - do by orders of magnitude in some cases.    The costs of context switching for people working in highly intellectual jobs like ours is very often grossly underestimated, because we're so used to multi-tasking and often our team culture often promotes it - people with a lot on their plate are looked up to as busy and productive, when they are really just spinning their wheels with lots of activity but little real progress.

 

A related problem is that this increases the 'cycle time' - the average amount of calendar time it takes for items to be completed, which increases the risk that items will become stale.  For example it is much more efficient for a developer to fix bugs on an item that they coded today or yesterday than even a few days later.

 

The use of Kanban concepts can help with these problems by putting simple rules or governors on your software development workflow to simply not allow too many work items in any one stage or spot.  For instance: you could have a rule to not allow more than x units of work in the Implementation (coding) state.  If a business analyst is finished with another requirement/story/use case, they're not allowed to send it to the development queue.  And if the size of work sitting in the design queue is already maxed out, they're not allowed to pick up another story and start working on that.  What should they do then?  Perhaps help the testers test some of the items in their queue.  Perhaps go talk with customers about the latest release, or do some usability/user experience testing.  Anything but drop more work on the developers.  The same would go for developers - if the test queue is 'full', they can't drop more coded features onto the test team.  They should go help the testers with their work items, help set up the performance testing lab, help troubleshoot the latest escalation from support.  They could even take a bit of time for professional development by doing some reading or experimenting.

 

Having people help with addressing the current bottlenecks for the team keeps the work flowing through the system at a more reliable rate, and reduces the amount of context switching going on because there simply won't be so many work items in play at any one time.  It also reduces the cycle time time for items in the system, which means that the work is fresher in people's mind so that things like bugfixing and any rework from feedback are done much more efficiently.

 

The more subtle benefit that this brings to the team is to bring the 'whole team together'.  It's no longer "someone else's problem" if they're overburdened.  It encourages teamwork and collaboration, and puts the focus on 'finished' to the end of the system (ready for production), rather than just finishing my tasks.

 

These rules could be put into place by simple declaration of policy (another email from the manager), or implementing some sort of rules in your task tracking system, but the use of very visual mechanisms like a story board can be very helpful in not only enforcing the rules, but making sense of them for the team - they can 'see' that the test team is overburdened, so the decision to go and help them out becomes a natural decision that doesn't require top-down direction.  Jeff's article above has some good examples of how story boards can be used for this.  For distributed teams, that story board may need to become a dashboard on your team's wiki, or you could experiment with tools like cardmeeting.com.

 

There are a number of variations on this theme that can also be useful - minimum size in certain queues, and maximum sizes for any one person.  Remember when experimenting with things like this to always do a retrospective with your team at the end of the iteration to get feedback and make decisions about improvements.

 

I know this is a pretty light treatment on the subject, but hopefully this has introduced the concept well enough that you're encouraged to do a bit more research on your own and dream about how this might help your team work together more efficiently.

 

Cheers,

 

Allan

Quality & Broken Windows

Tuesday 26 May 2009 at 08:38 am

The authors of the Pragmatic Programmer (great book btw, highly recommended) have a lot of insights into the craft of software development, but in my opinion one of the most powerful ideas is that "living with broken windows" drives quality downward in a depressing spiral of entropy.  Well, they put it a lot more eloquently than that, but the idea is that when you're working in a codebase that's littered with problems, bugs, sloppiness, etc, you and your team are much more likely to do sloppy work.  Your standards are lowered by the sheer weight of the code around you, in spite of your best intentions and even explicit attempts to do high-quality work.  This is a great argument for continued refactoring of existing code, even if that code is more or less functional.  It can affect the quality of new code just by its presence in the same codebase.  It's like a poison, or at least a bad smelling swamp gas...

I won't attempt to elaborate much more on the concept - this article explains it much better than I'm likely to.  Go ahead and use up some of your daily or weekly geek reading time on that article - it's time well spent.

What's your experience like?  Have trouble keeping high standards when working on crappy legacy code that someone-who's-no-longer-working-here-for-a-good-reason wrote?  Wish you could rewrite that whole module or function from scratch but just don't think you have the time?  Can't convince your Dev or Product manager to let you have the time to refactor that painful and buggy sub-system?  Or, have you been able to clean up parts of your codebase with positive results? Was it worth it? Do you think it really makes much of a difference?  Or, can you manage to keep your work up to all the awesome standards that you have in spite of the muck that you're wading around in?

What do YOU think?

P.S. Don't take this as suggesting that all of the legacy code is crap - it's not.  There's a lot of really great code out there, I know.  And you don't need to look only at 'legacy' code to find sloppiness either.  These are big generalizations, but I think they're useful ones that apply to much more than just code.

ELMAH - an Amazing asp.net error logging monitoring tool

Friday 24 April 2009 at 2:35 pm

I saw this referenced on Jeff Atwood's blog a little while ago and meant to pass it along to a few folks, and now I see that Scott Hanselman has just blogged about it as well. Scott's article is probably the best place to start. for more detailed information (I guess other than the project's site)

(more)