Posts

The Blinkers often seen on Developers…

A good developer can be a real work horse. Old timers know that work horses typically have blinkers on them to prevent them from getting overwhelmed by distractions. A few developers can handle the distractions, many are either not interested or overwhelmed.   What are a few of the distractions? What may they not see? Developers are addicted to making something work, like a kid building with LEGOs. What they may not see are items like: Does it perform well? Often a comment like “it’s fast enough” indicates a blinker Does it scale well? Often a comment like “Just get faster/more hardware” indicates a blinker Is it secure? Often a comment like “Just needs to be correctly installed (installation is not my job)” indicates a blinker. An example: For a web application,  does it have it’s own named app pool? If not -- security risk. Is the identity that the app pool runs under, a built-in identity? If not, – security risk Is it maintain...

Handling Microsoft’s refactoring between Net3.5 and Net4.0

Image
I have a web server control library (the real stuff, not user controls) that I often include in web sites. While building a 4.0 site,  I encountered:   The type name 'MembershipUser' could not be found. This type has been forwarded to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.    Ah! Microsoft has done some refactoring in their class libraries. Wrong, the class libraries are the same, they just moved the dll that it is located in!  In Object Viewer, you will see: So all that needs to be done is add a reference to this DLL. I am not happy with how they did it --- it breaks normative conventions…. The DLL. “System.Web.ApplicationServices” does not contain a class called: System.Web.ApplicationServices. Second,  the two classes in it would be flagged as a misplacement in any respectable code review!   In terms of mai...

How sweet Parallel.For is!

Image
Currently one of my tasks is to determine the optimal fill-factor for SQL Server indexes. Going with the default 100% for some indexes leaves a big hole in the foot. The chart below illustrates how the performance deteriorates the longer the time between index defragmentation is (i.e. the higher growth percentage). As you can see, the curves are complex. If you go for a low Fill Factor (12.5%), you may have an index that is 8 times bigger (700% more time). If you pick a high percentage and do not defrag often, the performance will go off the chart because of fragmentation (and thus spindle movements – a major latency factor).   But I diverge, to produce the above charts I need to do a lot of calculations. My first cut was just doing a loop and it took forever. I’d recently attended a talk on .Net4 and it’s parallel features, so I did a little code modification as shown below. I created an IEnumerable (lList) of the values that would have gone into my for . I created an arr...

Nasty BIOS Setting that suggests a hosed machine…. but it’s not

Started the week fighting a biological bug that I acquired at my 40th high school reunion which cascaded into the topic of this post…   I restarted my Server 2008R2, it was running fine -- and on the reboot ended up staring at a “_” flashing on screen… nothing more…   “Oh dear, what could the trouble be…” Well, my boot drive is mirrored (hate rebuilding machines) so I went in to the BIOS to verify that the drives were fine, that I had SMART on, no missing drives (loose cables) etc… Everything was perfect.   Did three or four more reboots, nothing changed….  I decided to walk thru every single BIOS setting in case there was something odd…  After this it would be breaking down the machine and dropping each of the SATA drives into my eSata holder on another machine to verify the drive was intact [Although I did not do that, they would have all been perfect….].   Buried in the BIOS was a setting, Boot from USB was enabled. I turned this off, ...

Load Simulators for Web Applications

Image
For web applications that are expected to have significant load, best practices is to create load simulators. Load simulators are good for pro-active tuning of applications and verifying scalability. Additional benefit of load simulators includes the creation of sizing tables and estimates for the Total Cost of Ownership (TOC).  There is nothing like acquiring an enterprise license for $10K and discovering that it takes $200K of hardware to handle the load when you could have purchased a different product for $30K that only needed $30K of hardware.   A single load simulator is usually insufficient. Below is an image of a contemporary web application:     Since systems are layered with lower levels bottlenecking higher levels, the following load simulators should be created: Direct to Stored Procedures. This is usually the absolute speed limit for the system If a higher level bottlenecks, scalability can be increased by parallelism (i.e. N ...

Yet once more into the breech (of altered programming logic)

Once upon a time, long long ago, I wrote 8-bit programs in Tiny-C with absolute addressing being the only reality.  Then we had Borland Turbo-C with relative addresses and the joys of relative assembly jumps. Enter Windows and the joys of locking and unlocking memory blocks that you must allocated and manage yourself. Then came Visual Basic which evolved into .Net CLR and decreasing awareness of what is happening under the hood.   With VS2010 including F# and enhanced parallelism in .Net4, we actually have to go retro a bit – back to the world of having to understand the hardware. CPU speeds are no longer increasing – I have an old laptop from six+ years ago that ran at 3.2 GHz. This year I updated one of my machines off-the-shelf from Costco.com, an I7-920 with 4 cores and hyper-threading (8 CPUs appears in Task Manager) and 12 GB of DDR3 RAM. This week I ordered from Costco a Phenom II X6 (Yes – 6 REAL CORES) for one of my daughters.  This CPU will (according to Yo...

Are baby-boomers better learners/developers than Gen-X and Gen-Y?

Part of software development is learning. Part of learning is being corrected. I read this interesting article the other day, Young adults believe in the age of entitlement, claim researchers in the Telegraph. It reflects similar news pieces that I have seen on CBC’s National and PBS. “the 20-somethings of today have ‘an automatic, knee-jerk reaction to criticism,’ and just dismiss it.” It’s explains why I have seen solid advice ignored – the older generations would actually take it, or, enter into a discussion (or argument) about the basis of the advice.  Having a good discussion with supporting documentation is an excellent way to improve software quality – everyone learns.    The article also cites a separate study due to be published in the Journal of Management, “Generation Y care most about high salaries and lots of leisure time – two apparently incompatible goals” So we are talking about a generation of developers that expect a 35-40 work week ...