Monday, December 23, 2013

Scaling up knowledge workers





Every year I try to spend a month doing things I’m proud of such as developing new ideas, sharpening the saw, and moving pet projects forward. Scaling up knowledge workers is one of those ideas



I’m a knowledge worker, and I want to get the most out of myself that is possible. I call this scaling up, and it’s something I’m passionate about. The tooling for scaling up is in its infancy, so I’m helping to develop it.


Personal Analytics


One of the first area’s I’m developing is personal analytics. Personal analytics answers questions about you, and the first branch of personal analytics I’m exploring is screen time analytics. In this domain I’ve written either sensors, sensor downloaders and/or dashboards:


























Analytics TypeSensor/Data ExtractorVisualizer
Outlook E-mailpsOutlookEmail Analytics
Screen TimeRescue Time AnalyticsScreen Time Analytics
Time UsageTime Usage ReporterTBD


Onenote Automation


I do alot of my writing (and writing is thinking) in onenote, and so I need a onenote scripting capability. To that end, I’ve implemented a oneonote interface assembly, OnenoteObjectModel, and some useful functionality:


  • Clean up empty pages (easily created by accidental key strokes in onenote)

  • Daily Template Insertion



Frequently asked question forum


Developers find most of their answers on stack overflow, but what about questions that apply to a person? For that, I’ve setup a stackoverflow clone called OSQA (Open Source Question & Answer), and I run it at IgQA. So far no users and few questions, but hopefully it will evolve.

IgQA Screen Shot

Friday, December 13, 2013

Igor's Own StackOverFlow - IgQA

UPDATE: This QA site didn't take off for me, but it has since been taken over by spammers, in what I am assuming is an SEO scam. This was a fun experiment. 



I hate having to repeat myself.  That's the reason I started blogging.  Blogs are great for one directional communication e.g. from me to my audience, but don't work well for a community with questions. To help a community ask and answer questions a question and answer (Q&A) site like StackOverflow is awesome, an so  I've created my own Q&A site called IgQA.  This site is implemented using OSQA, an opensource StackOverFlow clone), and runs in the free tier of  open shift.

Wednesday, December 4, 2013

Cool Tools: Rescue Time



Have you ever tried to remember where your time went last week and had no clue?  Rescue Time helps you understand where your time goes by keeping track of what application and web sites you use, and providing analytic over that data. I started using rescue time a few days ago, and can't wait to build up my personal usage data.



Tuesday, November 5, 2013

Soft Skills: Don't Tell Don't Ask

TL;DR: If you ask me any of the questions below I'll say ...  Sorry, I don't answer these questions, but would you like to talk about how my answer will affect you?


  •   Are you quitting?

  •   Is there a re-org?

  •   Are you having a kid? 

  •   Is Igor getting fired?


It's common for a questioner to  pose a question requiring a yes/no answer, with an intent to trap the respondent into disclosing information.  For example, assume Quincy wants to know if Rachel is pregnant, and Rachel is, but doesn't want to disclose that information yet. There are three possible behaviors for Rachel,  lie, disclose or abstain.



Lie:

  Quincy: Are you having a kid?

  Rachel: No

  2 weeks pass

  Rachel: I feel awful for lying but I'm having a kid



Disclose:

  Quincy: Are you having a kid?

  Rachel: Please don't tell anyone, no one should know, but yes.



Abstain:

   Quincy: Are you having a kid?

   Rachel:  Go read this blog post. What you like to talk about how my answer will affect you?



If a respondent only abstains when she wants to avoid disclosing information then the questioner can conclude abstaining is equivalent to disclosing.  To avoid this trap, the respondent must always abstain from answering the question.  Also, a wise respondent will realize the questioner likely has reasonable concerns which they may wish to discuss regardless of the answer given.



So, if you ever ask me such a question, I"ll point you here, and ask if you'd like to discuss how the answer will affect you.

Sunday, November 3, 2013

SaaS: The Genesis Node

This is part of the SaaS series. Any connection to reality will be strictly denied.



"Igor, you know the odds of shipping Reddog on time are slim to none."



My boss and I nodded our agreement as the director of OS development for Reddog continued.



"Every team is sending a volunteer to the newly formed DevOps team. With an expert from each team, DevOps will be an elite, rapid-response team, able to deal with every type of problem in short order. The budget will be wide open, and the DevOps team is authorized to take any action required - are you the man for this?"



I'm a sucker for hard problems - building all new software, powering-up a brand new datacenter, delivering a product critical to Microsoft's success, and shipping by a date that would require a minor miracle.



"I'm in," I said with pride.



The full impact of those two words sank in that evening as Jay, my OS team mentor, briefed me on my new role. "You'll need to respond rapidly and decisively. The more you know, the more successful you’ll be - for example just today we finished our destructive testing, a node will fail after 10,000 formats."  "Here ya go Hun" interrupted our waitress as she gave Jay his usual wink and IPAs.  Jay and I finished up quickly so I could get a good night’s rest before my life in DevOps began.



The air was charged and a half dozen voices were raised as I entered the DevOps command center the next morning.



"Holy shit, someone stole the genesis node!"



"Do you think it was Google, Amazon or a rogue group at Microsoft?"



"Don't know, it doesn't matter - this is crippling, we need to augment our physical security, we should split into shifts and monitor the situation 24/7 while we wait for our new retina scanners to arrive."



I might be new to DevOps, but I know Azure - it is built to handle disaster. At least two nodes must fail per component before Azure even hiccups. Young and cocky I jumped in:



"What's the genesis node? Who cares that we lost a node, we're built to handle disaster."



"Every node except the genesis node," smirked the expert from the fabric team, looking down on me as he continued.



"The genesis node is the node from which all fabrics are spawned. Without a genesis node, no fabrics can be deployed and no fabric can be healed. We can't do development without it and we'll never hit our ship date."



Annoyed, I cut him off “So, reinstall the genesis node."



 He glared at me while throwing the final, deadly punch, "The person that stole this was brilliant. This is our weakest link, a single point of failure. The genesis node is hand-built; it will take us days to rebuild it, assuming we can. We might have to wipe out the datacenter and start again - this could cost us weeks."



Humbled, I gulped my assent, "How can I help?"



Two weeks later, I was on my third cup of coffee trying to keep my eyes open on the midnight shift.



"Igor, you're the OS guy - where did the OS team get a node for destructive testing?"  Bellowed the director of DevOps.



"Uh, I don’t know - let me find out."



It turns out two weeks ago, the OS team requested a node for destructive testing. An ops person told the OS team to take any node they wanted, and they took the genesis node.



With the security threat understood, we cancelled our order for the retina scanners and shut down the midnight shift.



Moral of the story 1: Never attribute to malice that which can be attributed to incompetence.

Moral of the story 2: If you have something as important as a genesis node, put a sticker on it that says “Really, really important, do not touch."

Moral of the story 3: When Jay gives you a seemingly random factoid, ask follow-up questions.


Saturday, November 2, 2013

Soft Skills: Your life, the missing manual

7habitsEver wish you had a user manual for your life?  Imagine how reassuring it would be to know you can look up your difficulties in the table of contents, and read the chapter on how to solve your problem.




For me, that manual is the The 7 Habits of Highly Effective People  and it contains a model which I apply to many of my personal and professional problems and goals.







I use the concepts in this book as the basis of my self improvement and coaching.  To help me internalize the 7 habits, I'm creating video summaries of the key concepts. I'm not done creating all the videos yet but you can find my first summaries at  The 7 habits video summaries.



The habits in all their glory:


  1. Be Proactive

  2. Being with the end in mind

  3. First things first

  4. Seek win, win

  5. Seek First To Understand, then to be understood.

  6. Synergize

  7. Sharpen the saw





Thursday, October 31, 2013

Surface pro stylus replacement and solutions

WP_20131031_010If you've got a surface pro, you're likely resigned to lose your 30$ pen because the pen holder is magnetic, and doubles as the power plug connector.  Today, I installed a low tech, kick ass solution.



This Self sticking pen loop can be installed on to your keyboard in five seconds, and holds the stylus securely.  Once you have the pen loop, you can also look at alternate stylus.



The surface pro is a standard Wacom digitizer so all Wacom stylus work.  I now use the bamboo stylus. It's heftier then the surface pro pen, and feel more like a pen in the hand.  The downsides to the bamboo are that  it doesn't have the magnetic attachment and it doesn't have an eraser.  The self sticking loops solves the attachment problem, and I never use the eraser.



So, next time you lose your stylus, pick up a Self sticking pen loop and a

bamboo stylus.










Saturday, October 19, 2013

IOttie Car phone mount

It seems like I've had a car forever, and a phone forever, but the union of the two was always rocky. I'd always be trying not to rear end the guy in front of me, as I fumble with my phone in the cup holder.



For 20$ you can get a mount that lets you use your phone without taking your eyes of the road. I highly recommend the iOttie One Touch Dashboard Phone mount.  If you drive, and don't already have one of these mounts, I strongly recommend taking one out for a spin.

Friday, October 4, 2013

On the 200$ chromebook

From my wife:




I hate the chrome book - it is completely useless for actually doing anything creative - can you pls get the windows thing and I will install it on the old computer so I can make things





Sunday, September 15, 2013

Soft Skills: On Fools

It's very easy to get worked up about fools. I've both been worked up, and had co-workers on the ledge of irrationality, with a fool as the cause. In my experience most folks classified as fools simply have different priorities and aren't fools - but  that's immaterial for this post.  When dealing with fools, remember to answer the following:



1) Who is the bigger fool - the fool, or the one being controlled by the fool?

2) What is a fool but a wise man's teacher?

Monday, September 2, 2013

Gratweets

I'm cross posting this to my health blog



Twitter it is a tool to let people share frequent simple thoughts, effectively thinking out loud.   Twitter apps exist on all types of computers and phones, letting you share brief thoughts easily.



Gratitude is a feeling acknowledging a benefit you receive.  The more I focus on being grateful the better I feel.   As with most feeling, the more I think about gratefulness, the more grateful I become. To encourage myself to be more grateful, I’d like to write down when I’m grateful.



Twitter and gratitude synergize - Twitter is an easy medium to share thoughts, and gratefulness is a thought I want to have frequently.  I define the term gratweet as a tweet expressing gratitude.



Starting a few weeks ago I've been gratweeting, and I'm already feeling a better. You can follow my gratweets on twitter @idvorkin




Sunday, August 11, 2013

OneNote Modern Pinch Zoom

Onenote settings Pinch ZoomSkip this post unless you're using modern onenote on a tablet with a pen.



TL;DR - On windows 8 tablets with pens,  pinch zoom in onenote is disabled. You can enable it via charms->settings->options->pinch zoom.



I love onenote, and really enjoy using modern onenote on my surface pro. The one feature that kept me from exclusively using modern onenote (as opposed to switching back to desktop onenote) is pinch zoom.



I was bemoaning lack of pinch zoom to my friend in onenote, who told me pinch zoom is implemented, just disabled on the surface pro, and other devices with pens. This disabling was done to avoid accidently drawing when you try to pinch zoom.



I've enabled pinch zoom and everything works as expected except for the case below which is easy to avoid.



If I use the finger menu with my finger, then try to pinch zoom, onenote will assume I want to draw with my finger, and draw a line instead of zooming.  So long as I use my pen at least after using the finger menu with my finger, my next attempt to pinch zoom works.



Happy onenoteing

Saturday, August 3, 2013

Cool Tools: Distributed Source Control Systems (git + hg)

I assume you're already using version control: svn, cvs, or if you work at microsoft source depot (sd)



Summary

If you don't know what git/github are, go download and start using it.  If you use hg and bitbucket, sigh, and switch to git/github.



What is DCVS?

Distributed Version Control Systems (DVCS) are version control systems (VCS) that don't rely on a single central server.  DVCS is designed so multiple people can check in independently while offline and then merge their changes together.



In DVCS systems everyone has a copy of the entire version control repository (repo), instead of just having a version of all the files .  Because you have the entire repo, you can check in at will, and when it's time to collaborate you can push your changes into someone elses repo.



A common question when VCS people come to DVCS is if you're distributed how do you know the version that should ship? Turns out even though everyone has their own repo, there is still a central repo that represents the truth.  Read  Joel to learn more.



The two major DCVS systems,  Git and Hg:

Today there are two competing DCVS systems  git and hg. Git is written by "C" developers,  and hg is written by python people.  The philosophy of these language permeates into these tools.  Hg, like python is "batteries included",  simple, easy to use, hard to get wrong. On the other hand git, like C, is "a fast car with no seatbelts". Fast, powerful, and easy to get wrong.



A few years ago, it wasn't clear which of hg or git would dominate the industry. Sadly today it's obvious git won, and hg will go the way of python - awesome tool, reasonable support, and interop with other systems, but ignored by the enterprise.  While git, like "C" is known and used by everyone.



So, if you're a normal developer, skip hg and use git.



Where to host the central server, GitHub and BitBucket:

As I said in the introduction, even with a DCVS you still tend to use a central server to host the repo of truth.  To meet this need both hg and git have a defacto standard code hosting company. For git, it's github, and for hg it's bitbucket.  Github is the better, and probably one of the contributing factors to the success of git.



Fighting the system, using hg with git:

Now, if you're the kind of developer who uses python for fun, I have a different recommendation. Learn git, just like you know C, but also learn hg. Use hg-git so you can use the hg tool chain on top of git repositories. This lets you interact with the git masses while getting all the benefits of hg.




Sunday, June 23, 2013

Cool Tools: Tree

It's not often an MS-DOS application makes the cool tools list, but tree.com makes my cool tools list.

Tree gives a graphical display of directory structure in a console window enabling you to quickly understand the directory layout.

Cool Tools: Google Reader Replacement: The Old Reader

If you don't know what google reader is, read this.  If you do know what google reader is, you know it is getting decommissioned on July 1st 2013 and you're likely anxiously looking for a replacement.



If so, the old reader is a clone of google reader, which as best I can tell is almost identical to google reader, down to the keyboard shortcuts.



That's my google reader replacement - enjoy!

Wednesday, June 12, 2013

A leisurely stroll down the silk road.

The silk road is an online black market, a place to purchase all manner of illegal merchandise.  I was fascinated by this concept, and decided to check it out.  The most memorable parts of the silk road for me are the gambling and the great customer service.  



Most shady markets have gambling and the silk road is no exception Silk road gambling has two fascinating properties. The first is how the client can trust the vendor isn't cheating, and second is the payout.  To solve the cheating problem, your lottery ticket it your transaction ID in hex (which I assume is unpredictable) and the winning number is specified in the sale item.  For example, if your transaction ID has  last digit of  0xf or of 0xab you win. There are several "lottery vendors" with various ticket prices and payouts.  I don't know how the market settled on the expected value of the payout but in the few lottery sales items I checked out, all had an expected value of -0.03 BTC, which is a actually better than roulette's expected value of -0.05 BTC.



Even though you'd expect a black market to be shady, I've found several sales items with very strong customer focus. I assume this is based on a desire for repeat business and solid reputation.  These sales items explain not just what the product is, but what the product is not, how the vendor deals with mailing snafu's, and why each constraint is placed on the vendor.  I am so impressed I copied in the entire sales item for forged prescription pads:


This is a listing for forged prescription labels. This is a very long posting however this item is a complicated forgery and there is a lot of possibilities and uses for it so please read over the entire post before you order or message me about the item and if you are just checking this out for fun then I recommend that you also read the entire post as it will have a lot of info you will find helpful and in addition this item may indeed be the most interesting item on Silk Road and is one of the older ones as well. After you buy stuff on Silk Road you are going to need a way to carry it. So get a prescription bottle forged in case you get caught with prescription pills. If you get caught by police and cannot show you have a prescription you go to jail and get a felony charge, but with my bottles you can carry any prescription drug and even if the police stop you you won't go to jail. These are like a get out of jail free card! These are also great in case you have a drug test you need to pass you can show your employer the bottles and not get fired. You can also use these to transport your pills through an airport or train station or other transportation station. I have had many sales of these bottles. I had one buyer use them to fool U.S. Customs agents when bringing pills illegally into the country and the label passed! Another buyer had one and the police searched his house with a warrant and found the bottle and ignored it because they believed it to be real it is that good. I have had one client buy a bottle and label off of me and had me back date it to an earlier date to show to an employer when he failed a drug test and needed the bottle as evidence in a court case to argue being fired wrongfully. These are great so that you can fool family members or parents if you live with family or room mates and worry they may be nosy or argue with you using or having prescription meds illegally. These are great for dorm rooms that can be searched. If you are a dealer then you know the risks involved and these eliminate the risks. In addition if you get caught with prescription drugs without a prescription along with the felony charge and jail time you can be ordered by a judge to register as a drug offender. This is a similar thing to being a sex offender. You register and submit the same info, but instead of it being for sex related crimes it is for drug related crimes. They make you submit finger prints and tissue sample and you are in a data base along with other offenders such as drug cartel members and drug smugglers. All it takes is one pill and a district attorney can request a judge order that upon conviction or a judge can make the decision on their own to throw that in.
In addition to prescription pills these labels have an alternative use. This is a use that I invented. I have kept it secret and not disclosed it to avoid others using this tactic, but after seeing the SR community and market believe this will help me and the community in a mutual manner. Many people buy illicit drugs such as MDMA (molly), shrooms, THC and a few others all in pill form currently on SR and the street. This means they come in the form of a capsule. Many of these capsules look professional and could resemble a prescription pill. My tactic I invented was to press illicit drugs to look exactly like prescription pills with same imprint, size and color then smuggle or transport them in prescription bottles with forged labels. The same can be done if you taylor the forged prescription label to match the illicit pill. say for example you purchase MDMA capsules that are purple in color. You simply order this prescription label and we choose a drug to say it is. Such as say it is an allergy medication and put the description of the illicit pill on the bottle and description and mark it as a generic brand. The label will read that it is allergy medication and the illicit pill will match the label. This means you can now carry illicit pills without being arrested. You can even take them on vacation and still use them without having to find a local source or wait for an SR shipment to ship to where you are staying. The only downside is you obviously cannot use them to get around a drug test as drugs such as shrooms and MDMA are not prescription, but you can carry them on planes, and pass a search by police. If you get a DUI and car is searched it will remain a DUI not a DUI and felony possession charge as well. This tactic is very valuable. Imagine being able to carry shroom pills or mollys and not have to worry about being arrested. There is no way for them to expose the capsules as having illicit content inside unless they are cut open and lab tested. A preliminary field reagent test (police do not carry these and have to radio for one after holding you) will not even do much help as it will not state which drug it is but which drug it is not and a will be a long process of elimination that will ruin all the pills as each test will require one pill so it will never be done unless they have solid info that the pills are illicit. When you read and fill out the order form below if you wish to order these labels for this secondary method as opposed to the intended prescription pill method then message me and let me know so we can select which prescription we will cover it under.
Here is how it works. I have the templates for Kaiser prescription labels and blank bottles. You tell me the name you want on the bottle and the medication and boom! I customize and print you 3 prescription labels and send them to you. The reason you get three labels is each label will have a different month on it. When people have legit prescriptions they get a new bottle and label every month so it always looks new. If you have an old label and bottle with an old date it will look suspicious and like you are abusing. This way each month you can remove the old label and put on a new one.
Here is the info I will need form you:
1. Name to be put on the bottle.
2. Medication name.
3. State you are in so I can put the proper Kaiser address.
4. Description of the pill (color, imprint, shape) so I can put that on the bottles as required by law.
5. Number of pills.
*If you are ordering these to get a court charge dropped or get out of failing a drug test and these need to be backdated please include the date to put on the bottle.
These work and I have tested them before. The bar codes and QR codes on the bottle will really scan with your info showing up when scanned. You can even use a smart phone to test the bar codes and scan them with an app and you info will pop up. Proper warning labels will be on the bottle as well. You will not be able to take these to a pharmacy and try to pass them off as your name will not be in the computer, but they will keep you out of jail.
If you do not live near a Kaiser facility that is not an issue. In the United States you are allowed to go anywhere in any state and city to get you healthcare. So it theory you can be very particular and drive or fly one state away or hell across the country to get healthcare (some Americans even go to Thailand and India for healthcare), so it does not have to be local I can help you 100% if you live in the United States. Kaiser has mail order pharmacy refills and I can make the labels look like the mail order ones so if you live far away from Kaiser then it just looks like your meds were filled and mailed from a large refill distribution center. If you live outside the United States I can help 99% of the time with these labels. In contemporary time more and more people travel internationally to get healthcare. Most nations allow people to leave and travel freely and do whatever including get healthcare, so we just label these to look like foreign health care or if your country allows that you ordered your meds online and has them shipped to you. Although an international prescription label is not common it is recognized by most countries and you will be able to use these to carry your meds.
Shipments will be discrete and disguised. After your purchase I will delete the computer file of the label and destroy it along with any emails and info about this to keep it discreet and anonymous. I will ship with delivery confirmation so I will know when you get it and be able to inform you each day how close it is to arrival so there will be no wondering, worrying or waiting while pondering the idea of how much more time. You will always know for sure.
If you have any questions let me know and I will gladly work with you. My goal is customer satisfaction. I can do bulk orders that will be discounted and will always take customs orders, so if you are someone who handles large amounts of prescription pills, buys pills and always has different imprints or has a lot of pills on hand then a custom rate may benefit you.
I frequently get questions from SR users asking if they can order the listing and have each of the labels come with a different medication on each label. The answer is no I cannot do that. The reason is you would be paying the same price however I would be doing the work of multiple orders and you would essentially be paying for one order and getting multiples free. This item is based mostly on the cost of obtaining the prescription bottle and the precision labor time using multiple programs to assemble the label and obtain proper pharmacy info to put on the label so I do not offer that as an option. Plus given how truly valuable these are and what a lifesaver they can be and how they give people the freedom to carry pills anywhere they choose openly I find customers should not mind ordering multiple sets of these if they need to get them made for multiple medications.
------------------
-IMPORTANT-
------------------
These forged labels are not forged Rx pads. I do make and have forged prescription pads on hand, however I only sell them to select customers who I approve to have them. These prescription labels will not get you prescriptions filled at the pharmacy. In addition it is against federal law for any scheduled substance such as opiate pain medication or benzo anxiety medications to have refills, so if you walk into a pharmacy with a prescription label for a scheduled substance that has a refill on the bottle and attempt to get a refill they will instantly know it is fake. On my forged prescription labels that have barcodes on them that scan, yes the barcodes will scan and the info will read the same info that is printed on the bottle, however it will not be in the pharmacy computer system as it is a fake label. It is just like a fake ID will not be in the police computer and can only be used in select ways, these can only be used in select ways. If you walk into a pharmacy with these they will detect they are fake once they are not in the computer. A pharmacy is just as secure as a bank as they know what they have is just as valuable. They have security cameras everywhere and will get footage of your face and your license plate in the parking lot. Not to mention your credit / debit card info if you use that and when they ask for ID for the controlled substance release that many states require they will have your name and ID number. You will be arrested, you will be charged and convicted of a felony. These labels are not for average intelligence junkies to get pills cheaply. Is it not enough for you to have the privilege of SR? In addition pharmacies have computer programs that exchange info with prescribing doctors and check to ensure a prescription s legit. Medications by law must be submitted electronically or by fax in addition to whatever you walk in with. Although these labels may not get you prescriptions filled they are still very valuable for all the reasons in this listing. Being safe from failing a drug test or being arrest proof by police is a very valuable asset to have on you side and a great card to hold in your hand. The only way these will get you pills is if you take them to a new doctor that will transfer over your medication from your old fake doctor to them will get you prescriptions written legitly. Many customers have bought these and taken them to doctors and then walked out with a prescription for whatever medication was on the forged labels they bought from me. Bottom line is these will not get you a fake prescription filled as I only sell fake Rx pads to select people I choose, but will get you a new prescription from a doctor who will take you on as a new patient.
This item has the option to come paired with matching receipts. This is extra to this listing and can be found directly below this paragraph. The forged receipts match the bottle and have the same info on them. They are great to further back up the authenticity of the forged prescription labels. It shows proof of purchase and will have your name and last 4 digits of your credit card on it providing indisputable proof the prescription is legit. The forged pharmacy receipts also have many other handy uses and can be bought on their own for purposes such as creating an alibi, laundering money, getting tax deductions or using it as a doctors note to get out of other obligations. Make sure to visit that listing before you purchase this item as you may want to purchase it in addition to this item. 

If you  want to check out the silk road yourself you can find it at ilkroadvb5piz3r.tor2web.org.   If you intend to gamble or enjoy the customer focused vendors, you should use TOR to access it instead.

Friday, June 7, 2013

What do I do at work?


I work on the Windows Azure compute stack fundamentals. I'm
the lead of the performance team, which is changing focus  to developer analytics and visualizations.   Because I work low in the stack, you don't
usually see my team's work directly, although you feel our impact
every time you deploy or update your service.  Today, I'm
pleased you can get a glimpse of what my team does in Mark Russinovich 's  TechEd Talk.







The entire talk
describes the system my team optimizes. You can specifically see some of the
visualization and analytics my team developed at 1h0m when Mark visualizes the  update
domains walk, and at 1h04m when Mark shows  a hosting environment update.   My team also helps prototype new features which impact performance like the DeltaVHD feature Mark describes.





If you'd like to learn more about Windows Azure or my team, leave a comment.

Saturday, May 25, 2013

Onenote needs a password to your skydrive account error (0xE0000024)

Skip this post unless you're having a problem where onenote starts asking for the password to your skydrive account.  Solution copied from here.



Onenote is my digital brain, and like my real brain sometimes it gets confused :) For example, twice onenote has said the password to my skydrive account is invalid(*), and refused to allow me to re-enter the password, making onenote effectively useless.



The fix in Windows 8 for when this happens again:

 Search -> Settings -> Credentials.

 Select - MicrosoftOffice15_Data....

 Remove



Restart onenote, and you'll now be able to enter your account password.



(*) I think the thing corrupting my credentials is moving time on my machine into the future.


Tuesday, May 7, 2013

Cool Tools: Recuva (File Undelete)

I'm not sure what I did wrong, but before I knew it I'd erased all the photo's on my camera's SD  card before the files were copied to my machine. After several seconds of swearing, and several minutes of panic, I realized there must be an undelete app. I found a free one, and it worked like a charm.



The undelete app is called Recuva,  it's free, and it worked like a charm to recover my erased files.  A  tip for you, when installing this app be sure to unclick "install bloatware" which is bundled with this recovery tool.






Thursday, April 25, 2013

Performance impact of sorted arrays.

Computer performance is filled with unexpected results. This morning on  stack overflow I found  such a result, and decided to replicate it in C#.



Take an array of random integers and sum only the big integers.  Next, sort the array and re-sum the big integers. Does sorting the array affect the time taken to compute the aggregation? Let's code it up:



The results:




Wow, it's 5 times faster to perform this sum over a sorted array then an unsorted array. What's going on? Branch prediction!  If you've never heard of branch prediction check out the stack overflow answer that inspired this post.



You can quickly replicate this experiment using LinqPad and MeasureIt.Net, by loading this file.

Wednesday, April 17, 2013

Getting Caller Information in C# without reflection (AKA: __LINE__ and __FILE__)

When writing tracing code it's very useful to know your caller. If you've used C or C++ you likely combined macro's,  __LINE__  and __FILE__ to implement this capability.



In C# 4.5 there is a better way to solve this problem. By adding attributed function parameters you can instruct the compiler to have your callers supply their calling information.  The code (full source @ bitbucket):

 
public static void TraceMessage(string message,
[CallerMemberName] string memberName = "",
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0)
{
Console.WriteLine("message: " + message);
Console.WriteLine("member name: " + memberName);
Console.WriteLine("source file path: " + sourceFilePath);
Console.WriteLine("source line number: " + sourceLineNumber);
}

static void Main(string[] args)
{
TraceMessage("Hi");
}

Which provides the output:

PS C:\hgs\ig2600_blog\CallerInformation\bin\Debug> .\CallerInformation.exe
message: Hi
member name: Main
source file path: c:\hgs\ig2600_blog\CallerInformation\Program.cs
source line number: 27
PS C:\hgs\ig2600_blog\CallerInformation\bin\Debug>



For those who like to peek behind the curtain, this feature is implemented by having the compiler add the calling information to the call site, which we see from the IL:

.method private hidebysig static 
void Main (
string[] args
) cil managed
{
.entrypoint
IL_0000: nop
IL_0001: ldstr "Hi"
IL_0006: ldstr "Main"
IL_000b: ldstr "c:\\hgs\\ig2600_blog\\CallerInformation\\Program.cs"
IL_0010: ldc.i4.s 27
IL_0012: call void CallerInformation.Program::TraceMessage(string, string, string, int32)
IL_0017: nop
IL_0018: ret
}

Saturday, April 13, 2013

Cool Tools: Text to UML













I've replaced all these tools with the much simpler plant UML:



http://plantuml.com/
























Diagram Type


Input Text


Output Diagram





title Easy to draw Sequence Diagrams





Smart Fellow-> Igor's Blog: Read


Smarter Fellow-> Igor's Blog: Read


Smarter Fellow->Igor's Blog: Leave Comment













[Person|Weight|Speak();Walk()]


[Person]^-[Igor|FunnySocks|Juggle()]










For more complex sequence diagrams I recommend SDEdit.

Sunday, April 7, 2013

DevPreview: Agile Principles Patterns and Practices Part2 II: Agile Design Principles

This post is in devpreview - skip if you're not passionate about this topic, leave comments if you are. 





I read lots, and
often forget what I wrote about.  To help
me remember, I’m going to take notes on my blog. Feel free to discuss what
you've seen in the comments.





Terminology























Term


Definition


Entity


The
"thing" to which principles are applied.


Client


An entity which
consumes this entity .


Dependent


The entity on
which this entity depends to function.










Summary
of Principles





At 10,000 feet, design principles ensure that changes to a software entity, due to bugs or requirement changes,  have minimal impact on clients. 





























Principle


Elevator Pitch


SRP: Single
Responsibility


Entities should
have one and only one reason to change.


OCP: Open Closed


Entities should be
closed to changes, but open to extension


LSP: Liskov
Substitution


Derived entity
must be "substitutable" for the base entity in all regards.





DIP: Dependency
Inversion


An entity should
define the interfaces it requires of dependents. 


ISP: Interface
Segregation


An entity who
provides functionality for multiple types of clients should expose that
functionality via multiple interfaces.










SRP:
Single Responsibility Principle


An entity should
have a single responsibility. This can be tested if the entity can only require
change for a single reason.





You need to use it if:


You're changing your
entity for multiple reasons (e.g. how the objects are drawn, how the objects
are persisted)





Required
Because Traditionally


We lumped lots of
functionality into one big object.





You're
over doing it if:


You've created
separate classes which have never required changes.





OCP:
Open Closed Principle


Changes should only occur at predefined extension points.





You're
need to use it if:


Every time you
change your software, the changes are all through lots of the code.





Required
Because Traditionally


We didn't think
about where software would require flexibility.





You're
over doing it if:


You have extension
points that have only a single implementation.





LSP:
Liskov Substitution Principle


Derived entity must
be "substitutable" for the base entity in all regards.





You need to use it if:


Derived classes
break existing functionality.





Required
Because Traditionally


Derived entities
implemented "is-a" from a structural perspective. Inheritance needs
to be "is-a" from a behavioral point of you - more appropriately
named "acts-as".





Example
Violation:


Square deriving from
rectangle. Square is-a rectangle structurally, but no be behaviorally.  We can't substitute a square for a rectangle
for example, for a rectangle - rect.Height = 3; rect.Width=7; assert(rect.Height
==3) is not true for a square.





Notes


The "key"
for my understanding of this principle is that the invariants break on the base
class, not on the derived class. AKA a Square can be accessed as a rectangle,
but a rectangle cannot be access as a square.





IS-A is behavioral,
not structural!  The better English word
for this is can be substituted, or acts-as.





Unit tests against
the base class will often catch LSP violations.


Another way to catch
these is with pre and post conditions on base classes.





You're
over doing it if:


I don't think you
can over due this principle.








DIP:
Dependency Inversion Principle


Entities should
provide interfaces for their dependents to implement.





You need to use it if:


Your entities
require changes when your dependents change.





Required
Because Traditionally


We implemented
entities directly on the implementations exposed by their dependents.





You're
over doing it if:


You're creating
interfaces for well baked objects in the base classes (e.g. String) and your
software   will not be used cross
platform.





Notes


This is called
inversion, as traditionally, entities simply consumed the implementation
provided by their dependents.  If I had
my druthers would be called "dependency specification".





At the core:


  • No variable should hold a ref
    to a concrete class

  • No class should derive from a
    concrete class

  • No class should override an
    implemented base class method






ISP:
The interface segregation principle


A class can
implement many interfaces, but each interface is cohesive!





You need to use it if:


The interfaces do
not ad-here to the SRP principle.





Required
Because Traditionally


We used to create
interfaces that didn't match individual behavior, but instead created
interfaces to represent an implemented class.





You're
over doing it if:


You have a bunch of
single method interfaces.





Notes:


Clients should not
be forced to depend on a method they do not need.





Fat classes are OK,
but fat interfaces are not





Two separation
methods:





  1. Multiple inheritance of
    interface

  2. Use an adapter to convert
    from type 1 to type 2 (Add example)






Even when a client
depends on two interfaces implemented by the same class, specify the dependency
as two interfaces.





If you expose two
interfaces with similar functionality, repeat the duplication in the
interfaces.  Recall the interfaces will
be used by independent clients, and you don't want to force a change in a
client if their needs have not changed.

Friday, April 5, 2013

Duck typing in C#

There are two types of typing, static and dynamic (also known as duck). In Static typing systems you specify the type at compile time and if your program accesses a field not declared in your type, you get a handy compiler error. By contrast in dynamic typing systems a  type is never specified, and can't be validated at compile time. Thus errors are caught as runtime exceptions.



If dynamic typing is error prone, why would you want to use it? As usual, you'd want to use it because it provides  extra power. For example, imagine you have a list of several objects that implement Quack(). How can you call  Quack on all objects that support it?

class Dog
{
public string Quack() {return "Bark";}
}

class Cat
{
public string Quack() {return "Meow";}
}

class Mouse
{}

var animals = new List<object>() {new Dog(), new Cat(), new Mouse()};



If you've only used static languages, you'd think you need to add an interface IDuck{string Quack();}, and then change Dog and Cat to inherit from IDuck.  Knowing about design patterns, you might prefer to create an adapter to convert to a class that implements IDuck.  On the other hand, if you've used dynamic languages, you don't care. Instead of adding an interface, you use Duck Typing.  Duck typing gets it's name from the old adage - if it walks like a duck, and talks like a duck,  it's a duck.  C#4.0 added the duck typing feature which you can unlock via the dynamic type.  You can solve our earlier problem problem of collecting quackers like so:



var ducks = animals
// Enter the dynamic type system.
.Cast<dynamic>()
// Remove objects that can't quack
.Where(x=>x.GetType().GetMember("Quack").Length > 0 )
// return to the static type system.
.Select(x=>new {Quack = x.Quack()});

// Write the different quacks to the console.
foreach(var d in ducks) Console.WriteLine(d.Quack);



There you have it - duck typing is a powerful way to interact with your objects. Iin C# 4.0 you can mix C#'s safe static typing with the powerful, yet dangerous so use sparingly, duck typing system.

Wednesday, March 27, 2013

Cool Tools:Monitor Utilities

I use 3 big monitors, and use a few tools with them that many people haven't heard of that I strongly recommend. If you'd like to try them - here they are:



F.lux - A tool which darkens your monitors while the sun is down. Several websites claims you'll sleep better if you use this tool when computing at night. I can't validate the impact on my sleep, but I can say I enjoy using this tool, and install in on all my computers.



WinSplit Revolution - A tool which allows partial maximize via nice hotkeys. For example, C-A-9 (upper left  key on the number pad) 1/4 maximizes the current window to the upper left quarter of your monitor. C-A-2 (down arrow on the number pad) 1/2 maximizes the current window to the bottom right of your monitor. This is really handy with 27"  or larger monitors, or 24" monitors in portrait mode.



Leave a comment if you have other good monitor utilities.


Sunday, March 17, 2013

Soft Skills: Focus on outcomes, not positions

If you haven't read Getting to Yes,  I highly recommend it, it had a drastic positive effect on my negotiation skills.





For me, the key point of Getting To Yes is to focus on outcomes not positions.  Outcomes are what we want to accomplish, for example  "getting something to eat".   Positions are a single concrete instantiation of that outcome, for example "getting a cheeseburger at Burger King".  





A problem with humans is we often get very attached to achieving our position, even though there are several positions that can achieve our outcome, many of which will make other people happy.    When we get in a fight with someone it's usually because we have incompatible positions, not incompatible outcomes.  If we can refocus our interaction onto achieving outcomes,  we can usually find a position that can make everyone happy. 





A few days after reading Getting To Yes, I was at the cafeteria and had an excellent opportunity to practice what I'd been reading:


  


Igor: "Can I get a coffee?"


Barista: "Sorry - we're closed, we won't open for  20 more minutes"


Igor: *Smile*


Igor: "I see you're closed, but can I get a coffee anyways?"


Barista:  *Confused Look*


Igor: *Smile*


Barista: Sure.

The keyboards I use

Keyboards are a personal thing, but people often ask me the keyboards I use.  I'm a heavy computer user, I've tried lots
of keyboards and these are the ones I've settled on:






Desktop Keyboard: Microsoft Sculpt Ergonomic Desktop (L5V-00001)
 - My *new* desktop keyboard, the keyboard I use for 8 hours of typing.  Uses a custom wireless dongle, and has a removable number pad.  Very sleek, I wish there was a little more key travel, but I think after a bit of use I'll prefer it over the Ergo Desktop 7000.







Portable  Keyboard:  -   Goldtouch Go2Mobile - A fully adjustable (like crazy adjustable), really comfortable, and relatively portable keyboard.  I say "relatively portable" because the keyboard can fold up so it fits in your bag,  but it's still bulky and weighs a pound.  I only bring the keyboard with me if I plan on typing more then 30 minutes.  A non-obvious advantage of bringing a portable keyboard is you can put your laptop on a raised surface so you can type without having to strain your neck looking down at the screen.







Media Center Keyboard: Logitech K830 - An awesome back lit keyboard with built in trackball. If your considering the cheaper logitech K400, don't, it's got a very difficult to use trackpad and the keys are in strange positions. Do yourself a favor and get the K830.



Happy Typing - leave a comment if there's an amazing keyboard I need to try. 




Saturday, March 16, 2013

SaaS: Save the Souse

This is part of the SaaS series. Any connection to reality will be strictly denied.



Internships are best approached as a long-term field trip. You should plan to be exposed to new things, spend some time out of your comfort zone, and, by all means – use the buddy system.



My buddy’s name is Biff.



As our eye-opening experience learning to savor soup while sipping scotch revealed, not only did we  learn a lot of technical skills during our Microsoft internship, but we also learned key life skills.



On the topic of life, Biff loved life.  Biff also loved drinking, and loved driving – and – while sober, he had no trouble understanding that flirting with drinking and driving would ruin his relationship with life.  But, as I learned that chilly Seattle fall,  Biff’s sound judgment disappeared at quickly as the scotches – and was replaced by a foolish desire to drive drunk.



As an engineer, or perhaps as a foreshadowing of my future role as development lead, I'd devised a structural solution. When we went to parties, Biff got to drive us there, then I'd take his keys, savor my one and only one IPA and then be in charge of getting us home. The buddy system had thus far proven to be 100 proof effective.



However, one day as we arrived at a party, I was distracted by a redhead and made a beeline to bask in her presence. Thirty minutes later, I had come to see two things: the redhead had no interest in me and Biff had already seen the bottom of four scotch glasses.



I couldn't do anything about the redhead, but I could try to reason with Biff.  Turns out, he was even less receptive to my ideas than the redhead.



ME: Give me your keys!

Biff: Burp.

ME: Dude, give me your keys!

Biff: Man, chill, I'm good, I can drive.

ME: Look, just give me the keys.

Biff: Look, if you think I'm drunk now, you should have seen me driving last Friday, I couldn't even walk a straight line.

ME: Here's the deal, give me your keys now, and if you can jump off that balcony AND be OK, I'll give your keys back.

Biff: Really? I jump and then I can drive home?

ME: Deal.



At this point, Biff surrendered his keys and leapt off the third story balcony which caused everyone else at the party to freak out. The two guests closest to me had a particularly colorful conversation:



Partygoer 1: Holy Shit – Biff jumped off the balcony!

Partygoer 2: Oh my god! Is he dead? Is he hurt?

Partygoer 1: Get a flashlight





Since Biff and I go way back, I was able to keep my calm as everyone else freaked out. See,  I know Biff was basically the judo champion of a small country. He’s  incapable of turning down a challenge to leap off of tall buildings or scale tall fences. While our fellow partygoers were stumbling around looking for a flashlight and trying to find the number for an ambulance, I casually unlocked the front door and wished Biff could watch the commotion with me.



Three minutes later, Biff crashed through the front door with a gleaming smile as if he'd just pulled off the big finish at a magic show.



Biff: Tada! I did it – give me the keys, I can drive.



The party guests around us exclaimed in utter befuddlement: “What? Jesus, you should have died!” They pleaded, “Igor - do not let him drive! Keep his keys!”



Morale of the story 1: Do not drive drunk, I don’t care how well you did it last time you were drunk.



Morale of the story 2:  Keep your friends safe – be creative if you can, throw them out a window if you must, but your obligation is paramount.

Saturday, March 2, 2013

Powershell One Liners

Instead of making a post every time I stumble upon a cool powershell one liner, I'll combine them all in this post. If you have a better one liner for my tasks, please comment.





Kill a process by name (In this case Jenkins).

 Get-Process | ? {$_.Name -like 'JenKins' }  | Stop-Process



Delete all Duplication Downloads (I usually run it first without the del paramaters)


 dir  -r  | ? {$_.Name -like '(1)' }  | del



Powershell 3, Where/ForEach hack - allowing you to specify properties sans an anonymous expression.

 dir  -r  | ?  Name -like '(1)' 



Restart Explorer (often auto-hide of taskbar gets stuck, restarting explorer fixes it.)

Get-Process | where name -eq explorer  |kill ; explorer



Find Who's hogging memory

 Get-Process | sort "VM" -Des | Select-Object -first 10



Set current time  forward 4 hours

 set-date ((get-date) + [TimeSpan]::FromHours(4.0))



Get my son's age in weeks

 ((get-date) - (get-date 4/22/2010)).TotalDays/7



1-Liners relying on  Power Shell Community Extensions (pscx)



Load pscx

  Import-Module Pscx



Load the VS environment:

  Import-VisualStudioVars 2012



Put stuff on/off the clipboard:

  PS C:\hgs\igsmilebox> dir *ts | Out-Clipboard

  PS C:\hgs\igsmilebox> Get-Clipboard





Get Time since last reboot:





PS C:\Users\idvor_000\SkyDrive\Documents> uptime





Uptime                                                         LastBootUpTime


------                                                         --------------


6.19:20:27.1723192                                             4/27/2013 10:01:13 PM





Wednesday, February 27, 2013

SaaS: Save the Soup!

This is part of the SaaS series. Any connection to reality will be strictly denied.



"Are you insane?" I half shouted at Biff, my college roommate. We had just finished our Operating  Systems midterm and were lounging at “The Bomber,” our college pub. Biff suggested we both do our last internship at Microsoft.



I had no desire to work at Microsoft, the largest software company in the world back then.  At that point in my career the largest company I’d worked for had 200 employees, and my idea of process was running down the hall asking everyone if they agreed.    But, Biff sold me with his pitch “Look, MS will give us an apartment, a rental car, hell – they will even pay for our gym membership. We can cook awesome meals and get drunk whenever we want. Plus, Seattle has oceans, mountains, world class fencing and bikes everywhere – you’ll love it”. Biff knew how to convince me, so he paid for my IPA and we stumbled out of the pub with our next adventure glittering in our eyes. Seven short weeks later, we’d arrived in Seattle.  Even the trip from the airport to our intern apartment was awesome. You could see the mountains as you drove across lakes, and bike riders were everywhere.



The first night in our apartment, Biff decided to make good on his promise of cooking and getting drunk. Biff began a complex preparation of soup and sent me off to the liquor store for a bottle of cheap Scotch. Let me explain – internships are where you turn theory into practice, not just for technology, but also for life. For example, up to this point, I'd had few experiences with hard liquor nor with drunken foolishness.



Back from the liquor store, Biff was working on the soup. “Good, good you’re back,"  he said. “Pour me a shot.” And so it continued, Biff carefully adding  ingredients and adjusting  the soup, and intermittently saying, “Good, good” and pouring us both a shot. The fun continued for several more rounds of soup adjustments, when Biff started to turn a shade of green and disappeared. Conveniently, I’d been drinking along so I didn’t care about Biff while I finished making the Soup.



A few minutes later I heard a long moan, and went to the bathroom to investigate. Relieved to find Biff on the floor in front of the porcelain throne instead of on it, I was still trying to wrap my head around the situation when Biff groaned “I’m going to die” and curled up in agony.



“I’m going to die, call 911”. Biff moaned again.



Not wanting to report a dead intern to my new employer, I quickly dialed 911.



ME: “My roommate thinks he’s going to die, and he’s had a lot of scotch”

911: “How much did he drink?”

ME: “Half a bottle of scotch.”

911: “How about you sir – have you been drinking?”

ME: “I drank the other half.”

911: “Sir, is your roommate responsive?”

ME: (always the engineer) “When I kick him, he groans.”

911: “Sir, he’s what we call ‘drunk.’ Cover him with a blanket and let him sleep.”



Following the 911 dispatcher’s advice, I threw a blanket over Biff, staggered to my bed and crashed.



The next day at 11 a.m., Biff woke up me up in a frantic state. While I was trying to shake the hangover out of my mind Biff was utterly distraught and begged - ‘oh my god, I fell asleep, the soup – did you save the soup?”