About MeIntegrating BlogEngineTweet Old Post
in Technical - 12 Sep, 2008
by Ajay Matharu - no comments

Greate code is one which will be appreciated by others. You should write a code such that, others have the idea of what the code does just by looking at the code. It should be properly formated, properly aligned, with proper naming conventions etc.

Some tips to write great code,

- Follow your Framework

Use the controls, base classes within your framework.

1) You should use base classes provided by your framework. You should know you framework for that and understand which class is to be used when.

2) Database Abstraction: Make sure you provide proper abstraction for you database, as it contains very critical informations.

3) Follow the best practices: Each programming language have some best practices, so make sure you follow them. You can even have your own practices with which you are comfortable. But you need to make sure they are consistently used.

- Keep your columns narrow

Keeping your code columns narrow helps to easily read the code.

1) Often you would see that the statements are long to fit in a page. You should avoid such statements. You can break long statements, so that they fit into the page without getting the horizontal scrollbar.

2) Long statements are mostly Queries so you need to make sure you break them down such that it fits into the page.

- Break your code into logical blocks

Divide your code into small blocks of code.

1) Functions: Break your code into functions. But that does not mean you break everything in functions. You should write a code block in function when you are going to use that code repeatedly, even if its few lines of code. Also make sure you give logical name to the function. That will help other to understand what the code block does, just by looking at it.

2) Every code you write needs to have some purpose. Make sure the code block that you write severs some purpose.

3) Also make sure one block of code should serve only one thing. So that you can reuse that code block for other things as well.

NOTE : Every code you write serves some purpose. So think before writing any code.

- Comments

Make sure you comment everything. That will help you and even other to understand the code.

1) One comment for each code block. The comment should not be very big. Remember to name the function such that it explains its purpose.

2) Multiple line of comments is acceptable only when the code block is complex. The comment should explain the purpose of the complicated code block.

- Reduce amount of code

Make sure you write only what you want. Try to make your work done with minimum line of code.

1) Remove code which confuses the user. Make sure you write understandable code. Not only others but you ll also have to understand the code later.

2) Also make sure you do not write any unnecessary code blocks. Even remove the unwanted code blocks or code lines which you have commented once you are sure they are not goin to be used. They make the code look shabby.

3) Try to follow naming conventions. Avoid lengthy variable and function names. Also you need to make sure the name should explains the purpose of block.

- Indentation

To make your code look neat and clean you must follow the indentation. This may be very boring part but it makes you code look better.

These are some tips, after following which you can write code that you and even others will love to read. Make sure to have a good presentation by commenting and indentation. Others will love to read such neat and clean code. Also make sure you do not have any unwanted block of code or any unwanted commented code.

in SQL - 10 Sep, 2008
by Ajay Matharu - no comments

Top new features in SQL 2008

- Use Resource Governor to manage concurrent workloads.

Ensure consistent performance by using Resource Governor to define resource limits and priorities for different workloads and enable consistent performance.

- Enforce policy compliance consistently across the enterprise with the Declarative Management Framwork.

Manage your enterprise data infrastructure easily with Declarative Management Framework (DMF). Reduce the time spent on daily maintenance operations by defining a common set of policies for most database operations like query optimizations, naming conventions, backup and restore operations, and index management. Apply policies to many servers for consistent management across the enterprise.

- Reduce storage requirements and increase query performance with data compression and sparse columns.

Reduce your storage costs and improve performance of large I/O bound workloads by using data compression

- Protect sensitive data with Transparent Data Encryption and advanced auditing.

Dynamically encrypt your valuable data within an entire database, data files, or log files, without the need for applying application changes. Minimize exposure for security attacks by using Surface Area Configuration to enable only the services you require.

- Troubleshoot, tune and monitor SQL 2008 instances across the enterprise with Performance System Analysis.

Enable Performance System Analysis by collecting performance data from your system and storeit in a centralized data repository. View reports to benchmark and analyze system performance and health.

- Build high performance analysis solutions with scalability, performance, data mining, and user interface enhancements in SQL Analysis Services.

Drive business intelligence throughout your organization, manage reports and analysis of any size of complexity and empower user by providing powerful visualization.

- Take advantage of improved Performance, usability, visualization, and integration with the 2007 Microsoft Office Suites in SQL Server Reporting Services.

Empowers users to answer complex questions by providing the relevent information through reports with powerful visualizations and rendered in Microsoft Office Word and Microsoft Office Excel. Enable users to create complex reports and share them internally and Externally with customers and partners.

- Integrate location-enabled application through support for spatial data.

Introduction of new Geography data type to store geodetic spatial data and perform opertaions on it. Also introduction of new Geometry data type to store planar spatial data and perform operations on it.

- Accelerate Development

Access data by defining business entities instead of tables and columns with the ADO.NET Entity Framework. Query and retrieve these entities natively within any .NET language with Language Integrated Query (LINQ). Enable developers to work with the logical entity model, and administrators to define the physical implementation of the model as tables and columns.

- Access your data from anywhere

Create flexible, occasionally connected applications that can function when disconnected from the network. Create a next generation of applications that can work on a local data store and automatically synchronize the local store with a central store when a connection is available.

- Store and consume any type of data

Use the new FILESTREAM datatype to manage unstructured data such as documents and images outside the database. Store XML efficiently and enable easy access with XQuery. Improve the handling of temporal data by using new date and time data types.

- Integrate any data

Scale and manage large numbers of users and data with improved query performance on large tables. Optimize queries for data warehousing scenarios, and increase I/O performance with efficient and cost effective data storage. Integrate growing volumes of data from disparate systems with the scalable data integration features of Integration Services. Consolidate real-time data into the data warehouse with Change Data Capture functionality.

- Drive actionable insight

Provide a consistent set of KPIs and business metrics to all users by using the comprehensive and scalable analysis platform fo SQL Server Analysis Services that has intutive acess through Office Excel. Integrated Ata Mining enables predictive analysis so you caninvestigate common issues like forecasting and identifying key influences for decisions, Develop scalable analysis models with enhanced designers that incorporate best practices into design experience, Increce the scale and performance of analysis by using enhanced analytical capabilities and complex comutations and aggregations