Lets Learn

Opinion Matters

Archive for January, 2011

Question # 3

Posted by Ankush on January 28, 2011

Very simple question, what happens internally when boxing and unboxing happens?

comm..on guys lets hear what you have to say on this one!!!!!

Ans:

Boxing always creates a new object and copies the unboxed value’s bits to the object. On the other hand, unboxing simply returns a pointer to the data within a boxed object: no memory copy occurs.

Source:http://msdn.microsoft.com/en-us/magazine/cc301569.aspx

Advertisements

Posted in Questions | Leave a Comment »

Question Of the Day # 2

Posted by Ankush on January 27, 2011

Thanks for reading and participating in this series. I received several emails this to be made a 2 day event so from now onwards I am going to post the question in every 2 days. In case, if you also have any interesting question and would like to get it answered  here, you can email that to me @ ankush.bhatia@live.com and I will post it here!!

So, here comes the another one.

Consider a scenario, you are designing a scientific application (ex: scientific calculator) and you need to handle the very large numbers. How would you design your application to handle this situation. As there is no datatype in .net which can handle very- very large numbers and its calculation so what approch would you take to resolve this. My application is targeting .net framework 2.0.

Keep thinking!!

Answer:

So as you may be aware that .net framework 4.0 already provides a datatype  BigInteger to hold the very large numbers.

http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx

If you have to implement this at your own, you can use positional notation system.

Have a look at there for the complete implmentation :http://www.codeproject.com/KB/cs/biginteger.aspx

 

Posted in Questions | 2 Comments »

Troubleshooting Basics # 1 : Fusion

Posted by Ankush on January 26, 2011

Have you ever come across such a scenario where  .NET assembly is not getting loaded for some reason or it is getting loaded but not showing up the latest things which you added in the assembly. For some reason, it still loading the older assembly.

So how would you troubleshoot this scenario.  I have taken number of .NET interviews and this most of the times goes unanswered so I thought I would write a small post about it.

So how would you to troubleshoot this..There are number of tools which you can use here but today I am going to discuss about a very basic one..Fusion Log

So, what is fusion,Fusion is a process to identify and load the assemblies requested by the .NET application. Now this process can be recorded

and luckily .NET framework comes with a tool that allows you to record the loading process. It records the following

information:

  • Which assembly was requested
  • The location from where it was loaded (It records the complete probing process)
  • any errors
  • etc..

how it works:

Simply go to .NET command prompt and type fuslogvw.exe and enable the log.Basically you need to specify the location to keep the log etc..Once done, run any .net app and check the logs.
It will create the log for each .NET assembly it loads. It will tell you how it probe the assembly.

lets say you don’t have .net framework command prompt, still you can enable it by using the registry editor.

Create a log folder (default: C:\fusionlogs)
Add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogPath and set it to the log folder
Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogFailures to 1
Optionally set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\ForceLog to 1
Optionally set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogResourceBinds to 1

For more information, visit: http://msdn.microsoft.com/en-us/library/e74a18c4%28v=vs.71%29.aspx

Try this tool and see how it can helps you specially debugging the problem of loading .NET assemblies.

next I am going to talk about the problems related to the file system and registry while working in .net application…any guesses????

Posted in Troubleshooting Basics | Tagged: , , , , | Leave a Comment »

Question of the Week # 1

Posted by Ankush on January 24, 2011

Hello Everybody, This is a fresh series of questions I am starting on .NET. Anybody can participate/post questions in this section!!!!

So here goes the first one………Why foreach requires IEnumerable, not IEnumerator in .net framework?

I mean, I know that they are 2 different interfaces and I need to implement IEnumerable in order to get IEnumerator but why not it was implemented to get IEnumerator directly? Any reasons/thoughts/views?

Please post your thoughts!!

Answer: Though Vikas has already summarized it very well (check the comment section) but here is my version of it.

So I asked “why have two interfaces, if the sole purpose of one is to give you the other?”

Here is the answer : so that you can have more than one enumerator going at the same time.

Think of an enumerator as a “bookmark” that you can move forwards through a document. If a collection just implemented IEnumerator, then the collection could only have one bookmark at a time. If there were ten consumers who all wanted to iterate through the collection, they’d have to arrange amongst themselves how to get access to the bookmark without stepping on each other.

Collections that implement IEnumerable are saying “here’s a factory that makes as many bookmarks as you want”. You can get a fresh one any time you want without worrying that someone else’s iteration is going to ruin yours.

HtH
Ankush

Posted in Questions | 5 Comments »

SharePoint 2010 Learning Resources

Posted by Ankush on January 20, 2011

Change always brings something new. As I have moved (ore moving) from desktop dev to web developer; I am compiling a list of resources which is helping me a lot.
For all the developers, here is the SharePoint 2010 learning resources:
I. Getting Started Screencast Series
A series of entry-level screencasts by Microsoft SharePoint MVPs that lets you take advantage of an 11-module e-learning course at no cost! The course covers everything you should know as a new SharePoint IT Pro, from basic features and terminology to how to build and maintain a server farm and manage performance.

II.
SharePoint 2010 Advanced IT Professional Training
For IT professionals, SharePoint 2010 offers enhancements to drive productivity, a scalable unified infrastructure, and flexible deployment. SharePoint 2010 Advanced IT Professional Training is a deep technical learning series for current SharePoint professionals who are
looking to upgrade their skills to SharePoint 2010.
1.    Core Architecture of SharePoint 2010
http://technet.microsoft.com/sharepoint/ff677987.aspx
2.    Security in SharePoint 2010
http://technet.microsoft.com/sharepoint/ff677987.aspx
3.    IT Pro Management in SharePoint 2010
http://technet.microsoft.com/sharepoint/ff678027.aspx
4.    Upgrading to SharePoint 2010
http://technet.microsoft.com/sharepoint/ff678049.aspx
5.    Enterprise Search in SharePoint 2010
http://technet.microsoft.com/sharepoint/ff678049.aspx
6.    Content Management in SharePoint 2010
http://technet.microsoft.com/sharepoint/ff678049.aspx
7.    Composite Solutions in SharePoint 2010
http://technet.microsoft.com/sharepoint/ff678052.aspx
8.    Communities in SharePoint 2010
http://technet.microsoft.com/sharepoint/ff678053.aspx
9.    Business Intelligence in SharePoint 2010
http://technet.microsoft.com/sharepoint/ff678054.aspx
III. Enterprise Search IT Professional Training

This course is designed to teach the basics of enterprise search, how search management fits within their organizations and how to get the most out of Microsoft SharePoint Server 2010 search and Microsoft FAST Search Server 2010 for SharePoint.
2.    Windows PowerShell for Search
http://technet.microsoft.com/enterprisesearch/ff961002.aspx
3.    Deployment and Scalability for SharePoint 2010
http://technet.microsoft.com/enterprisesearch/ff961003.aspx
4. Monitoring and System Management for SharePoint 2010
http://technet.microsoft.com/enterprisesearch/ff961004.aspx
5. Search Reporting and Analytics for SharePoint 2010
http://technet.microsoft.com/enterprisesearch/ff961005.aspx
6. Connectors and Using the Business Data Connectivity Services in SharePoint 2010
http://technet.microsoft.com/enterprisesearch/ff961006.aspx
7.  Configuring User Interfaces for Search in SharePoint 2010 and FAST Search Server 2010 for SharePoint
http://technet.microsoft.com/enterprisesearch/ff961007.aspx
9.Advanced Search Security for SharePoint 2010 and FAST Search Server 2010 for SharePoint
http://technet.microsoft.com/enterprisesearch/ff961009.aspx
10.People Search Administration and Management for SharePoint 2010 and FAST Search Server 2010 for SharePoint
http://technet.microsoft.com/enterprisesearch/ff961010.aspx
11. Advanced Deployment and Scalability for SharePoint 2010
http://technet.microsoft.com/enterprisesearch/ff961011.aspx
12. Upgrading from SharePoint 2010 to FAST Search Server 2010 for SharePoint
http://technet.microsoft.com/enterprisesearch/ff961012.aspx
13. Deployment and Scalability for FAST Search 2010 for SharePoint
http://technet.microsoft.com/enterprisesearch/gg213844.aspx
14. Advanced Deployment and Scalability for FAST Search 2010 for SharePoint
http://technet.microsoft.com/enterprisesearch/ff961014.aspx
15. Linguistics for FAST Search Server 2010 for SharePoint
http://technet.microsoft.com/enterprisesearch/ff961015.aspx
16. Relevancy and Ranking for FAST Search Server 2010 for SharePoint
http://technet.microsoft.com/en-us/enterprisesearch/ff961016.aspx
IV. SharePoint Silverlight Snacks
o     Experiencing the Microsoft SharePoint 2010 User Interface
http://www.microsoft.com/learning/_silverlight/learningsnacks/SP10/snack01/Default.html
o     Managing and Troubleshooting with Microsoft SharePoint Server 2010
http://www.microsoft.com/learning/_silverlight/learningsnacks/SP10/snack02/Default.html
o     Developing Solutions with Microsoft SharePoint 2010
http://www.microsoft.com/learning/_silverlight/learningsnacks/SP10/snack03/Default.html
V. SharePoint Server 2010 Resource Centers
Basics
o    Governance
o    Updates
o    What’s new
Capabilities
o    Workflows
IV.       SharePoint TechNet Virtual Labs
In these full-featured TechNet Virtual Labs you connect remotely to a SharePoint Server virtual mahine for a hands-on lab.  You get a downloadable manual and a 90-minute block of time for each module. You can sign up for additional 90-minute blocks any time.
I hope these resources will help you a lot!! In case of any feedback, let me know!!!

Posted in SharePoint 2010 | 4 Comments »

Quick Update

Posted by Ankush on January 20, 2011

It’s been over two months since I blogged. Just wanted to keep this very short and let you know that I am moving to SharePoint team and has started learning about SharePoint 2007/SharePoint 2010. From the day 1, I was a windows developer so this will take some time for me to adjust and grasp all the new technologies but I’ll get there!!!

So, how does this helps you?

a) I plan to explore the SharePoint server object model in detail, writing lots of code samples, as a way of filling in gaps in my knowledge.  I’ll be blogging those snippets
b) This forum is always open to any questions related to technologies so that we all can contribute and help
c) Still passionate about Open XML and Office Programming so you will see some more post on them as well and they will CONTNUE!!!!

SO WHAT DO YOU SAY!!

Keep learning and do leave a comment!

Posted in General | 1 Comment »

 
%d bloggers like this: