ExecuteAs utility

by Dmitry Kirsanov 27. October 2011 17:50

Well, yet another useful command line utility. This one is for system administrators in need to run some command on behalf of another user.

Why bother, if there is a command in Windows, called runas? Well, mainly because it doesn’t accept the password as command line parameter, and also because I wanted to add more features to such simple process.

This is the help text you get when running this program without parameters:

Syntax: executeas.exe /u:UserName /p:Password /x:Priority /d:Domain /a:Affinity /quiet /hide /noprofile /wait /t:60 [program name]
Where t is a timeout in seconds to wait for program completion.
The only required parameter is program name. You can place command line arguments after the program name.

As you can understand, UserName is the user name of target user without the domain name,
Password is his password,
Priority is the priority at which you want this program to be executed (1 – idle, 2 – below normal, 3 – normal, 4 – above normal, 5 – high),
Domain is the domain part of the user name, if needed,
Affinity is how many CPU cores you’d like to use,
Quiet won’t produce any output,
Hide will hide the target program, so it will not be displayed to user,
NoProfile means that profile of target user won’t be loaded,
Wait will wait until the target program will be completed – useful when running from batch file.

So, here it is and have fun!

As  always, .net framework is required for this program to run. This time it’s .net 3.5, which is installed by default on Windows 7 and is available as feature on Windows Server 2008.

ExecuteAs.zip (3.99 kb)


by Dmitry Kirsanov 20. October 2011 00:49

Imagine, that you’ve just made a revolutionary change to the project of your life. You’ve spent hours on it and pretty much sure you won’t repeat that the same well if you would lose todays changes.

So you back up your files using file synchronization utility which synchronizes your files with online storage. Live Mesh, for example.

And first thing you see when synchronization of your now-so-precious work folder starts – “Receiving files …”.



What can be done in 12 hours by an average .NET developer?

by Dmitry Kirsanov 19. October 2011 16:49

Have you ever heard about Garage48? That’s an event, which was born in Estonia last year and since then widely adopted by other countries. It’s scenario is such – companies give tasks – “ideas” that have to be coded to production quality in 48 hours. Students are coming to the event and working 48 hours non stop, for food and beverages, and contest winner get’s iPhone.

So, you have an idea and iPhone – now 5 undergrads can make it live, just give them enough hamburgers and Red Bull.

When I heard about it (in the context that one of my colleagues was eager to participate) I wondered what these students would gain from the event? I mean – in my 32 I wouldn’t participate in such event, have no sleep in 48 hours and produce free code for someone. I still didn’t get convincing answer, but from the point of view of the author of “idea”, this is the windfall.

But I’ve got itch to see what am I capable to do in these 12 hours. Having totally nothing but “idea”.

So, I’ve replaced Red Bull with German and Belgian beer, wrote my idea in 3 sentences and sat for 12 hours with my notebook.

I decided to create “URL shortening service”, which had to be functionally better than anything else in the market. Better from my point of view, of course. As I thought about it, and that time was also included in these 12 hours, I wanted this service to have:

  1. WCF backend. So I would be able to create utilities that would add new links automatically, with no user interaction. Also that would allow other tools to use the service and provide additional services.
  2. I would have QRCode for each link. And it would be created automatically.
  3. I could protect link by CAPTCHA
  4. Or by password.
  5. Or require visitor to declare his age, in case link is to age-restricted web resource.
  6. And make links expiring – either by date or redirections count.
  7. Also, I would like users to know where they are redirecting to. But not always. So there would be 4 different ways of redirection. 2 for client and 2 for server side redirection.
  8. I don’t want to have malicious links on that service, so they should be automatically scanned. URLs leading to malicious web resources should be removed.
  9. Overall good web design. Because tinyurl sucks.
  10. Some functions should be only available to registered members, but anonymous could use it as well. However, trusted people would have it unlimited at all.
  11. Engine should be available to 3rd parties, so they could install it and use with their domain name.

That’s pretty much for 12 hours, when there is no base, right? That’s what we say to our customers.

Anyway, in 12 hours of work I had a website which had a name, web design, logo, backend, database, frontend and additional infrastructure up and running in test environment. Debugging it took another 2 hours, and deployment – another 30 minutes.

You can take a look at that service here – https://byte.lv – just make sure you understand it’s beta and some things may glitch. I reserve the right for a bug, yes. Anyway, if you’d like to have this engine working for your company needs – sure you can have it.


P.S. Now imagine having 5 developers working 48 hours - that’s 20 times more than I had!

Legacy of Steve Jobs

by Dmitry Kirsanov 15. October 2011 13:30

When you look at the news line these days – be it LinkedIn or whatever social network or technology news source you are reading, you inevitably see the new breed of articles – “something we should learn from Steve”.

It appears like different authors are using the fact of death of successful and notorious man to push their own delirium into the masses. A small example – “Steve said, that creativity is connecting things together, so that means you should make connections in social networks”. Incredibly stupid conclusion, isn’t it? And in comments to that so called article are comments like “Enlightening!” or “I’m impressed!” or “Even after his death he still teaches us!”.

The crowd is as stupid, as it’s always been.

However, among the “enlightened” by this powerful flow of bullshit, are CEOs and “entrepreneurs”, “visionaries” and “out of the box thinkers”. I guess they are also among those who skyrocketed the sales of Jobs’ biographies at Amazon.



Innovation and Creativity as they are

by Dmitry Kirsanov 9. October 2011 14:22

As a foreword

“It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is the most adaptable to change.” (C. Darwin)


There is a number of characteristics in Innovation which makes this thing rare and hard to swallow for some. One of the keys to understanding innovation is to understand the difference between machine and human being.

Innovation is a process. It’s not your asset or something you have granted. It’s not your new iPhone or any other innovative gadget you may have. Instead, Innovation was the process of designing of that iPhone and making it unique, never seen before thing and array of processes.

Innovation is not solid, it’s rather composite. There are few other things that composes the innovation, and Creativity is one of them.

Another feature of Innovation is it’s antisocial nature. Yes, forget the team spirit, corporate values and read Atlas Shrugged instead. Remember the great recession in USA in 30s? It was mainly because human labor was replaced by mechanisms. Millions of people lost their jobs and that was inevitable. And that was good. And that is the face of Innovation, it’s inevitable consequence, which doesn’t allow you to passively float on the waves of some basic knowledge you’ve acquired long time ago. You need to evolve in order to survive the Innovation.

That’s what we see today. Cloud computing renders IT departments useless. Not completely, because you still need your best specialists, but you could get rid of others. Rapid Application Development tools and techniques helped software development companies to get rid of lazy “coders”. But while IT is suffering the cutting down, some other professions are about to extinct.

Remember conductors in city buses? They were replaced by ticket machines. E-ticket these days. Even those people who were printing and selling the tickets were replaced. Remember regulators on roads? They were replaced by automated lights. Remember cashiers? They are being replaced by automatic cashiers in large supermarkets. Remember… Just think about it.

Who’s next? Lawyers will be substituted by computers before Artificial Intelligence is invented. Bus drivers. Baby sitters. Cooks. Especially cooks. Translators, politicians, journalists – they all are standing in the row, waiting for next Steve Jobs to raise the plank. Waiting to be replaced by computer programs.

So, that was about antisocial behavior of Innovation. However, it doesn’t end here. Not only Innovation hits the society, but also it’s not a teamwork on the first place. Usually it’s something done by a bright individual or a small group of individuals, rather than companies. Yes, innovations are often bought by companies afterwards, but they are born in the garage or in a small café rather than in the cubicle.

So, the Innovation is a process. Quite simple one – first , you have a problem. And you get idea to solve it. And you design the solution. And you or someone else implements it. Simple as it sounds, yet the solution may be of enormous complexity or simple as “all genius things”.

And now we’ve come to the composite nature of Innovation.

There are two most important things you must have to succeed as innovator. Creativity and Knowledge. They are not the only ones, still, you can’t innovate without them. While Knowledge can be acquired through the learning process, (which already renders most of people as non-innovative) and through the personal experience, the Creativity has much more complex nature.

Yet, it may be acquired as well.

Creativity, by definition, is the ability to approach problems in new and unique ways, outside of established ideas or rules.
Have you heard the “outside the box” thing? Some people are calling it “out of the box”, which, in turn, is completely different thing. Well, both has nothing to do with creativity. But be prepared to hear about it during corporate trainings led by incompetent salesmen.

Do something differently, not like anyone else before you. And that would be creative, not necessarily effective. Do it in a more effective way, by applying your skills (which are your knowledge and experience combined) and you’ve just made your innovation.

So, the key to innovation is creativity, right? And you may have doubts on whether you are creative enough. While it’s not necessary that you are, chances are good that your potential is deeper than you think.

The nature of creativity is not solid. While I doubt there is such thing as “natural born creativity”, most likely it’s about early acquired one. Some time during the first year or years of life. So if you are naturally creative and you’ve always been such, that’s achievement of your parents or environment. However, most parents don’t care about raising creative children and it’s usually up to that children to acquire creative behavior as early as possible.

Regarding the natural creativity, I think it may be connected to changes in early life, like relocation, lots of events and impressions. Even listening to wide selection of music counts. But still, I’m in the process of figuring it out with my own child.

So while natural creativity is the strongest among them and while it’s fun to build and exploit, you can’t apply it to yourself now. So we’ll speak more about creativity enhancement techniques for adults.

First, let’s talk about thing called Learned Helplessness. Have you ever heard – “I can’t do it, because I am X, not Y!”. Like – “I can’t do graphical interface, I am a programmer!”, or “I can’t drive a car!”? Sure you did, or even said that. That’s what we call the symptoms of learned helplessness (LH, for short).

Usually that’s when you have feeling that your brain is filled up with knowledge and you simply don’t need to learn anything new. And the reason for not learning, the fake one, is that you can not do that. The truth is – your brain is not filled up. Not even 50%. And no, you can. Unless we are talking about light athletics and you are 50 years old.

Unfortunately, the Learned Helplessness can only be defeated by strong will. If you haven’t done that yet, watch the movie “Yes man” with Jim Carrey. It’s about a man who started to say “Yes” to even weirdest pleas and opportunities. What I mean is – you have to say “yes” when you are about to say “No”. And vice versa – say “No” when you are about to go the “avoid that stuff” way.

Learned Helplessness is the biggest enemy of Creativity, remember that.

The second enemy of Creativity is called the “Comfort Zone”. Have you seen rednecks who lay in front of TV set with bottles of beer and chips? They reside in their comfort zone, nothing is troubling their mind and their creativity is plain zero as well.

However, there is an exception to “Comfort Zone” and that’s what I am calling the “Creative Zone”. There might be situations / environment features / whatever else that puts you to the state of brainstorming. Phase when you generate bright ideas and can work twice more effectively than before.  Personally for me that’s evening in a pub with 0.33l of dark Belgian beer and tablet or smartphone. And indeed, that’s part of my comfort zone as well.

There is a good illustration to the comfort zone problem. Take a look at the “Social Network” movie. The moment when Zuckerberg is sitting with beer and writing his first social website, while others are having party. At that moment, we see that everyone is enjoying their comfort zone excerpt for one guy who is about to become a millionaire soon, even without intention.

How this applies to you? Take a look at your behaviors. Whether you prefer to enjoy social events like darts and ping pong game with colleagues, or you would rather sit and learn new technologies and work on a project which would give you, personally, some uncertain benefit? In first case, you are in the comfort zone – you are spending your free time on pleasure rather than building your skills.

Another sign of comfort zone is when you look around and see a lot of folks who are professionally better than you. Even worse if they are younger. And I am not speaking about being CEO in early 20s, but about being better specialist than you are at the same of younger age. While there is some portion of luck for others to get to positions better than yours, there is nothing but training and experience that makes them a better professional.

So, how to put yourself out of the Comfort Zone? That’s the question. Disconnect from cable network or disconnect all but science channels. Don’t read general news more than once per week (I am not speaking about professional news). Don’t ride with your friends more than X times per Y. Cut your pleasures and devote that time to less pleasant things, like reading books and watching videos. Whatever that will objectively increase your professional knowledge and experience. It’s not for the rest of your life, it’s for now and a year ahead. Don’t forget to look back when that year will pass.

Next thing, which can be either friend or foe, is your Environment.

You should really prepare it for innovation. What’s your cellphone? Is it even smart phone? Oh, you don’t need a “smarter” one, do you? Just go and buy one. And make sure you learn each and every function it has.

Are you still working on Windows XP because it’s “faster” than whatever the current OS is? If you are working in IT, make sure you have the latest stuff. And make sure you understand the difference – read about it, watch training videos. And suck the knowledge out of it.

Look around you and try to realize when and where you could concentrate better. People are different, so I won’t advise on that, but personally, when I need to brainstorm some new project, I am taking my netbook or tablet and go to the night café in the center of old town and in that dim environment there is no one and nothing that could interrupt me from taking 100% of my brain power and putting into the way I need.

And yes, going out of home is also going out of the comfort zone for some. Unless you have your personal cabinet in your house / apartment.

Mindset is the next milestone you have to reach, and it’s the easiest target.

An open mindset is a must have for generating really valuable ideas. You should be very objective at anything and everything. Open to suggestions. Don’t think that something sucks because it sucks. For example, that Nokia phones are worse than HTC and always will be. While it might be true that currently their models lack some features that HTC don’t, tomorrow they may create something better. So don’t refuse their next model just because it’s Nokia. Be objective.

Never say “never again”, don’t reject opinion of younger people or of your foes, if you have any. Stay open to the world and the changes in life. They are not always good, but you should judge on the fact, throw away the prejudice. Seriously. Now.

Besides, the skeptical mindset is a must have. But what skeptical mindset is?
It’s not about doubtful of anything new. Instead – it’s the ability to find holes in otherwise perfect ideas and solutions. While the opposite to fanboy is a hater, the skeptic is somewhere in between. You have to find out the weak points and possible ways to circumvent them, before investing more time and money into something.

I’ve seen many software titles which took many hours of work from their creators, but were totally useless, because they don’t solve any problem. Perhaps because there was no problem on the first place.

Intuition is what should be counted on when you are generating the ideas. While I am not going into talks about unconscious part of the mind, just make sure you don’t discard what your intuition is saying – always listen to it and at least write down your thoughts before they are forgotten.

Now, as I’ve said before, the Innovation is a process of solving the problem. And the problem is solved by someone. You, perhaps. And you have some luggage of experience and your own point of view from which you view that problem. That’s when we encounter the term of Perspective.

A Perspective is the way in which a person approaches an issue, and his background as it applies to the ideas he generates. So that means – try to look at the problem from different angles. Not just from the perspective of solution developer. Also from the point of view of potential user of your solution and perhaps from those who would loose something because of your idea. Usually you’ll have to deal with more than you think about at first.

Trying to analyze things from various perspectives helps gaining a skill of creativity.

Just as I said before, Innovation is a unity of Knowledge and Creativity. However, Knowledge by itself is a topic which shouldn’t be covered here, perhaps some other time. It’s more naturally understandable, though, than Creativity.

One less book in a pile

by Dmitry Kirsanov 2. October 2011 18:35

How many books you have in your current pile? Or do you have a pile of books waiting to be read? I do.

Just now finished the “Human.4” by Mike Lancaster. For the first time I bought a brand new fiction book at Amazon, where by “brand new” I mean something that wasn’t read and recommended by previous generations. You know, it’s not a classical book of Stephen King or some sort of old school Sci-Fi or even something from previous centuries. This one was first published in 2011 and is mentioning things like YouTube, Red Bull, Facebook etc. Overall, it’s between the “13th floor” and “Langolliers” with influence of Matrix. However, it’s rather short and I manager to complete it in two days, since I’ve only began yesterday. Maybe that’s fine for a Sci-Fi novel.

What’s left in the pile? It’s Atlas Shrugged by Ayn Rand, 2 editions – one in Russian and one in English. A girl with dragon tattoo in both English and Russian and two other books by Stig Larsson in English. Also there are Chronicles of Amber by Zelazni and blue beard by Kurt Vonnegut, both in Russian but they don’t count, as I’ve read them already years ago.

Oh, yes, also there is “Como el rio que flue” by Coelho, which is in Spanish, but just like any other book of Coelho it’s not entertaining at all and I read it time after time just because it’s well written.

The point is – don’t restrict yourself in artificial borders, expand!

File Synchronization Utility

by Dmitry Kirsanov 26. September 2011 10:31

Yet another command line utility written to do some useful stuff in the background. This time it is about file synchronization.

It’s quite often that we need to make 2 directories in our local network in sync. For example, you may want to synchronize folders with photos, backup files or even production files of your web application between IIS web farm nodes.

This program utilizes the Microsoft Synchronization Framework, so basically it does very little apart from what Microsoft already provides. Personally, I am using it to pull backups from TFS server on daily basis and to synchronize shared folders among load balancing cluster of production web server. In  both cases utility is running as Task Scheduler task and everything happens in background.

It doesn’t require installation, just unpack it to your utilities folder and it’s ready to go. It requires .NET framework 4 Client Profile in order to run. Another dependency is Microsoft Sync Framework 2.1 (Two components required - Synchronization and Provider Services).

FileSync.rar (114.45 kb)


Installation file, which will also install the prerequisites, such as .NET Framework 4.0 Client Profile:

FileSyncSetup.exe (4.42 mb)

Running Windows 8 on local virtual machine

by Dmitry Kirsanov 21. September 2011 11:06

Just to repeat what I’ve said in my Twitter recently – now you have the ability to run Windows 8 Developer Preview on your VMWare Workstation. One week ago VMWare released Workstation 8.0, which doesn’t crash and indeed works quite well with Windows 8. Microsoft Virtual PC, as well as earlier versions of VMWare, still crashes.

After installation, you may notice that Start menu is changed by what is called Metro. If you prefer the “old” style Windows 7 menu, you can switch to that by switching one setting in Registry Editor.

In case you are using mouse, rightclick the taskbar, choose Task Manager, go to File and choose New Task. Now type regedit and click OK.

In Registry Editor, navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
There will be setting named RPEnabled. Doubleclick it and change it’s value from 1 to 0.

Now enjoy your start menu.


by Dmitry Kirsanov 18. September 2011 23:21

12 hours + 3 bottles of beer = new ASP.NET website with bright future.

That’s for database, WCF back-end and what they call “architecture”. GUI will take couple more hours, but not today. Will show that project this week. However, although it’s purely not commercial, I wonder what it takes from a good developer with dedication to establish something he would be proud of.



Sneak Peek into Windows 8 GUI

by Dmitry Kirsanov 14. September 2011 17:29

Just wanted to show the most interesting part for system administrators about changes in most frequently used functionality. Task Manager and file copy / delete operations. As you may see, Task Manager became much more functional and file operations more ordered.

Although the ribbon in Explorer is not shown, it is here and definitely adds to user experience, but can be removed… When it doesn’t :)

Windows 8 GUI sneak peek, switch to Full Screen for better view.

Month List