Total Pageviews

Tuesday, June 7, 2011

17 Tips To Double Your Productivity In 14 Days

17 Tips To Double Your Productivity In 14 Days

1. Turn off all technology for 60 minutes a day and focus on doing your most important work.

2. Work in 90 minute cycles (tons of science is now confirming that this is the optimal work to rest ratio).

3. Start your day with at least 30 minutes of exercise.

4. Don’t check your email first thing in the morning.

5. Turn all your electronic notifications off.

6. Take one day a week as a complete recovery day, to refuel and regenerate (that means no email, no phone calls and zero work). You need full recovery one day a week otherwise you’ll start depleting your capabilities.

7. The data says workers are interrupted every 11 minutes. Distractions destroy productivity. Learn to protect your time and say no to interruptions.

8. Schedule every day of your week every Sunday morning. A plan relieves you of the torment of choice (said novelist Saul Bellow). It restores focus and provides energy.

9. Work in blocks of time. Creative geniuses all had 2 things in common: when they worked they were fully engaged and when they worked, they worked with this deep concentration for long periods of time. Rare in this world of entrepreneurs who can’t sit still.

10. Drink a liter of water early every morning. We wake up dehydrated. The most precious asset of an entrepreneur isn’t time – it’s energy. Water restores it.

11. Don’t answer your phone every time it rings.

12. Invest in your professional development so you bring more value to the hours you work.

13. Avoid gossip and time vampires.

14. Touch paper just once.

15. Keep a “Stop Doing List”.

16. Get up at 5 am.

17. Have meetings standing up.

Stay Productive and Make Your Work Matter!

Kindest regards,

Robin Sharma

P.S. If you really want to dive deep into how the best in business translate their big ideas into fast results (while they actually have a lot more fun), you really have to scoop up one of the few tickets left for The Remarkable Entrepreneur™ SuperConference in June. Don’t miss this game-changing event. Details here:
http://www.theremarkableentrepreneur.com

P.P.S. Watch this video on “The 11 Obsessions of Remarkable Entrepreneurs

Wednesday, May 11, 2011

The Architecture Journal - We Don't Need No Architects - The role of an architect in software development

We Don't Need No Architects

The Architecture Journal

by Joseph Hofstader

Contents

Introduction
Who Are Those Guys?
Problem Space
Solution Space
Don't Build "The Homer"
To Make a Short Story Long...
Resources

Introduction

The role of an architect in software development has comeunder attack of late. On software projects, the title Architect is oftenambiguously defined and the value provided by architects is not easily quantifiable.The perception that architects live in an "ivory tower" disassociated from therealities of delivering a software solution contributes to some of theanimosity toward those of us with the title.

This article presents a defense of the practice ofarchitecture in software development. It defines the qualities of an effectivearchitect and describes the skills required to succeed in this profession. Thearticle examines widely held perceptions of architects and some of the mistakesthat architects make which contribute to negative perceptions. Ultimately, theintent is to show the value good architects bring to a software developmenteffort.

Who Are Those Guys?

In the field of information technology, no title conjures upmore raw emotion than Architect. I have witnessed and been involved in manydebates over the definition of the term. When I introduce myself at meetings,reactions range from "we're not worthy" to "we do not need an architect"—theformer, although friendly, reflecting the lofty image of architects, and thelatter implying that an architect's knowledge and skills are irrelevant. Bothresponses demonstrate a lack of understanding of what architects really do.

At the OOPSLA conference in 2005, I attended a "Birds of aFeather" (BOF) hosted by Grady Booch. The topic ofthe BOF was his then upcoming "Handbook of Software Architecture." One of theattendees related some negative experiences he had had with architects, both inIT and in construction. One story was about the architect who drew plans forhis house expansion. The attendee said that he viewed the drawings withengineering software and the plans were off by a few feet, and that the actualconstruction could not and did not follow the architect's specification. He wasmaking the point, which I have heard echoed by many qualified individuals, thatarchitects are detached from the reality of delivering tangible results andthat their responsibilities should be relegated to the engineers and builderswho are fully engaged in product development.

That meeting, and many subsequent conversations with others,led me to wonder what exactly the role of an architect is on a software productand what the characteristics of good architects are. The most concisedefinition I have come up with is: The role of the IT architect is to solvea problem by defining a system that can be implemented using technology. Goodarchitects define systems by applying abstract knowledge and proven methods toa set of technologies with the goal of creating an extendible and maintainablesolution.

From this concise definition, we can extrapolate that good architects draw upon a foundation of knowledge to besuccessful in their role. To "solve a problem," the architect must have a goodunderstanding of the problem domain. To "define a system using technology,"implies that the architect has technical acumen. "Abstract knowledge" requiresthe architect to be able to conceptualize the technical solution. "Provenmethods" assumes an understanding of the patterns used to solve similarproblems. Figure 1 depicts the key skills of an architect.

 

Cc505974.jour15_WeDontNeed_Fig01(en-us,MSDN.10).jpg

Figure 1. The key skillsof an architect

 

The key benefit an architect brings to a project is theability to apply those skills in the definition and development of a robustsoftware solution. An effective architect is part of the continuum of allphases of a software development project, with skills critical to defining theproblem space, such as domain knowledge and the ability to conceptualize asoftware solution, as well as the ability to define the solution space usingappropriate technologies and patterns. The risk of not having an architectactively involved in product development increases the likelihood that theproduct will take too long to develop or be developed incorrectly. Figure 2illustrates the phases of a development project where the skills of anarchitect are applied.

 

Cc505974.jour15_WeDontNeed_Fig02(en-us,MSDN.10).jpg

Figure 2. Architectskills in phases of software development

 

Describing the architectural skills required for asuccessful project is not as straightforward as it may seem. Many areas,especially technical acumen and patterns, are often debated regarding the levelof expertise necessary for an architect. The following sections, divided byproblem space and solution space, offer an explanation of each of these skillsets and a rationalization of how these skills make an architect invaluable toa software development effort.

Problem Space

Defining the problem space and ultimately setting the scopeof a software solution requires an understanding of what will be built, as wellas domain knowledge and a conceptualization of how information will flowthrough the solution. As the following sections detail, these skills areessential to understanding the purpose of a software solution and communicatingthe proposed solution to all stakeholders.

Domain Knowledge

The problem domain for a software solution can be horizontalor vertical. A horizontal domain is applicable across industries, like workflowautomation. Vertical domains are specific to a particular industry, liketelecommunications. Problem domains can be further decomposed into subdomains, or aggregated into larger domains. An exampleof a subdomain within a vertical domain is networkactivation in telecommunications. An example of the aggregation of a subdomain into a larger horizontal domain is workflow in anenterprise application integration product.

There are many standards organizations and vertical industrygroups that specify standards and protocols that need to be considered whendefining a software solution. These organizations can be specific to a verticalindustry domain or a horizontal industry domain. The TMForumis an example of a vertical organization that specifies management protocolsfor the telecommunications industry. The W3C specifies standards for thehorizontal World Wide Web domain including technologies like Web services.

The value of domain knowledge is sometimes underestimated byIT managers. I once worked for a telecommunications company whose IT leadershipwanted to change the organization from being structured around "centers ofexcellence" focused on a business domain to being structured with "pools" ofresources based on technical skills without regard to domain knowledge. Forsome of the resources assigned to horizontal domains, like Web development,this model worked well. Many products require Web interfaces and the skillswere applicable across verticals. Where the "resource pool" structure failedwas in industry specific subverticals, like networkactivation. Understanding how to provision and activate services requiresdetailed knowledge of the provisioning process as well as the interfaces,protocols and standards of all network devices that comprise thetelecommunications services.

Deep domain knowledge often involves a steep learning curve.If the staff on every project is required to learn the intricacies of thedomain for every release of the project, productivity is significantly reduced.Assuming features are sufficiently decomposed so that the amount of time todeliver the feature is constant, then productivity suffers proportional to theamount of time spent acquiring domain knowledge. Conversely, maintaining a"center of excellence" around each vertical domain supported by a business canalso be an expensive proposition. Development work is seldom evenly balancedthroughout a given timeframe and keeping a fixed number of resources assignedto a project that is not actively engaged in delivering solution features candrain productivity on other development efforts.

A balance that is common in technology companies is having anarchitect be a domain expert and a pool of resources available to differentprojects. This strategy increases productivity by minimizing the amount of timeobtaining domain knowledge within a vertical. It also allows some preliminaryresearch to be done prior to engaging development staff, helping to ensure thatthe development is consistently productive. This approach provides the companythe added benefit of a flexible staffing model, in that development staff canbe augmented with contractors without having valuable domain knowledge walk outthe door at the end of the contract.

Conceptual Thinking

One of the main responsibilities of an architect is tocommunicate the solution to technical and nontechnical stakeholders. Theability to conceptualize a software solution is essential to communicating asoftware solution to stakeholders who care about delivery of functionalrequirements, and may not know or care about technical details. Defining aconceptual architecture prior to commencing the development of a softwaresolution helps facilitate the feedback loop needed to define the scope of aproduct and can help determine an initial level of effort and cost estimate fora product.

A conceptual model is the artifact most associated withsoftware architecture. The conceptual model typically shows the components of asoftware system that will fulfill the functional requirements and where theyapply in a software solution (user interface, domain layer, and so forth). Theconceptual model is often accompanied by a number of diagrams showing the flowof information through the proposed solution. In the case where the softwaresystem consists of components from other products or solutions, the conceptualarchitecture often contains the protocols that will be used to access differentparts of the solution.

Applying the correct level of granularity is the mainchallenge in defining the conceptual model. The conceptual architecture shouldnot contain any references to a particular platform or technology, other thanprotocols used to access subsystems. I once took over as architect of a projectthat was stalled in "analysis paralysis" for over a year. As I was reviewingdocuments to get up to speed, I noticed that the conceptual architectureconsisted of a number of boxes containing the names of technologies with noreference to system functionality. After reviewing that document I understoodwhy the system could not be developed: There was no mention of the requiredfeatures, making it hard to understand what needed to be developed.

Solution Space

It is in the area of defining the solution space thatopposition to architecture is most obvious. Developers will usually accept thearchitect working in the problem space, but may be resistant to having thearchitect define the solution space. In many instances, developers have validarguments about architects meddling in the solution space, especially if thearchitects have not kept their technical knowledge up-to-date.

A colleague of mine illustrates the attitudes developers havetoward architects when he says "architects talk in bubbles and developers talkin code" (see Figure 3). The idea that code is the only artifact that matters in asoftware development project is so prevalent that it is one of the valueslisted in the Agile Manifesto: "We have come to value […] working software overcomprehensive documentation." A good architect understands that code isundeniably the most critical part of a software solution, and many of themodern development environments now produce code from "bubbles," includingtools that support Model Driven Architecture (MDA) and Domain SpecificLanguages (DSL).

 

Cc505974.jour15_WeDontNeed_Fig03(en-us,MSDN.10).jpg

Figure 3. An architectthinking in bubbles

 

That being said, a good architect also understands that asoftware solution consists of more than the functional requirements implementedin custom code (see Figure 4)—for example, development platforms, frameworks, andinfrastructure technologies. Consideration also needs to be given to thenonfunctional requirements of a software solution, like: deployment, security,scalability, and performance. Neglecting the nonfunctional requirementsincreases the likelihood that the system will fail.

 

Cc505974.jour15_WeDontNeed_Fig04(en-us,MSDN.10).jpg

Figure 4. A developerseeing part of the picture

 

Another critical piece of solution space knowledge is thepatterns used to implement a software solution. Patterns allow a softwaresolution to be developed with thought toward extendibility and reuse, which arecritical to reducing the total cost of ownership of a softwaresolution—especially in later phases of development or product maintenance.

Technical Acumen

Technology has been rapidly evolving for as long as anybodycan remember. I've implemented countless technologies over the last dozenyears, including technologies for process distribution, user experienceprogramming languages, enterprise application integration, object-relationalmapping, virtualization, and data persistence.

Understanding how a technology works is not enough todevelop a robust software solution—understanding where the technology isapplicable within a solution is essential to the development of a qualityproduct. On several occasions, I have reviewed architecture documentationconsisting of little more than a number of boxes on a Visio diagram eachrepresenting a technology, with no mention of how the technology was intendedto be used or any reference to the functional requirements to be fulfilled bythe technology. Such practices give architects a bad name.

It is impossible for anybody to understand every detail ofevery technology. But an architect should understand, at a minimum, the intentand applicability of any technology prior to requiring its usage in the contextof a software solution. The architect should also map the technology to thefunctional requirements, or to the applicable part of the conceptualarchitecture. Too often, I encounter the bad practice in which an architectmakes a technical edict without explaining the intended application of thetechnology. To be honest, I made the same mistake on occasion earlier in my owncareer.

Architects sometimes allow their passion for technology toovershadow the problems that they need to solve. The art of choosing technologyfor a software solution is finding the minimum amount of technology required tomeet the system requirements, both functional and nonfunctional. Delivering asoftware product that meets all quality standards, such as performance andscalability, will require a good amount of technical knowledge, and it is thejob of the architect to define the platform for development and deployment.

With all of the advances in technology, keeping abreast ofthe latest trends can be daunting, but it is critical for an architect. Onecompany that I worked with had a problem with the performance of aclient/server reporting application. The application had been extended foryears without a technology update. The architect responsible for the solutionwas adamant that building an object-layer over the relational model would solvethe problems with his application. The proposed solution would have been statusquo a decade ago, but database technologies have advanced greatly over the lastdecade and now contain optimized reporting services as part of the platform.The solution proposed by the architect would have increased the total cost ofownership of the solution (development, maintenance, licensing) and most likelywould have adversely affected performance. Luckily, the architect was open tolearning about the newer technologies and the product upgrade took advantage ofthe capabilities in the newer database platform.

Patterns

One critical skill possessed by all great architects is anunderstanding of how to leverage patterns in the definition of a softwaresolution. Patterns have been a mainstay of software development for over twodecades. Through the seminal Design Patterns by Gamma et al., the PatternOriented Software Architecture (POSA) series of books, various publicationsfrom industry luminaries, and the work of organizations like the HillsideGroup, patterns have become a key measure of how software is judged. Whenreading about a new technology or a framework, I often try to list thedifferent patterns that were used in the solution in order to assess the qualityof the design.

The mainstream usage of patterns in software development hasmade it a critical skill for architects. Learning how to leverage patternstakes time and effort. Some architects, like me, have had the good fortune ofworking with experts in patterns who provide mentoring in the discipline ofarchitecture and design; others are left to acquire these skills on their own.With or without mentors, developing a proficiency in patterns does not happenby accident and requires dedication. There is a large learning curve inacquiring the patterns vocabulary and an even larger learning curve inunderstanding where patterns can be applied in a software solution. The effortput into learning patterns is paid back tenfold, giving an architect the necessaryskills to intelligently discuss design with their peers and to createextendable software systems.

One of the main motivations to leveraging patterns in a softwaresolution is the ability to design frameworks that allow the solution to beeasily extended. A software solution uses frameworks to define the solution'sarchitecture in the context of the problem domain. Good software frameworks areusually defined using general-purpose patterns that are reusable over a numberof domains. One of the main drivers behind domain-specific languages is toincrease developer productivity by providing graphical tools to customizegeneral frameworks. As mentioned previously, patterns are an essential component ofdefining frameworks.

I can provide many examples in which understanding patternshas increased productivity, but the best example was in the project I mentionedearlier which I inherited after it was stalled for over a year. Having designedsimilar solutions in the past, I understood the patterns that were necessary tobuild an extendable domain model. While equipment was being ordered for the laband development staff was being interviewed, I was able to define the domainmodel and frameworks with patterns that I had used on similar efforts in thepast, accelerating the development phase. The initial frameworks I developedwere a key factor in being able to deliver the product in a short time frame.

Don't Build "The Homer"

With all of the skills possessed by good architects, it isoften challenging to narrow the numerous options to be used in a softwaresolution. Between the standards defined for specific domains, the alternativesfor conceptualizing a software system, the plethora of technological options,and the numerous patterns to promote extendibility and reuse, it is easy toover-architect a solution that bears a greater resemblance to alphabet soup thanto a robust software system (see Figure 5).

 

Cc505974.jour15_WeDontNeed_Fig05(en-us,MSDN.10).jpg

Figure 5. An architectmaking alphabet soup

 

The first step in simplifying a software system is tounderstand that no matter how fun it is to try out new techniques andtechnologies, they must be applied in the context of a system requirement. Itwas no coincidence that the first system I designed after reading DesignPatterns contained almost all of the patterns defined in that book.

Many years later, after a few painful experiences, I havelearned that a minimalist approach, using the least amount of technology tofulfill the requirements, always yields the best results.

There is an episode of The Simpsons I often think about whendefining a software solution. In the episode, Homer, the dim-witted father, wasasked to design a car for an auto manufacturer. The design for Homer's car wasfull of nonessentials like multiple horns, cup holders, and shagcarpeting—without thought to the overall cost or customer appeal of the car.The prototype, appropriately called "The Homer," was so costly and unappealingthat the product bankrupted the company. Whenever I design a solution, orreview the design of a solution, I frequently stop and ask myself if theresulting product is beginning to resemble "The Homer." If the answer is yes, Isharply refocus on the essential functionality and technology required todeliver the software system.

To Make a Short Story Long...

A couple of months ago, while waiting to make a presentationat a customer event, I was introduced to a developer attending the event as anarchitect from Microsoft. Expecting one of the usual greetings like "pleased tomeet you," I was surprised that the first thing he said was "I think that architects are obsolete." Not wanting to beroped into an argument before my presentation, I responded with a grin andsaid, "I hope not."

Upon reflection, I have wondered why he felt he needed tomake that statement from the outset: Was he having a bad day? Did he have a badexperience with an architect? Perhaps he is unaware of the contributions ofarchitects in software development. Maybe his solution was so well architectedthat the development staff only needed to consider coding and testingfunctional requirements without needing to understand the considerationsnecessary to create a robust software solution.

A poorly architected project languishes without results, oris delivered with poor results. On the other hand, a successful softwaresolution is well architected, by someone with domain knowledge, the ability tothink conceptually with technical acumen, and the ability to leverage patternsto solve problems. Industry titles for this role have come to includearchitect, technical lead, and a number of others, but the importance of therole is clear. We should stop wasting time arguing the virtues of the role andcontinue solving problems with technology.

Resources

The Agile Manifesto

http://agilemanifesto.org/

Design Patterns: Elements of Reusable Object-OrientedSoftware, Erich Gamma et al. (Addison-Wesley Professional, November 10,1994, ISBN: 978-0201633610)

Handbook of Software Architecture

http://www.booch.com/architecture/index.jsp.

The Hillside Group

http://hillside.net/

The Homer Wikipedia Entry

http://en.wikipedia.org/wiki/Oh_Brother,_Where_Art_Thou

"Using Patterns to Define aSoftware Solution," Joseph Hofstader, November, 2006.

http://msdn2.microsoft.com/en-us/library/bb190165.aspx

"Using Patterns for Rapid Development," Joseph Hofstader, February, 2007.

http://www.iasahome.org/c/portal/layout?p_l_id=PUB.1.366

About the author

Joseph Hofstader is anArchitect for Microsoft's Developer and Platform Evangelism organization. He isalso an adjunct professor in the Department of Information Technology and ElectronicCommerce at the University of Denver. Prior to joining Microsoft, he was aDistinguished Member of Technical Staff at Avaya. Joe has spent his careerarchitecting, designing, and developing solutions in the telecommunicationsindustry. He is happy to receive feedback at joe.architect@live.com.

 

This articlewas published in the Architecture Journal, a print and online publicationproduced by Microsoft. For more articles from this publication, please visitthe Architecture Journal Web site.

Sunday, April 24, 2011

Five skills that can help software engineers stand out from the pack

Career Management

Five skills that can help software engineers stand out from the pack

Takeaway: Here are five core skills that can help you build critical competencies as a software engineer and help you stand out from the pack.

Last week I blogged about a CareerCast report that said Software Engineer was the hottest job for 2011. Many readers chose to blast me and TR for associating this job with low stress and I’d just like to say that it’s not like CareerCast came to me and asked me about the stress level. I was merely reporting what they stated as the credentials for the determination. But if CareerCast ever DOES ask me, I’ll tell them that they’re wrong. Judging by the reaction that blog got, I’d have to say that software engineers are fairly overwrought.

But back to business. If you read that blog and would still like to pursue a career as a software engineer or if you’re a software engineer who would like to know how to stand out from the pack, here are some tips.

Bruce Douglass, Chief Evangelist from IBM Rational suggests these five core skills to help build critical
competencies:

Electric Vehicle Mechanics: According to SBI Energy and J.D. Power & Associates, the electric vehicle market in the U.S. will double by 2020. As automakers upgrade the features in electric, so will the amount of software code in each vehicle. Students with knowledge and fundamentals on electric vehicles will be in better position to create complex battery systems, electric drive units and cabin electronics.

Probability and Statistics: Collecting, processing, analyzing and interpreting numerical data is key. These skills can be used to calculate the average downtime of a computer, evaluating the effectiveness of commercial products, predicting the reliability of a rocket or studying the vibrations of airplane wings.

Environmental Engineering: The green movement will remain a hot button issue for future engineers. Finding new ways to improve the environment, provide healthy water, air, and land for human habitation, and to remediate polluted sites are all important areas of expertise for students.

Engineering Economics: This skill is for any student with aspirations of one day managing a project. It is used to answer many likely scenarios, like: Which engineering projects are worthwhile? Which engineering projects should have a higher priority? How should the engineering project be designed? Etc.

Ethics: This skill goes along with well established fields such as medical, business and legal ethics. Amid pressure from recent events like the levies failing in New Orleans during Hurricane Katrina, universities are putting a higher emphasis for students to have a better understanding of ethical and quantitative concepts, as opposed to solely focusing on data and numbers.

Thursday, April 7, 2011

How to use LinkedIn strategically

How to use LinkedIn strategically















January 24, 2011, 4:07 AM PST

Takeaway: LinkedIn is a great tool for getting your profile out in front of potential employers. And with the addition of some new apps, it just got better.

I think a lot of people think of LinkedIn as just a more staid version of social networking. And I think the gainfully employed often neglect their LinkedIn pages in favor of its more scintillating cousin, Facebook. After all, would you rather hear who a former colleague is now connected to or read trash-talking among your Facebook friends?

Okay, maybe that’s just me.

The fact is, LinkedIn is a great tool for what are perhaps the most important aspects of searching for a job-networking and online presence. And with the addition of some new LinkedIn apps, these have become tasks have become even easier to do.

First of all, you can put your work profile up there for the world to see. While you still should send targeted resumes for positions you want to apply for, LinkedIn gives everyone a snapshot of your capabilities. So if a potential employer is just looking around before he or she even posts an opening, you’re out there. Here are some tips for using LinkedIn to its greatest advantage:

Avoid overused keywords just as you would on a resume

LinkedIn late last year released its top 10 overused buzzwords used in U.S. member-profiles. Avoid:
  • extensive experience
  • innovative
  • motivated
  • results-oriented
  • dynamic
  • proven track record
  • team-player
  • fast-paced
  • problem-solver
  • entrepreneurial

Take advantage of new LinkedIn apps

I found three apps that I think are invaluable:

WordPress

This app will synch your WordPress blog posts automatically with your profile. It offers a filtering option if you don’t want to share every entry with your LinkedIn connections-you can just use a special LinkedIn tag.

Events

The Events application adds a box to your profile that shows what events people in your network are attending. This helps you find events based on your industry and job function. You can sort by most popular events, search for events, and create new ones.

SlideShare Presentations

With this app, you can share presentations and documents with your LinkedIn network and upload portfolios, resume, conference talks, PDFs, marketing/sales presentations. If you’re really adventuresome, you can upload a video of yourself.

Wednesday, April 6, 2011

Mobile design and developement (free online book)

Data Structures and Algorithms with Object-Oriented Design Patterns in C#

Data Structures and Algorithms
with Object-Oriented Design Patterns in C#


http://www.brpreiss.com/books/opus6/

Building a Windows Phone 7 Application from Start to Finish

Building a Windows Phone 7 Application from Start to Finish

March 15, 2011

This documentation and accompanying sample application will get you started building a complete application for Windows Phone 7. You will learn about common developer issues in the context of a simple fuel-tracking application for your car named Fuel Tracker. This topic describes things you should know before you start creating your Windows Phone application.

Some of the tasks that you will learn include the following:

Audience

This documentation and accompanying sample application is best suited for developers with the following experience levels.

Some experience with:

  • .NET
  • C#

Little or no experience with:

  • Silverlight
  • Windows Phone

Avoiding Code Smells

Unless you are careful, a software application quickly becomes difficult to change. We all have had the experience of inheriting an application that someone else has written and being asked to modify it. Think of the fear that strikes your heart just before you make your first change.

In the game of Pick-Up Sticks, you must remove stick after stick from a pile of sticks without disturbing the other sticks. The slightest mistake and the whole pile of sticks might scatter.

Modifying an existing software application is similar to the game of Pick-Up Sticks. You bump the wrong piece of code and you introduce a bug.

Bad software is software that is difficult to change. Robert and Micah Martin describe the markers of bad software as code smells. The following code smells indicate that software is badly written:

  • Rigidity—Rigid software is software that requires a cascade of changes when you make a change in one place.
  • Fragility—Fragile software is software that breaks in multiple places when you make a change.
  • Needless complexity—Needlessly complex software is software that is overdesignedto handle any possible change.
  • Needless repetition—Needlessly repetitious software contains duplicate code.
  • Opacity—Opaque software is difficult to understand.

* Notice that these code smells are all related to change. Each of these code smells is a barrier to change.

Note

These code smells are described by Micah and Robert Martin in their book Agile Principles, Patterns, and Practices in C# on page 104. This book is strongly recommended!

Useful Facebook Keyboard Shortcuts

Here is the list of Keyboard Shortcut combinations which you could try in Facebook by using Firefox.

Shift+Alt+1 : Return to Home

Shift+Alt+2 : To view the Wall tab

Shift+Alt+3 : To pull down the Friends Requests list

Shift+Alt+4 : To retrieve the Messages list

Shift+Alt+5 : To call out the Notification list

Shift+Alt+6 : Account setting page

Shift+Alt+7 : Account privacy configuration.

Shift+Alt+8 : Facebook fans group page

Shift+Alt+9 : Facebook?s Statement of Rights and Responsibilities

Shift+Alt+0 : Facebook Help Center

Shift+Alt+m : Create new message

Shift+Alt+? : Cursor in the Search Box

Here is the list of Keyboard Shortcut combinations which you could try in Facebook by using Google Chrome.

Alt+1 : Return to Home

Alt+2 : To view the Wall tab

Alt+3 : To pull down the Friends Requests list

Alt+4 : To retrieve the Messages list

Alt+5 : To call out the Notification list

Alt+6 : Account setting page

Alt+7 : Account privacy configuration.

Alt+8 : Facebook fans group page

Alt+9 : Facebook?s Statement of Rights and Responsibilities

Alt+0 : Facebook Help Center

Alt+m : Create new message

Alt+? : Cursor in the Search Box

Tuesday, April 5, 2011

Pledge to QA

Pledge to QA :

I recently took some time to review the list of bugs we completed in the last year. I noticed that the majority of bugs found during development and entered into our tracking system were similar to this list:

  • “Change the dropdown list to be sorted…”
  • “Change the fields on the form to have the correct tab order…”
  • “Change the fields on the form to move and resize appropriately if the form is resized”
  • “Change this to be spelled correctly…”
  • “Change … to be consistent…”

Each of these items takes time away from our development in many ways:

  • for a tester/QA to recognize it,
  • for a tester/QA person to record it,
  • for a development team member to confirm it,
  • for a development team member to assign it a priority,
  • for a development team member to assign it to a person to fix it,
  • for the assigned person to make the change,
  • for the assigned person to mark it complete in the tracking system,
  • for a tester/QA to retest it after the next build  for a tester/QA to mark the item as done.

That is a lot of Project Management for items that are just the result of sloppy programming.  We should strive to reduce these cosmetic “bugs” from ever being included in code that is “ready to test”.

Here is my idea.  Create a pledge that a programmer makes to QA because these are not the kind of “bugs” that QA should need to waste time on testing and tracking. I don’t think this pledge should be formalized and signed by each developer. I hope that it motivates programmers to pass code along to QA only after it is free of cosmetic bugs.

Our team held a meeting to discuss the items on this list. I was surprised that there was little agreement about any items, even items I thought would be non-controversial such as sorting listboxes alphabetically by default. I only led the discussion, I did not try to dictate or persuade, and in the end, after much arguing back and forth, most our of programmers did come to accept most of the items on the list as best practices. I provide our list as a starting point. I hope you can suggest other items to add to it. I realize that this list is very similar to coding standards, but by phrasing it as a pledge, I hope to increase the adoption of these tenets.

Expectations from developer (I pledge to):  (This is a pledge a programmer makes to QA because these are not the kind of “bugs” that QA should need to waste time on testing and tracking)

  1. The code will not error right away for all users when they try to run it
  2. The messages visible to users will not have any misspellings
  3. The tab order on forms will be correct (reasonable)
  4. The first field to receive focus on forms will make sense (be optimal)
  5. When a form is resized, controls should move or resize appropriately
  6. Form colors should be consistent across forms.
  7. Form elements (button captions and placement) should be consistent across forms.
  8. Keyboard shortcuts should be consistent per policy
  9. Form icons and captions, including popup messages should be consistent.
  10. Don’t ask testers to start testing until all these above items are correct.
  11. Captions will fit on buttons, text won’t get truncated on screen.
  12. Code runs fast
  13. When you run my code, I would be surprised if you can find any “syntax” errors such as cases where null values were not handled
  14. If an error does occur, it will be gracefully handled with a user friendly message and helpful debugging details will be logged.
  15. If there are any conditions/scenarios I have not tested, I will let you know what those are. (I didn’t test on Vista, or against Oracle db)
  16. Error messages will be complete sentences.
  17. All data in lists will be in alpha order

Friday, March 25, 2011

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

Bummer. I've been mucking around with some more custom databinding that integrates validation into the databinding process. One of the things the control does is automatically add 'notification' icons or error text to the page. The idea is this:

 

  • Control(s) unbind
  • If there are binding errors an Icon or Message is injected into the Control Collection

 

Basically the code looks something like this:

public bool AddBindingError(string ErrorMessage, wwDataBindingItem BindingItem)

{

    // *** Associated control found - add icon and link id

    if (BindingItem.ControlInstance != null)

        this.BindingErrors.Add(new BindingError(ErrorMessage, BindingItem.ControlInstance.ClientID));

    else

    {

        // *** Just set the error message

        this.BindingErrors.Add(new BindingError(ErrorMessage) );

        return false;

    }

 

    BindingItem.BindingErrorMessage = ErrorMessage;

 

    // *** Insert the error text/icon as a literal

    if (this.ShowBindingErrorsOnControls && BindingItem.ControlInstance != null)

    {

        LiteralControl Literal = new LiteralControl(this.GetBindingErrorMessageHtml(BindingItem));

        int CtlIdx = BindingItem.ControlInstance.Parent.Controls.IndexOf(BindingItem.ControlInstance);

        try

        {

            // *** Can't add controls to the Control collection if <%= %> tags are on the page

            BindingItem.ControlInstance.Parent.Controls.AddAt(CtlIdx + 1, Literal);

        }

        catch {;}

    }

 

    return true;

}

 

And it works beautifully in most situations. The literal control creates markup that loads the appropriate image and adds the error text (if configured that way).

 

This all works great until you happen to have some script markup on the page using. For example if the page contains something as simple as this:

 

<%= DateTime.Now    %>

 

The Controls.AddAt() call will fail with:

 

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

 

Now I feel like a complete schmuck to never have run into this before. That's one hell of an assumption to miss about ASP.NET it seems. I have tons of pages where there's <%= %> markup on it. Especially in script code to get the appropariate ClientID:

 

<%= this.txtCompany.ClientID %>

 

Luckily there's a workaround for code like this by using DataBinding expressions instead:

 

<%# this.txtCompany.ClientID %>

 

This works fine for simple expressions. The difference here is that <%= %> expressions are embedded into the ASP.NET output as part of the generated Parse Tree class, whereas the <%# %> expressions are embedded at runtime.

 

Another workaround is to force any script code into the content of a server control and remove it from the Page class or the Content container that you're adding controls to.

 

   <div runat="server">

    <script type="text/javascript">

      function ShowCreditCard()

      {

         var IsPayPal = false;

         for(x=0; x<4; x++ )

         {

                var ctl = $("<%= this.txtCCType.ClientID %>_" + x.toString());

                if (ctl == null)

                     break;

               

                if (ctl.value == "PP" && ctl.checked)

                {

                     IsPayPal = true;

                     break;

                }

         }

        

         var loCC = $("<%= this.trCreditCard.ClientID %>");

         if (loCC == null)

            return;

         var loCC2 = $("<%= this.trCreditCardExpiration.ClientID %>");

 

         if (IsPayPal)

         {

            loCC.style.display = "none";

            loCC2.style.display = "none";

         }           

         else

         {

            loCC.style.display = "";

            loCC2.style.display = "";

         }

      }

</script>

</div>

 

This works as well, although this is also pretty ugly. In my case this is probably the easier solution though, because most of my markup expressions are doing exactly what's happening above: Embedding ClientScript Ids into JavaScript.

 

I still don't see why the control collection can't be modified if there are <% %> blocks on the page. Those blocks are just turned into Response.Write() commands, or raw code blocks. I don't see how this affects the Controls collection that would require this sort of error.

 

In my situation here I was able to get by just switching to <%# %> or wrapping sections with a server tag. Even if that's not an option the above code captures the error and goes on. This means the warning icons don't show up, but the rest of the error handling showing the summary and error control linking etc. all still works.

 

Can anybody think of another more reliable way to inject markup into the page dynamically from outside of the control rendering? In a previous rev of my databinding tools I had custom controls and I simply took over post rendering which was reliable. But this is not so easily done externally… I can think of possibly hooking up the Render method and calling back into my custom control, but man does that seem ugly.

Thursday, March 24, 2011

BE THE CEO OF YOU INC.


BE THE CEO OF YOU INC.  
 
 
 

Just off the tour as I write this. It was a genuine joy to meet so many LWTs (Leaders Without Titles) on the tour stops in Germany + Norway + Kuwait + Qatar + India + Dubai + South Africa. Which brings me to one event in particular, as it relates to the 6 leadership ideas I want to share.

DU Telecom, the upstart telco in Dubai, that in just four years has become truly world-class, brought me in to speak at a special function for a few hundred of their CEO clients. My job was to inspire them, to challenge them and to help them get their leadership genius to its next level of excellence. As I finished, I offered them 6 challenges:

1. GET OUT AND EXPLORE: Extracurricular activities are not a waste of time. The best leaders are interesting people. They pursue passions. They love art. They experience unforgettable travel. And they engage in conversations with fascinating people. This allows them to stay inspired. And hungry. And offers them a steady stream of ideas that actually makes their businesses more successful.

2. LISTEN TO THE PEOPLE WITH THE DIRTIEST HANDS: Want to know what your customers love - and can't stand - about your business? Listen to the people on the front line. The grocery clerk hears exactly what's being said about the products on the shelves. The person answering the phone knows what people are most dissatisfied with. The technician gets exactly what needs to be fixed for the brand to grow. Learn to listen to the people who are closest to your customers.

The data they carry is priceless.

3. YOU ARE PAID NOT ONLY TO WORK. YOU ARE PAID TO BE SCARED:
  It's easy to do what you do every day until it becomes second nature. But what leadership's truly about is having the courage to out-think + out-perform who you were yesterday. And that's scary. Because you need to consistently do what's uncomfortable. But all growth lies on the outer edges of your comfort zone. Commit to not just doing your work but accepting the challenges that frighten you.

4. HEALTH IS YOUR WEALTH: These were peak-performing CEOs leading 24/7 careers. There was utter silence in the room when I shared this statement: "Health is the crown on the well man's head that only the ill person can see". Why be the richest person in the graveyard? And what's the point of getting to the mountaintop but reaching it sick? Get serious about becoming superfit. Then watch the caliber of your work and the quality of your life fly.

5.  FAMILY FIRST: With children, we have a little window of opportunity. And once it closes, it's very hard to open it up again. Having a strong family foundation of deep relationships with those you love makes you a more effective businessperson. And who wants to get to the end of your career and realize you're all alone?

6. BE VALUABLE: Business, to me, is nothing more than a breathtakingly great vehicle to deliver unusual value to as many people as possible. Want to double your sales? Then double the value you bring to your customers. And the whole game of life's about much of the same thing: contribution. Being of value. Making a difference. No one on their deathbed wished they had made more money. Most of us do wish we have had a greater impact. As a seminar participant in Qatar shared with me: "The measure of the greatness of a person is the length their shadow casts on the future."

Why do I share the 6 challenges I offered to the CEO crowd with you? Because you are the CEO of your own career and the Leader of your own life. I encourage - and challenge - you to reflect on these ideas and then to act on them with speed. There's never been a bigger need for leaders in our organizations and within our world. And whether you have a title or not, that need applies to you.

Keep Leading Without a Title,
 
 
   

Friday, March 4, 2011

FAITH & CONFIDENCE UNDAMAGED

A businessman lost everything in fire. Next day Placed sign board "EVERYTHING BURNT but luckily FAITH & CONFIDENCE UNDAMAGED Business starts TOMORROW"....

Think

Think Big,Think Fast,Think Ahead. Ideas are no one's monopoly.