Skipping bits

by Dmitry Kirsanov 8. September 2011 11:26

Most of us consider ourselves professionals in what we do. Systems Administrators, Software Developers, whoever else, once we start considering ourselves as professionals, whether it is because others told us so or because we were promoted – that becomes a milestone and an impediment for further development.

Promotion or awe is what puts us into the comfort zone, state of mind when we can easily believe that we are supreme and that will last forever. False sense of security, idea that current state of technologies will stay the same even tomorrow or that we are using the best out of something. And that’s the pitfall.

When you think that you are using only the best features of some technology and that will be enough for today and tomorrow – you are wrong.

So, what this post is about? It’s about the behavior of people who are trying to learn something new, but skip parts they already “know” or won’t need in foreseeable future. First of all, you think you know, and second – you will need the most complicated part of the technology when you least expect it.

As an example – me and WCF, which is Windows Communication Foundation.  During my training  I skipped the security part, as I already knew WSE, I perfectly know Security+ and CISSP, what could be wrong? It took me 2 days to fix a “complicated” configuration of WCF web service at client’s highly secure area. The whole topic would take 3 hours during the training.

File Replacement Utility

by Dmitry Kirsanov 24. August 2011 22:48

Ok, here is another command line tool. This time - for developers who create software made of many components.

Imagine, you have a product which consists of main executable file and multiple dll files. And different people are working on these. And you are deploying it all on multiple machines and never know where it could be hiding. Maybe in some build directories, maybe somewhere else.

So this utility will find all instances of that file and replace with the newest one. Moreover, you can even select the older file, but all files will be replaced by the newest found. Well, there are parameters, of course.

As the searching for files is time consuming, the end result of this utility could be a batch file (.bat) which contains commands to repeat operation. It will take the same source file and put it to the same destinations as during the first run. That way, continuous replacing won't be a problem or take more than a couple of seconds.

So, here it is. Requires .net framework 3.5.

filereplace.rar (5,32 kb)

UPDATE 03/MAY/2016: Updated application to version 1.2.1 - fixed bug when file couldn't be found using the /d switch

7-Zip Converter

by Dmitry Kirsanov 23. August 2011 23:05


7-Zip is the most effective file archive format, which exceeds by far both ZIP and even RAR in terms of compression level. When I realized that a few years back, and when all tests proved I could store more files without the need of buying new and expensive hard drive, that was kind of relief, as I have a huge repository of files. A few terabytes.

You would ask why do I need so much storage, but the fact is – among other trades I am also a trainer, and I need to store my training materials somewhere. And these are mainly not the media files, which are generally well compressed and couldn’t be squeezed further, but documents and images of hard drives and DVDs (iso files and similar). Anyway – something that could be compressed.

The problem was – all these thousands of files were already compressed by ZIP. The least effective but also the most compatible file format. I own a license for WinRAR, so opening any sort of archive isn’t a problem for me, but I didn’t want to either keep old files in ZIP form when I could compress them up to 10 times better, nor convert ZIP files to 7-ZIP manually. No, I needed to convert ZIP files to 7-ZIP automatically.

WinRAR, is quite useful and user-friendly (even though it has one of the worst customer support in software industry), it's compression ratio is not the best, comparing it to less visually attractive free 7-Zip. However, since my precious archives consuming terabytes of data, and hard drives are still quite expensive, especially when you are planning for some redundancy, space becomes more important than graphical user interface of archiver's shell.

However, one little freeware thing that comes with WinRAR is called “RAR converter”, or “rarcvt”. It comes in form of command line utility and is able, using WinRAR, decompress other archives, be it ZIP, CAB, ARJ or even ISO and RPM into RAR. I wanted that functionality for 7-ZIP, but it was nowhere to be found.

So I had to create it myself. I took Visual Studio and in a few hours made what is called now a 7-ZIP converter. This command line utility was tested on thousands of nested archives and proved to improve the efficiency of data storage from at least 1 and up to 99%. Sometimes there were situations when I couldn’t believe my eyes how it was able to repack the ZIP file into 7-ZIP, and the end file was whopping 100 times smaller than ZIP!

I believe that this utility is essential for file server system administrators, as well as for home servers or even personal notebooks, where storage space is quite limited. It does not require installation, but you should have .NET framework 3.5 installed (you already have it in Windows Vista and Windows 7) and, of course, 7-zip. Config file can be edited in Notepad, it has just 3 parameters - the path to 7-zip, path to temporary directory and extensions of archives that should be converted.

Utility finds files by file mask, may convert nested archives (that is - when you have one archive inside of another), can delete the original file after conversion and may set the time stamp of original file to the resulting 7-zip archive.

Well, here it is!

7-Zip Converter Screenshot

7ZipConverter.7z (6,27 kb)

Learn or Die

by Dmitry Kirsanov 1. August 2011 06:28

Sometimes I re-read my old Twitter posts, in which I just memorize some ideas that comes to my mind, in order to write follow-ups here.

Today it is about my First Postulate, which states that once you've stopped learning new stuff - you're dead. So, what do I mean by that and why I am so sure about it?

And I am not speaking about IT training here. It's about everything in life. Don't ever stop asking about everything and anything new around you, even if it's not interesting. You may be not watching TV, but you should know that there are LCD, Plasma and LED TVs, that there are receivers for 3D movies etc. There shall be no area in which you are complete zero. Learn about modern styles of music even if you don't understand them. Use one hour per week for reading and try some authors or genres you wouldn't do otherwise. This way, you will help your brain to last longer. To survive. Or even bring yourself to a new level of quality. I mean - the quality of life, as all knowledge has this as a primary target - to improve the quality of life for those, who share the knowledge.

I will expand this topic later when will speak about creativity and innovations later on.

Total Recall

by Dmitry Kirsanov 30. July 2011 03:38

Once upon a time, I made a web project together with a project manager wannabe, and for various reasons it failed. After having a disagreement with my ex-partner, we decided to leave the project to him, as I would even pay to see how he would handle that project alone. He didn't, but this story is not about that.

He was not a developer, and still he is not, but he wanted to edit the project according to his beliefs, so he hired a small company to continue development. The project was ambitious n-tier application using all technologies I knew at the moment. And that was 2007. A small company didn't have ASP.NET developer, so they hired one, without telling service buyer that he doesn't have a clue how to do what he is asked to.

During the first months beautiful front end was changed and moved to DotNetNuke. I didn't look into the internals of business logic part, as my ex-business partner didn't fulfill his duty to pay for my share in the company, but I believe changes were merely cosmetic and not the good ones.

Anyway, the story is not about that as well. It was just a preamble.

During 2008 I started to teach people software development and systems administration at New Horizons training center in Riga. I loved that job and enjoyed it better than anything before it. I was the one who established IT training in Riga and quickly enough we defeated the monopolist player in the market, "Baltic Computer Academy" (which is not an academy at all, that's just the name). We even dared to move into their office when they were not able to pay for it anymore.

A part of the job was to discuss training program with the future student, so I, as a trainer, would be able to deliver the most relevant training. And one day I met a guy from the mentioned small company, the one who had no clue about ASP.NET software development.

Now imagine the situation, when you were not even paid for the project that you considered a project of a lifetime (that was naivity, but honest nevertheless) and now you meet someone who could complete that project for your dishonest ex partner. That was fine for me, but then he mentioned that project and said that he was the one who architected the whole thing and created it as it stays now and he just needs to learn some advanced bits of ASP.NET in order to complete it.

Well, at that moment I understood for sure that the project is dead, buried and won't be resurrected ever, no matter what. Because you can get knowledge if you don't have it. You can get experience in process. But if you are spoiled with wrong attitude, which is part of you - don't waste your time.

I haven't seen that guy anymore, as the price for training was too high and his little company didn't want to invest into training. Who knows how it would be if they would.



Month List