A pleasant walk through computing

Comment for me? Send an email. I might even update the post!

(Underrated) Work Skills

I’m not sure what “underrated” means. Or even whether these are truly “skills.” But, this article was interesting, so I synthesized and summarized what the (supposed) CEOs were looking for.

10 CEOs Answer The Question, What Are The Most Underrated Skills Most Employees Lack?

The one “skill” I take exception to was related to email. The CEO argued that a person should be able to find an email--without searching—in under thirty seconds. While I think it’s good and valuable to keep a clean inbox, I think it’s dumb to shortchange searching like that. By searching, I can find an email I need in under five seconds. Isn’t that a better use of my time?

My area for improvement: Organize and lead a team.

  1. Be succinct
  2. Be reliable (manage tasks/deliverables without reminders).
  3. Use elegant humor
  4. Write well
  5. Reduce chatter (inbox zero)
  6. Use lists effectively
  7. Golden Skill Triangle:
    • Figure out what to do (next)
    • Write effective goals (with due dates).
    • Organize and lead a team to execute large scale plans.
  8. Own the job

VB.Net Windows Project to C# Conversion Tools Quick Review

If you’re looking for a thorough comparative review, this isn’t it! But, here are a few tools I looked at for converting a complex VB.NET project to C#.

Convert.NET by fish’s dotNET

  • Cannot be used commercially with buying the (reasonably priced) license.
  • Stand-alone, but can be added as Tool.
  • Other features besides converting.
  • Conversion of project had the most problems of any tool.

SharpDevelop

  • Only 4.4 can convert from VB to C#. Feature does not exist in version 5.
  • Project isn’t very active, because free versions of Visual Studio are much more readily available.
  • Conversion fidelity will work better with .NET 4.5 or older.
  • Better conversion that Convert.NET
  • Free for commercial use.

VBConversions

Instant C#

  • Commercial tool, expensive $159. (But worth it for a paid contract.)
  • Claims near-perfect fidelity.
  • Has free edition for smaller projects, 2000 line project conversion limit.

My choice: VBConversions, because of the better post conversion tools that show where errors are. However, one thing Instant C# did that I like is automatically generate a variable copy when a VB.NET for…each manipulated the iterating variable.

foreach (string field in fields)
{
   string fieldCopy = field;
   fieldCopy = fieldCopy.Trim();
   ...
}

VBConversions marked it with an error, essentially leaving the code with a bug. If I weren’t to check the errors, this could be a problem because the code would still compile.

foreach (string field in fields)
{
   // field = field.Trim(); VBConversions Warning: A foreach variable can't be assigned to in C#.
   string fieldType = "";
   ...
}

In both cases, it would be wise to set up Visual Studio to treat their comments as Tasks, assuming they consistently start with “VBConversions” or  “INSTANT C#”. Then, go through each comment and remove it after evaluation.

Regardless of the tool, professional diligence says to review every error/message the conversion reports.

References

Get rid of the ‘Missing XML comment for publicly visible type or member’ warning

Scroll bars in Blogger <pre> Tags

EDIT

I just discovered the fix below only works in Chrome. Sigh. Poor testing on my part, but is this also poor work on Google’s? I am, after all, using Google’s own “prettify”! What will it take to have scrolling pre blocks???

===============

EDIT 2

Finally! Ignore the code in the main post, and use this.

http://stackoverflow.com/questions/13946182/scrollbars-for-code-prettified-using-google-code-prettify

pre {display:block; overflow:auto; width:auto; white-space:pre; word-wrap:normal;}
pre.prettyprint {background-color: aliceblue;}
pre.console {background-color: black; color: white;}

 

===== DON’T USE THIS CSS, BUT LEAVING HERE FOR HISTORICAL (HYSTERICAL) REASONS======

I guess I didn’t look hard enough. For well over a year, I accepted that my blog’s source code sections would always wrap. I put the code in a <pre class=”prettyprint”> tag, and I had added the following to my template.

image

overflow: auto is pretty standard stuff I’ve used before, and no one pointed me elsewhere. Finally, today, I found the answer on this Stack Overflow page.

http://stackoverflow.com/a/15639868

I needed to include overflow-wrap: normal.

pre.prettyprint {background-color: aliceblue; overflow:auto;overflow-wrap:normal;}
pre.console {background-color: black; color: white; padding: 5px; overflow:auto;overflow-wrap:normal;}

As you can see in the example below, it now adds the expected scroll bar.

  public class LongCode()
  {
    public void PrintLongCode()
    {
      Console.Write("This is some pretty long code that shouldn't wrap so that the reader isn't confused by unexpected line breaks.");
    }
  }