Inflection Research

June 22, 2008

A Kink in Apple’s Armor?

Filed under: Investing,Technology — semanticzen @ 11:24 pm

A funny thing happened to me on the way to the Apple store. I picked up the latest copy of Information Week magazine and read an article about the HP Voodoo Envy 133. Long story short, I’m no longer going to the Apple store. I’m waiting for the Envy.

Vista Woes

After a painful year running Vista I want need a dependable lightweight laptop with amazing battery life. So I did the once unthinkable; considered getting a Mac. In the past two weeks I’ve visited the Apple store twice to checkout and ask some questions about the Mac Air. I would have bought it the second time, but it was the South Beach store and it seemed the price was a couple hundred dollars higher than in Dallas (no surprise there).

While many rave about the OS X, and I have no doubt it is better than Vista, corporate types like me simply need some applications that do not run on the Mac; and I want to avoid dual boot (granted VMware does have a better solution). However, since I could do 90% of my work on OS X I was willing to get a Mac as a second mobile laptop primarily due to the amazing battery life.

Apple’s Killer Products

Apple has re-built their business this decade on the back of its product designers. Their sleek integrated products simply blew away the competition. Their best two products the MacBook and iPod have driven astounding growth.

The iPhone looks like it may be a third category killer. Granted, Apple has some pretty powerful competitors to overcome like Nokia, Samsung, Sony, Motorola, and HTC. I don’t include RIMM because in a couple years battery life will reach a point where the last feature (RIM’s battery efficient devices) Blackberry dominates will be a non-issue. Since practically every other phone supports ActiveSync IT departments will finally be able to jettison the extra cost of maintaining a Blackberry server. Soon, when Apple releases its 3G / ActiveSync iPhone for $199 its sales should sky rocket. Although, how long can Apple maintain its lead in the cell phone market? Probably the most cut throat product market.

The iPod is still head and shoulders above the other MP3 players. In fact, I just bought my second iPod Nano a couple months ago. However, this market is leveling off as it is becoming more common to find people with even multiple MP3 players. The HDTV / LCD market is commoditizing like the original TV market did. You can see this at any Best Buy store or even at Dell’s Northpark mall store. This is making Apple’s nice sleek desktop models look comparatively less impressive. Especially when doing a side by side comparison at the Best Buy stores that conveniently now offer Apple computers.

Mac Attack

So back to the Mac; the heart of Apple. The MacBook is a solid product, but I just saw a Gateway laptop at Best Buy for less than $900 that included 4GB of memory and an Intel Core 2 Duo – undoubtedly very competitive with the Mac book. It is amazing how more power can make up for many of Vista’s issues. The Mac Air has been the wow product. While this year the Air has faced stiff competition from the Toshiba Portege R500 and the Lenovo ThinkPad X300 the HP Voodoo Envy 133 ups the bar compared to everything in the market right now.

It has features the Mac Air is clearly missing like a removable battery and more than one USB port, but the amazing part of the Envy 133 is its design. Its appearance is cool. It has a removable battery. It has a removable battery (repeated for emphasis). It is .7 inches thick. It’s sturdy due to its carbon fiber chassis. It has introduced a few new design elements that upon seeing them just appear to be common sense, such as putting the Ethernet port on the power connector. It has an HDMI port. It has instant access to Skype and an Internet browsing through the Voodoo IOS.

Rahul Sood may have bested a fragile Steve Jobs and made Voodoo HP’s Lamborghini. I don’t expect Apple to stumble any time soon. They still have a stranglehold on the MP3 player market; with no end in sight. They still are releasing a game changing iPhone while competitors aren’t innovating but instead copying Apple. Which Nokia appears to admit.

“I don’t know what is copy and what is original but if there is something good in the world we copy with pride.”

Windows Vista is finally getting to the stabilizing service pack time frame and despite prevailing wisdom the MacBook and OS X have not been completely without defects either. Windows Vista is still a very disappointing product that will be skipped by most enterprises. However, Apple doesn’t offer anything close to true enterprise client management software. If enterprises migrate from Windows they are more likely to embrace a Linux based
thin client than OS X. Now if Apple decides they want to move to the enterprise by purchasing Sun Microsystems things could get interesting. That doesn’t seem to be the direction Apple is pursuing.

Apple depends on being the best of breed consumer product. Something that HP Voodoo’s division might have something to say about, exposing some kinks in Apple’s business model

Next Generation Semiconductor Design (abridged)

Filed under: Investing,Platforms,Semiconductors,Technology — semanticzen @ 10:45 pm

I was pleased that Seeking Alpha published a summary of my paper on the Next Generation of Semiconductor Design and honored that they made it an Editors Pick. Over the past couple years I’ve find Seeking Alpha to easily be the best source for investment ideas. On my Seeking Alpha post I put a follow up comment that did not include some links so I thought I would re-post it here.

 

To help clarify, Xilinx and Altera have platforms that their clients develop products on top of and Xilinx and Altera make money by selling chips that go into these end products. While it is true that Microsoft needs to care about the layman’s needs, Xilinx and Altera only need to support engineers due to the nature of their products.

As for whether Xilinx or Altera is in a better position the simple answer would be Xilinx since they have a larger market share and currently appear to have more mindshare. Of course, things are rarely that simple. Altera has better margins and has made some great moves the last couple years such as: partnering with ARM, designing for power management, and having the best path to structured ASICs.

Both Xilinx and Altera have independently discussed that future growth is in adjacent markets not fighting a battle of attrition between each other; such is the benefit of a duopoly. It typically takes two years from design win to volume production and I don’t expect meaningful revenue growth in the PLD industry for about a year and a half. Right now I don’t see a major difference in design wins between the two companies, but that could change.

I think both companies are a great value at the current price and I intend, as best as I can, to track the design wins for these two firms. That will be the leading indicator of who will benefit from the next wave of end product innovation. For the foreseeable future the market can support two major PLD companies and the first losers will be those in adjacent markets.

June 16, 2008

Next Gen Semi Design (part 14) – Conclusion

Filed under: Platforms,Semiconductors,Technology — semanticzen @ 5:08 pm

The platform aspects of Xilinx and Altera’s business model do not require that the companies offer the best of breed technology; although they often do. The PLD (programmable logic market) market is not prone to the extreme price competition seen in the ASIC (application specific integrated circuit), generic processor, and memory markets due to the high barriers to entry caused by the required software platforms and the lock-in once a vendor selects a PLD design platform. This makes the two dominant PLD vendors, who control over 80% of the market, very profitable with net margins over 20%.

The PLD market will see solid growth for years once several macro trends emerge causing a tipping point in PLD demand. These emerging trends are

  • The increasing complexity of new semiconductor devices
  • The new markets for PLDs due to microprocessor performance barriers and dramatically shortened end product lifecycles
  • The maxing out of the current communications infrastructure
  • World-wide growth due to globalization, potentially temporarily restrained due to a US consumer led recession

Semiconductors often act as a leading indicator for the technology industry. Xilinx and Altera are up 27% and 18% respectively this year after several years of their stocks floundering with negative returns. With Xilinx and Altera’s accelerating design wins it appears the still have considerable room to run.

If you have any questions or comments related to the posts from this paper shoot me an e-mail. You can view our entire paper on the Next Generation of Semiconductor Design or use the links below to jump to specific posts from the paper.

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

June 8, 2008

Next Gen Semi Design (part 13) – Convergence

Filed under: Platforms,Semiconductors,Technology — semanticzen @ 8:55 pm

In the previous two posts on why semiconductor solutions are converging and why this is a great opportunity for FPGAs. I explained this was occurring because of increasing semiconductor complexity and physical barriers. Below are two new end market opportunities as a result of increased digital IC complexity and physical barriers.

FPGAs in Supercomputers

FPGA’s have moved into supercomputers as the enabler of Reconfigurable Computing. Like any change in the marketplace, reconfigurable computing also represents a risk. Companies like Stretch are creating FPGA like software configurable microprocessors, but how straight-forward will engineers find the design tools?

The architecture for a RPU (reconfigurable processor unit) system is just now becoming standardized. While FPGAs theoretically have the ability to be reprogrammed at run-time software development tools have not supported this. While some proprietary systems, such as Cray’s FPGA-augmented XD1 and SGI’s Altix with RASC option, have seen limited success it appears FPGA’s may finally be entering the standard x86 market.

FPGAs entering the IT (PC/Server) Market

The reconfigurable computing data-stream-driven model may alleviate many of the performance barriers in the existing x86 server market. As prices fall and the speed of a single processor core stabilizes it is not farfetched to see FPGA’s in desktop PC’s and cell phones. A PC manufacturer may decide to use a FPGA chip to implement common tasks such as TCP/IP processing.

Xilinx and Altera are working with Intel and AMD to plug directly into new multi-core processor’s front-side bus architecture. We may start to see PLD products for this as early as mid-2008.

Both Intel and AMD have developed their own technique to allow PLD’s to plug into the PC architecture. In June 2006, AMD announced its Torrenza program creating an interface to plug into its proprietary HyperTransport CPU bus. Not to be left behind, Intel, along with IBM and others, in September 2006 announced Geneseo an open source project creating a set of extensions to PCI Express aiming to help graphics chips and other accelerators. Geneseo proposals aim to extend Express in four general areas: fine-grained power management, locking shared memory, hints to help coherent processor handle I/O more effectively, and efficiencies for mapping virtual to physical memory.

 

PC and server architectures are highly standardized alleviating many of the advantages of PLDs. However, as computers take over more real-time computing functions, like processing high definition video signals, there may be more of a need to balance the inflexible speed of ASICs and the flexible sluggishness of software for x86 processors. Some examples of new real-time PC computing functions could be replacing proprietary PBX systems with generic servers running unified communications software or streaming video from a home server appliance.

June 7, 2008

Next Gen Semi Design (part 12) – Convergence

Filed under: Platforms,Semiconductors,Technology — semanticzen @ 8:00 pm

This is my second of three posts on why semiconductor solutions are converging and why this is a great opportunity for FPGAs.

The Memory wall

For well over a decade processor speed has been increasing more than memory speed, because much more R&D has been poured into logic and processor design. This is because logic (Broadcom, Xilinx, Altera) and processor designers (Intel, IBM) have far better margins than memory designers (Micron, Spansion, Samsung).

Physical Barriers

It is apparent that for servers the application performance improvement curve is flattening. Intel’s generic microprocessor architecture has overtaken many RISC processors because of the shear R&D money Intel has dumped into its x86 design and manufacturing compared to RISC makers. Even so, Intel is no longer dramatically increasing the speed of its processors.

Intel is only able to keep up with Moore’s Law by adding more processors. Inefficiencies abound from using multiple processors. Programmers are not taking full advantage of these multi-core and multi-processor machines because these machines are not offering the proper development platforms and compilers for object-oriented programmers to optimize for multi-core, multi-processor environment. Additionally managing memory in these multi-core architectures is more challenging. Moore’s law is running into an instruction set wall because the data stream is too large.

Physical barriers (like transistor leakage) are inhibiting the ability for semiconductor companies to continue keeping pace with Moore’s Law. To keep up with Moore’s Law microprocessor designers are forced to build up by adding more processors. Processor manufacturers’ ability to scale clock speed and shrink transistors is decelerating. They must now use parallelism.

June 5, 2008

Next Gen Semi Design (part 11) – Convergence

Filed under: Platforms,Semiconductors,Technology — semanticzen @ 3:18 am

In my next three posts I’ll wrap up my series on Investment Opportunities in the Next Generation of Semiconductor Design. In these three posts I’ll cover why semiconductor solutions are converging and why this is a great opportunity for FPGAs.

Convergence of Software Design Platforms

Programming many-core microprocessors and FPGAs is also a problem of educational deficits and development platform shortcomings. The developer’s choice here may ultimately be decided by who builds the simpler development platform or raises the level of abstraction through powerful framework IP.

Where the innovation is made will make all the difference. Will embedded systems use Platform FPGAs, dedicated microprocessors, or DSPs? With globalization and the Internet; China, India, Russia, and Eastern Europe are producing hundreds of thousands to millions of engineers. Altera has over 30 joint laboratory and training centers in China, but it is not alone as Xilinx and other major semiconductor firms are working to get the next generation of engineers to learn and innovate on their platform. What development platform will win the minds of the next innovators?

Competition is migrating from semiconductor companies solely competing based on their IC based on the platform they offer. Microchip is a successful example of this strategy. When the innovation in the IC slows the innovation moves to the platform; and the efficiency it bequeaths on the end product designer.

The information technology departments and particularly web software developers have discovered and embraced agile project development methodology. Rapidly shrinking product lifecycles are encouraging digital product designers to embrace similar prototype and release agile strategies.

Platform FPGAs as SoC

As chips become more complex their design and manufacturing costs increase dramatically. More requirements require a complex design which produces more functionality to test and debug, and a more complex design triggers lower yields and higher NRE in the manufacturing stage. Embedded systems are being designed around SoC. Industrial, automotive, and consumer electronics devices are increasingly becoming digitized.

Another example of an FPGA SoC is HDTVs. Most HDTV are now designed with a stand-alone FPGA or coupling an FPGA with an ASSP as a coprocessor. These Platform FPGAs include hard-coded DSP blocks, internal memories, and standard IP blocks along with the programmable logic.

High-end convergence consumer devices are a great opportunity for FPGAs. In addition, the growth in internet traffic is will create another round of build-out in the FPGA industry’s sweet spot, telecom and networking.

In 2008 products built around an FPGA will be delivered. What will be new is that for the first time some of these products will be built on an industry-standard soft-core processor architecture from ARM which ARM released in 2007 specifically for FPGAs. Now the huge base of ARM engineers can develop software for embedded systems based on a FPGA system-on-a-chip and use the massive installed base of ARM software and tools. Will adding an ARM processor and its accompanying ecosystem to the FPGA platform be the inflection point for FPGA design wins and the growth that inevitably follows?

June 3, 2008

Next Gen Semi Design (part 10) – Risks

Filed under: Platforms,Semiconductors,Technology — semanticzen @ 2:27 am

This is my last post related to the potential risks to Xilinx and Altera’s continued market dominance in programmable devices and growth into adjacent semiconductor industries in my 14 post piece on investment opportunities in semiconductor design. To summarize the other risks where

  • Competition from other Platforms
  • Existing Competitors and new entrants
  • Competition from ASICs and reliance on the communications sector

The Semiconductor Industry is Cyclical

Due to the .com and telecom bubble PLD sales surpassed economical sense in 2000 and 2001. After bottoming in 2002 PLD sales have grown at a compound annual rate of about 15% and FPGA sales have grown roughly 20% annually. FPGA’s are now 75% of total PLD sales. In 2001, the PLD market peaked at $4.1B and in 2002 bottomed at $2.3B. Since 2002, both Altera and Xilinx have gained market share every year. The PLD market has only recently exceeded the peak experienced in 2001.

It looks like the economy is headed back into a recession, but unlike the 2001 recession, which was business capital spending induced, this recession looks like it will be driven by a drop in consumer spending. This will affect semiconductor sales, but it will not be nearly as dramatic as the drop in 2001. Although some firms may experience financing issues, companies are for the most part well capitalized.

The 2001 recession was caused by a glut in supply of technology products and an over investment in technology oriented startups. The 2008 recession has neither of these characteristics.

In 2001, companies like, Xilinx, Altera, Cisco, EMC, Sun Microsystems, etc sold (and often helped finance) products to startups and other customers in the technology sector whose unprofitable business models caused them to go bankrupt when the market turned down and venture capital investment dried up. These bankrupt or dramatically downsized companies dumped their newly purchased technology products on the market. So not only had demand decreased drastically; supply increased drastically; causing a glut in the market that took years to work through.

This time supply chains have been optimized for just in time product delivery and technology companies’ balance sheets have never been stronger; often in conjunction with record low sales to inventory ratios. While there may be some re-selling of technology equipment in emerging markets it should be minimal compared to what occurred in the telecom and .net bubble of 2001. In addition, within the semiconductor industry, PLD sales should fare better than most since they require less up front risks, such as time and costs.

With rational supply and persistent growth in data storage, networking, and the digitization of industrial components this recession will look much different than the technology led recession of 2001. Recessions also spur new cost cutting or risk reduction strategies. Companies that have solely relied on ASICS or generic PC architectures may explore the benefits of programmable logic.

June 2, 2008

Web Application Standards

Filed under: Programming,Web Platform — semanticzen @ 1:42 am

It is important that mid-size to large enterprises build applications consistently. When a company has hundreds of applications to maintain it is important to re-use solutions. These re-usable solutions include common code such as an enterprise library or consistent design patterns. An enterprise library should include an application block as well as re-usable web services, business objects, and controls.

By re-using solutions programmers can seamlessly move from maintaining one application to another; and more junior programmers can learn and maintain complex applications much easier. Application standards are never static, but evolve over time. So it is important to revisit them regularly. With technology, in time practically everything changes (even design patterns evolve over time).

It is important to use best practices to re-use patterns and practices that experience has shown to be most effective. However, best practices are not a pretext preventing creative solutions to new business problems. Best practices exist to handle the repeatable problems so project development teams can focus on application specific issues. Best practices should never inhibit creativity.

It is wise to ensure best practices are followed through periodic code reviews. However, no one likes code reviews. Not the person getting reviewed and not the reviewer. So it is advisable to focus on what is important and not be nitpicky when it comes to performing a code review. Time permitting it is better to sit down with the programmer and go through and discuss the code together.

Good rules help keep the quality of programs high while not being so restrictive to inhibit creative problem solving. Below are the ASP.Net web application standards I have compiled.

 

 “Good architecture is necessary to give programs enough structure to be able to grow large without collapsing into a puddle of confusion”

-Douglas Crockford, Creator of JSON

 

Application Goals

I.    Usability

  • About the user experience including user interface design plus application flow, availability, and performance
  • Efficiently fulfill the business requirements
  • The user interface should be simply self-explanatory

II.    Maintainability

  • The vast majority of an application’s life is spent in the maintenance phase; it is critical that the application’s maintenance s as simple as possible
  • A good application is flexible because it is object-based and event driven enabling it to be straightforwardly extended and tested

III.   Time to Market

  • The waterfall method of building applications is dead; application features should be released early and often, increasing user feedback and minimizing scope creep

 

 

Goals for these Standards

  1. Consistently implement best practices
  2. Use and contribute to the company’s enterprise library
  3. Build high performance applications while minimizing complexity

 

 

Goals of Software Architecture*

  1. How to best partition a system
  2. How components identify and communicate with each other
  3. How information is communicated
  4. How elements of a system can evolve independently

*From Roy Thomas Fielding’s (Chairman of the Apache Foundation) doctoral dissertation about web application architecture

 

 

Prerequisites

I.    Project Kickoff Prerequisites

  1. You have read and understand the web application principles (this document)
  2. You have worked with an architect to create a high-level object design for the application

II.    Code Review Prerequisites

  1. You have generated a Visual Studio 2005 class diagram
  2. You have run the Visual Studio 2005 code analysis
  3. Review the Web Application Standard’s Code Review Checklist (below)

 

 

Code Review Checklist

Your code review will fail and your application will not move to production if you do not follow these standards.  If you have any questions or concerns do not hesitate to discuss them with an architect.

I.    Application Setup & Straightforward Code

  • Does your project use the page and project defaults?
  • Is your code straightforward and as simple as possible?

II.    Object Oriented Design

  • Is your application a group of objects or an incomprehensible mess of code?
  • Is your .Net code, HTML, JavaScript, XML, XSLT, CSS, etc. in separate files?
  • Did you copy and paste any code? (Bad!)
  • Did you re-use code?  How?

III.    Enterprise Library

  • Are you using the enterprise library’s objects, web services, and controls whenever possible?
  • Are you using the standard UI framework, which should contain the only default styles in your application?
  • Did your application contribute code and functionality to the enterprise library?

IV.    Best Practices

  • How are you managing state?
  • Are you caching common data?
  • Is the code documented and understandable?

V.    Application Optimization

  • Did you optimize the frequent code paths?
  • Did you run the Visual Studio 2005 Code Analysis?
  • Did you run a search to find code that shouldn’t exist and code that should exist?

 

 

Best Practices

I.        Application Setup

The programmer should review this list before an architect performs a code review

A      Page & Project Defaults

  1. Turn off view state, unless it is required: <%@Page EnableViewState=”true”%>
  2. Your application should have a default file so your users can just go to http://intranet/{your application name}.  They should not have to go to a home page like http://intranet/{your application name}/ASPX/MainFiles/MyCrypticStartPage.aspx
  3. Every page much enforce page level security by checking the user against an Active Directory group
    1. In test you must use the “_test” suffix for every group name
    2. In development, give all developers and CA’s access to your application by putting the ESSTEST active directory roles Internet Developers and Consulting Analysts in your application’s most junior role
  4. A project should not contain code or files that are not used, source control should be used to archive old code
  5. A web form’s code behind should only contain code that directly manipulates web controls or the HttpContext
    1. Additional logic must go in a separate object
    2. Do not pass business objects the HttpContext object (or other child HTTP objects)
  6. All new applications must request a new id to access the database

B       Straightforward Code

Good code is self explanatory.  Use the Xml documentation capabilities built into Visual Studio (hint: VB uses ”’ and C# uses ///)

  • Comments
    • Explain the code; do not repeat it; good code (readable names and straightforward organization) is self-explanatory 80 – 90% of the time
      • Do not provide obvious commentary such as “executing stored procedure” or “loading XML document

      • For code that is specific to one application only document assumptions or difficult algorithms
      • For API code provide extensive documentation and possibly some examples
    • For .Net code add Intellisense documentation on complicated or re-usable functions, properties, classes, etc
    • Courteous Commenting
      • Use end-line comments only on variable declaration lines (end-line comments are comments that follow code on a single line)
      • Do not create formatted blocks of asterisks that surround comments
      • Begin the comment text with an uppercase letter and end the comment with a period
    • Organize large classes with #Region and provide a brief description of the region
  • Formatting Code
    • Use empty lines to segment code where appropriate
    • Remove old, unused code
  • Document
    • Outline and describe any new common web services, controls, or objects that can be shared
  • Naming Conventions
    • Follow the naming convention rules enforced in the Visual Studio 2005 Code Analysis
    • Prefix private global variables with “m_” (like m_WebServicePath) à minimize their use
    • Use descriptive variable names
  • Avoid hard coding
    • Connection string or server specific configuration settings should be in the machine.config and prefixed with the application name
    • Other application specific configuration should go in the web.config

C       Straightforward UI

  • The application should have rules
    • If the user can do something on one screen she should be able to do it on similar screens
    • The user should be able to quickly understand what they can and cannot do (and why)
  • In a workflow, make the steps obvious or explicitly define them upfront

 II.    Object Oriented Design

An application is a grouping of objects, services, events, and processes.  It is important to encapsulate each piece and expose it through an easily understandable interface.  This enables code re-use and allows for easier maintenance as the code can be learned or replaced in discrete slices.

 A      Basic OO Guidelines

Encapsulate functionality into logical objects.  In the web paradigm, inheritance is depreciated; encapsulation is easily the most important OO fundamental.

  • The class that manipulates the user interface should contain no business logic
  • A method should only perform 1 task
    • Avoid long methods (over 50 lines is too long, 20 lines is a good rule of thumb)
    • Avoid methods with more than five arguments (encapsulate additional data in xml or a struct)
  • Don’t repeat the same code in your application or across applications
  • Objects should be loosely coupled

B       Distinct Application Layers

Encapsulate the distinct application layers (business, data, and presentation). 

  1. The user interface should not include business logic.  Do not put application logic in JavaScript.  If necessary, call a web service to calculate business logic.
  2. When possible use metadata when processing business rules.  It is much simpler to update the metadata in a database or configuration file than modify code.
  3. It is still important to place the processing close to the resources it needs.  If performing bulk updates (updating hundreds or thousands of rows) it probably makes sense to put that logic in the database as perhaps a stored procedure or SSIS package rather than putting in an application server.
  4. Avoid putting client-side presentation (HTML, CSS, etc) or behavior (JavaScript) in server side code.
  • Put content in ASPX, ASCX, HTM, or XML files
  • Put logic in .VB or .CS files
  • Put data in the database or XML
  • Put scripts in separate JavaScript files
  • Use CSS files to style HTM, use XSL to style XML 

C      Code re-use

  1. Watch out for a copy and paste mentality.  Copy and paste is not code re-use, it is code duplication
    1. If you find yourself copying and pasting, wrap this functionality into a re-usable object, control, or web service
  2. Ensure you are not writing code that is already available in another component or in the .NET framework
  3. Organize and encapsulate all code into objects or structs
  4. Look for repetitive code that could be written as a common function or object
  5. Do not hard-code values; if necessary create a constant or readonly variable, or encapsulate related parameters or variables in a struct

 D      Questions

  1. Are you encapsulating functionality within a discrete object or resource?
    1. Avoid complex object graphs which are harder to maintain and create more work for the garbage collector.
    2. Do not reference short-lived objects within long-lived objects.
  2. Are your methods encapsulated?
    1. Are you using external variables not passed into the method?
    2. Limit or preferably eliminate the use of global variables.
    3. Are your methods too long?
  3. How are you grouping and exposing functionality?
    1. Are your object, method, property, and variable names intuitive?
    2. Are you adhering to a namespace hierarchy?
    3. Are the objects, methods, properties, and services easily discoverable?
    4. Are you using inheritance to group similar objects?
    5. Are you using the correct scope (public, friend, protected, private) for objects, functions, fields, etc
    6. Are your objects and resources available through an easily discoverable and understandable interface or web service?
  4. Class design:
    1. Are you using a constructor to set class level variables? 
    2. Are you using a destructor or finalizer to clean up expensive resources?
    3. Are you properly declaring access modifiers for your methods, properties, fields, and structures?
  5. Are you overusing a certain technology?
    1. Performance problems may arise by using a good technology in the wrong situation.

 III.    Enterprise Library

 A       Use an Application Block

This component is an application block and it must be used when:

  • Connect to the database
  • Error Handling & Logging
  • Send output or communicating with people or other applications: E-mail, FTP, HTTP posts, etc
  • Impersonation
  • To lookup values in Active Directory

*You should have documentation available for re-usable code such as your application block and re-usable business objects and web services.  The below information includes some basic functionality you will want to include in your common objects and services.

  1. Data Layer
    1. When connecting to SQL Server use these methods
  2. Error handling
    1. Code that is prone to fail (e.g. database calls, etc.) should be wrapped within a Try…Catch…Finally block; to provide maximum debug information.  
    2. Only catch errors (and not re-throw) if you have explicit handling. 
    3. Avoid defining custom exceptions.
  3. Logging and Tracing
    1. It may be beneficial to have custom error logs for every .NET application.
    2. Enabling a trace will allow the developers to debug production problems.
  4. Authentication, Authorization, and Active Directory
    1. Unless some other requirement dictates a custom authentication and authorization mechanism, AD should be implemented.
    2. In a case where Active Directory is not used, ensure that confidential information is encrypted.

 B       Use a Common Theme

  1. This theme must be every application’s default theme
  2. You will need to install it locally on your machine in:
    1. c:\winDOWS\microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\Themes
    2. c:\Inetpub\wwwroot\aspnet_client\system_web\2_0_50727\Themes
    3. Reference the theme in your web.config:  <system.web> <pages
      theme=YourTheme> </system.web>
    4. Do not use an App_Theme folder in your project
  3. If you need to override the standard theme on your page create your CSS file so it references a specific className or id, so by default your page will use the standard theme except where you specifically dictate it not to

    *It is often a good strategy to not implement your common UI framework through an ASP.Net theme, but instead through a common CSS file and a shared directory of JavaScript, images, and HTML files. This provides the flexibility of implementing your UI framework across different web application technologies and different ASP.Net versions.

 C      Use Common Web Objects & Services

  1. Use to log errors or debug information to a central repository
    1. There is a UI to view this logged information
    2. Can setup yourself to receive alerts based on what information is logged
  2. Can track website usage
  3. Can call a long running stored procedure through a generic web service
  4. Or add new common functionality
    1. Use when a method or stored procedure may be valuable to expose to other application as a web service
    2. If Xml is the input or output of the web service please provide an xml schema
      1. Regardless, it is a good idea to use a schema in the design process.
      2. From a security standpoint it is a good idea to use a schema for validating input

 IV.    .Net Best Practices

 A      Web Paradigm

  1. Make sure your application supports the back and forward button
  2. Use meaningful URL’s
  3. Ensure your application has a useful default page
  4. When possible build stateless web pages

B       Caching

  1. Consider caching drop downs or other data that seldom changes
  2. If data can be used by multiple requests and is not user specific it is a good idea to consider caching
  3. Before using a cached object, verify that the object is in the cache and if not allow easy recreation of the object

C      Session Management

  1. Encourage stateless development when possible
  2. Do not use the session object
  3. Disable view state except when it is required

 D      Controls

  1. Ensure that the developer uses the right control in the right situation
  2. If the same set of controls is being reused between pages, a user control may be more appropriate
  3. Scrutinize the size of the view state, and make suggestions about enabling or disabling this attribute per control

 E       SQL Transactions

  1. If a transaction encompasses only updates to a single database, perform the transaction on the SQL Server in T-SQL
  2. If a transaction is spread across multiple data sources or involves something that does not inherently support transactions, the transaction should be performed by ADO.NET

F       Data Retrieval

  1. Use the Data class found in the company’s application block
  2. Use disconnected recordsets, via the DataTableReader, DataTable, DataSet, XML, or JSON
  3. When you do not need a recordset returned use ExecuteNonQuery or ExecuteScalar and use output parameters
  4. Rather than make several database roundtrips, return multiple result sets from a single stored procedure

 G      Data Binding

  1. The DataBinder.Eval method uses reflection to evaluate the arguments that are passed in and to return the result
  • If you have a table that has 100 rows and 10 columns, you call DataBinder.Eval 1,000 times, if you use DataBinder.Eval on each column; your choice to use DataBinder.Eval is multiplied 1,000 times in this scenario
  • Limiting the use of DataBinder.Eval during data binding operations significantly improves page performance
  • Consider either explicitly casting or using the ItemDataBound event as an alternative

 H      Web Services

  1. Consider using the OneWay attribute on Web methods or remote object methods if you do not need a response
  2. If consuming a long running web service or don’t need a response consider calling the web service asynchronously
  3. Use the company’s standard namespace:  http://www.YourCompany.com
  4. For web services consumed by multiple clients always provide a method description
  5. For communicating with the web server from the client’s browser through remote scripting calls use Ajax ASP.NET

I         Connection Pooling

  1. Verify that all connections are opened just in time and that all connections are closed as early as possible
  2. Whenever a connection is being opened ensure that the connection will be closed through the use of a finally clause or the Using statement 

J        Grids

  1. For updateable grids that can be IE specific use DHTML data binding for browser independent updateable grids use the GridView control
  2. If the information is read only use a repeater or GridView control 

K      Memory Management

  1. Employ the Using statement when using objects that need to be disposed of quickly
  2. If your object opens external resources implement a Dispose method to close the external resources

L       Asynchronous Pages

  1. Useful when more than 1 database call or long running processes are required
  2. Allows better thread management for the web server
  3. Increases throughput because requests it reduces the amount of time pages must wait to be processed
  4. Speeds up request queue speeding up response times and avoiding 503 “Server Unavailable” errors
  5. Benefits requests that don’t perform lengthy I/O operations and can get in and out of the pipeline quickly

V.    Application Optimization

A      Optimize the frequent code paths

Following the 80/20 rule, 20% of an application’s code typically accounts for 80% of a project’s execution.   When reviewing a project it is important to focus on these frequent code paths, a few examples of potentially long running processes are

  1. Loops
  2. Use of outside resources (DB, I/O, etc)
  3. Type and string management
  4. When possible avoid late binding (use of Object type)
  5. Destroy objects as soon as you no longer need them
  6. Efficiently use Data binding

B       Visual Studio 2005 Code Analysis

Run the Code Analysis on the solution and fix any glaring problems.  Some warnings can be ignored, but many are important to address

C      Other Suggestions

  1. Set reasonable timeouts on SqlCommand objects, web pages, web services, etc
    1. Also, ensure a web page does not timeout before a web service or SqlCommand times out.
  2. Search for potential problem code
    1. Error Handling: On Error
    2. Data Access: ‘SELECT ‘, ‘UDPATE ‘, ‘DELETE ‘, or ‘INSERT ‘
    3. ASP.Net: Response.Write, HttpContext.Items
    4. State Management: Session, Shared (Static) Properties
    5. Miscellaneous: Int16
  3. Search for a few phrases that should exist in your code; if it does not exist ask why
    1. Error Handling: Catch, Throw, Exception
    2. Code/Resource Cleanup: Finally, Using, Dispose, Close, set to Nothing
    3. String Manipulation: StringBuilder, Format, AppendFormat
    4. ASP.Net: Cache
    5. State Management: Cache, Application
    6. Object Oriented: Interface, Abstract, Friend / Internal, Protected, Private

    For more information checkout: http://codebetter.com/blogs/karlseguin/archive/2006/05/18/144881.aspx

 
 

“Everything should be made as simple as possible, but not simpler”

-Albert Einstein

Next Gen Semi Design (part 9) – Risks

Filed under: Platforms,Semiconductors,Technology — Tags: , , , , , , — semanticzen @ 12:23 am

In the last post two posts on semiconductor design I reviewed the risks to Altera and Xilinx due to competition from other platforms, existing competitors, and new entrants. Here I’ll review the risks from reliance on the communication sector (which may finally be a strength for the first time since early 2000) and from ASIC vendors.

Competition from Structured ASICS and ASSP’s

In March 2006, LSI Logic, the first vendor to create a structured ASIC, closed its RapidChip division exiting the structured ASIC business. This was a blow to the EDA vendors who haven’t seen significant growth since the 2001 downturn and have struggled to gain a foothold in the FPGA industry. By shuttering its structured ASIC division LSI conceded that customers are moving to FPGA’s for new products as it is much faster and more economical to initially design a Xilinx (or Altera) FPGA and migrate to the same vendor’s structured ASIC in volume, than design using LSI’s ASIC-based process.

In 2001, Altera introduced their HardCopy® structured ASIC platform and they are now a leader in the structured ASIC market. Altera has a straightforward migration path from FPGA to structured ASIC. They maintain compatibility with the FPGA architecture, but reduce the die size by removing the configuration circuitry, programmable routing, and programmability for logic and memory with fixed wired interconnect. Xilinx has a similar product called EasyPath®.

Reliance on Communications Sector

In 2000, over 80% of PLDs went into communications related equipment. Today that number is just under 50% of sales and steadily dropping. Since 2000 the growth in PLDs for communications end products has significantly trailed other end markets.

In fact, if the growth in the communication sector picks up, like we think it will in 2010 or 2011, this could be a major boost to the PLD market. The other end market segments like storage, industrial, and consumer electronics should continue to see strong growth over the next decade.

Blog at WordPress.com.