Forcefully delete an assembly from GAC
Very often during development we try to remove an assembly from GAC. However, due to many reasons the assembly might not get deleted and the above screen is displayed. There is no easy way to remove this assembly as it may be locked due to numerous reasons and one might need to break his head identifying the proper reason behind this.
However, there is an easy solution to this problem.
Open “regedit” and navigate to “HKEY_CLASSES_ROOT\Installer\Assemblies\Global”. In this location one can find the list of all the assemblies which are registered in GAC. Delete the appropriate entry from this list. Now you can delete the assembly from GAC as well. This is a simple trick to get rid of that stubborn assembly which was stuck in your GAC.
I hope this simple trick will save many man hours !
Delete .svn folders recursively
Very often scenarios crop up when we want to clean our mammoth source code repository without having to export it elsewhere. I was looking for an elegant way to delete hidden .svn folders which are created by tortoise svn to keep track of the repository state on the client. I found this site which provided an elegant way which precisely meets my requirement.
I modified a minor glitch in the command to enable directory deletion from the folders which contain a space in name.
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G"
Link: http://blog.snakehit.be/2007/08/29/svn-recursively-delete-svn-folders
Run Commands for Windows XP
I found this incredible link to start most of the XP system apps from Run box.
Program Run Command Accessibility Controls access.cpl Accessibility Wizard accwiz Add Hardware Wizard hdwwiz.cpl Add/Remove Programs appwiz.cpl Administrative Tools control admintools Adobe Acrobat ( if installed ) acrobat Adobe Distiller ( if installed ) acrodist Adobe ImageReady ( if installed ) imageready Adobe Photoshop ( if installed ) photoshop Automatic Updates wuaucpl.cpl Basic Media Player mplay32 Bluetooth Transfer Wizard fsquirt Calculator calc Ccleaner ( if installed ) ccleaner C: Drive c: Certificate Manager cdrtmgr.msc Character Map charmap Check Disk Utility chkdsk Clipboard Viewer clipbrd Command Prompt cmd Command Prompt command Component Services dcomcnfg Computer Management compmgmt.msc Compare Files comp Control Panel control Create a shared folder Wizard shrpubw Date and Time Properties timedate.cpl DDE Shares ddeshare Device Manager devmgmt.msc Direct X Control Panel ( if installed ) directx.cpl Direct X Troubleshooter dxdiag Disk Cleanup Utility cleanmgr Disk Defragment dfrg.msc Disk Partition Manager diskmgmt.msc Display Properties control desktop Display Properties desk.cpl Display Properties (w/Appearance Tab Preselected ) control color Dr. Watson System Troubleshooting Utility drwtsn32 Driver Verifier Utility verifier Ethereal ( if installed ) ethereal Event Viewer eventvwr.msc Files and Settings Transfer Tool migwiz File Signature Verification Tool sigverif Findfast findfast.cpl Firefox firefox Folders Properties control folders Fonts fonts Fonts Folder fonts Free Cell Card Game freecell Game Controllers joy.cpl Group Policy Editor ( xp pro ) gpedit.msc Hearts Card Game mshearts Help and Support helpctr Hyperterminal hypertrm Hotline Client hotlineclient Iexpress Wizard iexpress Indexing Service ciadv.msc Internet Connection Wizard icwonn1 Internet Properties inetcpl.cpl Internet Setup Wizard inetwiz IP Configuration (Display Connection Configuration) ipconfig /all IP Configuration (Display DNS Cache Contents) ipconfig /displaydns IP Configuration (Delete DNS Cache Contents) ipconfig /flushdns IP Configuration (Release All Connections) ipconfig /release IP Configuration (Renew All Connections) ipconfig /renew IP Configuration (Refreshes DHCP & Re-Registers DNS) ipconfig /registerdns IP Configuration (Display DHCP Class ID) ipconfig /showclassid IP Configuration (Modifies DHCP Class ID) ipconfig /setclassid Java Control Panel ( if installed ) jpicpl32.cpl Java Control Panel ( if installed ) javaws Keyboard Properties control keyboard Local Security Settings secpol.msc Local Users and Groups lusrmgr.msc Logs You Out of Windows logoff Malicious Software Removal Tool mrt Microsoft Access ( if installed ) access.cpl Microsoft Chat winchat Microsoft Excel ( if installed ) excel Microsoft Diskpart diskpart Microsoft Frontpage ( if installed ) frontpg Microsoft Movie Maker moviemk Microsoft Management Console mmc Microsoft Narrator narrator Microsoft Paint mspaint Microsoft Powerpoint powerpnt Microsoft Word ( if installed ) winword Microsoft Syncronization Tool mobsync Minesweeper Game winmine Mouse Properties control mouse Mouse Properties main.cpl MS-Dos Editor edit MS-Dos FTP ftp Nero ( if installed ) nero Netmeeting conf Network Connections control netconnections Network Connections ncpa.cpl Network Setup Wizard netsetup.cpl Notepad notepad Nview Desktop Manager ( if installed ) nvtuicpl.cpl Object Packager packager ODBC Data Source Administrator odbccp32 ODBC Data Source Administrator odbccp32.cpl On Screen Keyboard osk Opens AC3 Filter ( if installed ) ac3filter.cpl Outlook Express msimn Paint pbrush Password Properties password.cpl Performance Monitor perfmon.msc Performance Monitor perfmon Phone and Modem Options telephon.cpl Phone Dialer dialer Pinball Game pinball Power Configuration powercfg.cpl Printers and Faxes control printers Printers Folder printers Private Characters Editor eudcedit Quicktime ( if installed ) quicktime.cpl Quicktime Player ( if installed ) quicktimeplayer Real Player ( if installed ) realplay Regional Settings intl.cpl Registry Editor regedit Registry Editor regedit32 Remote Access Phonebook rasphone Remote Desktop mstsc Removable Storage ntmsmgr.msc Removable Storage Operator Requests ntmsoprq.msc Resultant Set of Policy ( xp pro ) rsop.msc Scanners and Cameras sticpl.cpl Scheduled Tasks control schedtasks Security Center wscui.cpl Services services.msc Shared Folders fsmgmt.msc Sharing Session rtcshare Shuts Down Windows shutdown Sounds Recorder sndrec32 Sounds and Audio mmsys.cpl Spider Solitare Card Game spider SQL Client Configuration clicongf System Configuration Editor sysedit System Configuration Utility msconfig System File Checker Utility ( Scan Immediately ) sfc /scannow System File Checker Utility ( Scan Once At Next Boot ) sfc /scanonce System File Checker Utility ( Scan On Every Boot ) sfc /scanboot System File Checker Utility ( Return to Default Settings) sfc /revert System File Checker Utility ( Purge File Cache ) sfc /purgecache System File Checker Utility ( Set Cache Size to Size x ) sfc /cachesize=x System Information msinfo32 System Properties sysdm.cpl Task Manager taskmgr TCP Tester tcptest Telnet Client telnet Tweak UI ( if installed ) tweakui User Account Management nusrmgr.cpl Utility Manager utilman Volume Serial Number for C: label Volume Control sndvol32 Windows Address Book wab Windows Address Book Import Utility wabmig Windows Backup Utility ( if installed ) ntbackup Windows Explorer explorer Windows Firewall firewall.cpl Windows Installer Details msiexec Windows Magnifier magnify Windows Management Infrastructure wmimgmt.msc Windows Media Player wmplayer Windows Messenger msnsgs Windows Picture Import Wizard (Need camera connected) wiaacmgr Windows System Security Tool syskey Windows Script host settings wscript Widnows Update Launches wupdmgr Windows Version ( shows your windows version ) winver Windows XP Tour Wizard tourstart Wordpad write Zoom Utility igfxzoom
Link: http://www.adamsdvds.co.uk/run%20commands.php/
Huge list of productivity tools and utilities
While exploring for CodeRush guides I stumbled across this website. The author has compiled a very good link to various tools and utilities which someone can use to boost his productivity a great deal. The reason I bookmarked this website and I am providing the link here is that it contains almost all the productivity tools which I rely on heavily.
Some of the favorites which I can't live without are -
- slickrun - awesome tool for keyboard geeks like myself
- coderush - great boost to productivity in VisualStudio.NET
- TestDriven.NET - unit test integration with visual studio. Exttremely good.
- SysInternals - An array of productivity tools. Very handy in variety of scenarios.
- WinMerge - A super elegant comparison/merge utility. Integrates seamlessly with SVN. A must have tool.
- HightLight for Windows - nice utility to export code files to html with predefined css templates.
- XMLSpy - Ultimate software for XML documents.
There are many more which has taken my attention. I will be using them in future and if I feel strong enough then I will post my reviews over it.
Source
If you use something that does not constitute the list of utilities as provided in the above link then do comment with the appropriate link to the utility and tell more about it. It might be helpful to me and fellow readers.
Reasons to write bad code !!
Do you write bad code ? I hope not. I also do not write bad code. Are you trying to guess what the topic is about ? Ok here goes the story...
I was new in organization. Probably around 3 months or so. It was like any other day at office. We all were working on our modules. Suddenly something struck me. I saw a very poorly written piece of TSQL Script. The script was meant for data cutover and since the size of database was mammoth so the script was required to be efficient. However, I found so many issues. It was highly inefficient in performance.
Some of the critical issues I found were -
- New variables being declared and assigned unnecessarily where a single base value could have worked with reassignments and manipulations.
- Multiple temporary tables created and dropped for each table under process.
- No error handling or transaction. Single failure would make the database inconsistent.
Luckily, it was our own Dev Db which we were working on and I found this issue before it went to production. The guy who wrote this piece of code was senior to me and was a friend of mine. I talked to him and asked the reason for this inefficient design. He replied promptly saying this is the best he can do. He asked me to redo it if I could do better. I was dumb struck.
I thought why would someone write a crappy piece of code knowingly ? Either the person is incapable of this kind of job which requires a fair amount of creativity, or the person is having some serious issues. I asked him later why he is doing like that. The explanation he gave was even more disturbing.
He told me that he used to be like me once (say about an year ago). He said he was amazed to see other guys writing crappy piece of code which somehow were meeting the functionality but were nightmare for support guys and fellow coders. He further elaborated that now since he is doing the same so he understands the reason. Ahh!! the reason was that they were frustrated and overstressed of the project deadlines and work timings. He said that he releases his stress on the code. I think this is the only way he can take his revenge from the organization for stressing him out.
However, I disagree completely from this kind of approach. I believe that programming is an art and writing good code not just enhances your own skills but also helps you keeping a good practice. If you start writing bad code consistently then you would pick up that way of coding which would bite you certainly in long run.
Another aspect is the attachment with your work. I like to write good code and I make sure that every piece of creativity I apply meets the best industry standards and reflects the level of professionalism I keep striving for. Writing bad code simply because you are stressed out shows that you are not a true professional. There are ways to deal with frustration and anger but this is certainly not the correct way. Having an open discussion with the teamlead and the manager is always welcome. Bending to certain degree for the work occasionally is something that is considered quite common in our industry but if you are being pushed consistently beyond your limits then you can raise the voice instead of writing dirty code.
I learnt lessons from this experience. It would help me certainly to prevent myself from such a mental fatigue and would also prevent me from pushing my juniors to the limit where they start writing bad code !
I am sure you would have encountered such an issue in your organization or might have been the victim of pressure yourself. Feel free to share your experiences.

