Scott Hanselman

How to create a file with a . dot prefix in Windows Explorer

July 30, '14 Comments [19] Posted in Tools
Sponsored By

If you right click in Windows and try to make a new text file with a . period/dot in front of it:

image

Name the file...something like .gitignore, for example.

image

You'll get the "You must type a file name" error.

image

But, rather than typing .gitignore, if you include an ending dot also, like

.gitignore.

Then it works fine.

image

Thanks, Mads, for the tip!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

NuGet Package of the Week: MarkdownLog makes log files much prettier

July 30, '14 Comments [4] Posted in NuGet | NuGetPOW
Sponsored By

While I'm not 100% gaga over Markdown as I know many of you are, I definitely appreciate it's usefulness and it's clarity. Some folks would say I shouldn't rest until every binary document on my hard drive has been converted to Markdown. I say, nay nay. That said, I totally dig MarkdownPad and you should use it every day. It's lovely.

If you don't want to install anything, check out http://dillinger.io and quickly edit some Markdown in the browser.

But, I digress.

Note: Be sure to check out all the NuGet packages of the week! There's more!

The general idea behind Markdown is that HTML is way too complex for 90% of what you need, so rather than <ul> and <li> and all that, why not just express bullets with asterisks? We can all get behind that. There are many other simple Markdown syntaxes that you can learn in a few minutes. Once you've created some Markdown, you can easily generate PDFs, HTML, Word Documents, whatever you like.

Recently I stumbled upon Stuart Wheelwright's article on Using Markdown for Effective Logging over at CodeProject. Here's the first image borrowed from his excellent article where he clearly shows why Markdown is simpler than HTML:

html-vs-md

Stuart has taken Markdown and created a wonderful little library called MarkdownLog. It's a brilliant little idea that one of us should have come up with first! Kudos to Stuart. ;)

[MarkdownLog] is designed to make it trivial to produce Markdown formatted text from an application's data structures. Using just one line of code, a collection of .NET objects can be output as a table or list. And, because the output is Markdown, it can later be converted to HTML for publishing, if needed.

Even better, MarkdownLog is a Portable Class Library (PCL) and can be used with any .NET platform, including iOS with Xamarin. In fact, it's an iPhone app written with Xamarin that compelled Stuart to write MarkdownLog.

Here's one of his first examples. This C# code:

var myStrings = new[] { "John", "Paul", "Ringo", "George" };
Console.Write(myStrings.ToMarkdownBulletedList());

Gives you this simple Markdown.

   * John
* Paul
* Ringo
* George

At this point, you are likely unimpressed. But wait! There's more! There's a whole series of nice extension methods that make it easy to create templates from objects of any shape. Here's another example of his:

var data = new[]
{
new{Name = "Meryl Streep", Nominations = 18, Awards=3},
new{Name = "Katharine Hepburn", Nominations = 12, Awards=4},
new{Name = "Jack Nicholson", Nominations = 12, Awards=3}
};

Console.Write(data.ToMarkdownTable());

This gives you a Markdown table, of course. This looks nothing like an HTML table, but remember, Markdown is source code that can be translated into other formats like HTML and PDF.

 Name              | Nominations | Awards
----------------- | -----------:| ------:
Meryl Streep | 18 | 3
Katharine Hepburn | 12 | 4
Jack Nicholson | 12 | 3

Be sure to explore the full CodeProject article and the home page for MarkdownLog. Think about how you could add this to your existing logging framework and create better logs for tests, builds, anything. Take a look at the HTML render of one of Stuarts's Test Suite Runs and tell me that you want immediately want to get to work updating your old .LOG files.

Here's the rub. As of today, July 29th, MarkdownLog HAS NO NUGET PACKAGE. Therefore we shall shame our friend Stuart and get him to make a NuGet Package. (He's doing it now, he's tweeted.) I'll update this blog post tomorrow when it's done.

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

How to add a keyboard and write in YOUR language in Windows for free

July 25, '14 Comments [26] Posted in Internationalization | Win8
Sponsored By

A lot of people don't realize that Windows supports a LOT of different languages out of the box. After Windows 7 and now with Windows 8 and 8.1, you can add keyboards to dozens of languages without buying or downloading anything. You have non-English keyboards now, today! Even if you just have English Windows out of the box, you can add a Japanese Input Method Editor (IME - a way to enter kanji), or any of a dozen other methods for entering non-English text on an English Keyboard. This is great for writing family back home, letting your teen write reports for Chinese class in Word, and more.

If you know someone who could benefit from knowing this, tell them! I met a woman from Ethiopia who spoke Amharic recently and somehow we got to talking about the unique syllabary (an alphabet of symbols) that one uses to write Amharic/Ge'ez using Fidel (their lettering system). She had used Windows for 10+ years and had NO idea she could write emails, make web pages, and write Word documents in her native language FOR FREE. She had this feature in Windows and never turned it on.

In Windows 8 or 8.1, press the Windows key and type "Add language."

Screenshot (29)

Select one of these options (doesn't really matter which) and then select the language you want to add. There's a lot.

Look how many languages are available!

I'm selecting Amharic. Note that I could also select Tigrinya as well.

Tigrinya

I'm just adding the Keyboard so I can write letters, but many languages also have a Language Pack where I could change the look and feel of Windows itself. This could make Windows more comfortable for the grandparents, so experiment with this and their settings.

Amharic IME

An Input Method Editor lets you type English/Latin letters and output non-Latin characters. For example, I'll L-A-space, and get ላ or H-I-space and get ሂ.

Typically as you type a list of options appears and is narrowed down by your choices. Sometimes these are phonetic (they sound like the language) and sometimes they are just letter combos you'll learn.

 

The Ethiopic IME

The results are awesome though, and it makes Windows just that much more usable for folks who regularly need to switch between languages.

Scott Hanselman

Use the Hotkey "Windows Key + Space" to toggle keyboards, or just press the keyboard that appears in your Taskbar.

Switching languages

Now, go tell your family and setup alternate languages on their PC! I can speak from experience that a great way to make a computer more accessible for a relative (and get a smile) is adding support for their native language(s).

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Parenting Tip: Star Wars Audiobooks, Family, and narrator Marc Thompson

July 21, '14 Comments [21] Posted in Parenting
Sponsored By

The wife and the boys and I are often in the car for 30 minutes or more, heading off to various activities or events. We live pretty far outside of town, and when we need to head into the city, it's almost an hour. While we have lots of music, discussions, and what not, the boys aren't quite ready to listen to the unfiltered news.

 

BetrayalcoverMy buddy Dennis Petersen from LEGO recommended Star Wars audiobooks as a great way to pass the time as a family. I was a little suspicious, as I've listened to a lot of Audible audiobooks and it's been hit or miss. It all comes down to having a good narrator. Also, has the producer of the audio book decided that this would be a voice actor just reading the book or is this a radio production with music, voices, and sound effects.

The Star Wars Random House audiobooks with narrator Marc Thompson are AMAZING. My family and I have listened to nearly 50 hours of them and we still have a dozen and a half to go. These audiobooks strike a great balance between a dry reading (bad) and a the sounds of a movie (over the top). Marc Thompson does ALL the voices himself, and they are spot on. From Jabba to Boba Fett, C3PO to Darth Vader, we are consistently blown away by the quality of the voices. It's not distracting at all and it makes it much easier to follow the story.

You can buy any of the Star Wars audiobooks in Audible format at Amazon or as Audio CDs. You can also get them at iTunes. I recommend starting with the Star Wars: Legacy of the Force Series. The first book is #1 Betrayal. This starts 40 years the battle of Yavin when the first Death Star was destroyed. Leia and Han are married, they have two kids, and there's bunch of cool stuff going on.

Now at this point in the post, the non-Star Wars aficionados amongst you may have already checked out. But let me tell you this. My wife is NOT a Star Wars person. She couldn't care less. She slept through the movies. BUT, she loves these books. We'll get home from somewhere and she'll insist we sit in the driveway and finish a chapter. It's amazing.

The whole family has been having fun with these. It's much better (IMHO) than giving the kids an iPad or a DVD player on a long trip, and it's got us pausing the book and discussion galactic affairs with the 6 year old (who has turned out to be quite the the strategist).

Check out this YouTube video for a sense of the quality of narator Marc Thompson's amazing range. We've gotten to know him very well as a family, we think, while listening to these books.

Related Links


Sponsor: Thanks to friends at RayGun.io. I use their product and LOVE IT. Get notified of your software’s bugs as they happen! Raygun.io has error tracking solutions for every major programming language and platform - Start a free trial in under a minute!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Personal Productivity: Business vs. busyness vs. laziness

July 14, '14 Comments [29] Posted in Productivity
Sponsored By

image

There's an ancient cliché that drives a lot of my thinking about personal productivity. "Excessive busy-ness is a common form of laziness."

Busy-ness in the Tibetan tradition is considered the most extreme form of laziness. Because when you are busy you can turn your brain off. You’re on the treadmill. The only  intelligence comes in the morning when you make your To Do list and you get rid of all the possible space that could happen in your day. - Elephant Journal, 2008

The Tibetan term lelo, as I understand it, begins to describe this kind of laziness.

Kausidya (Sanskrit; Tibetan Wylie: le lo) is a Buddhist term translated as "laziness" or "spiritual sloth".

Alan Wallace explains that kausidya (lelo in Tibetan) refers to a very specific type of laziness, that is concerned only with virtuous activity. Wallace explains from Wikipedia:

[...] lelo in Tibetan, is often translated as ‘laziness,’ but it is much more specific. If a person is working sixteen hours a day, hellbent on earning a whole lot of money with absolutely no concern for virtue, from a Buddhist perspective you could say that person is subject to lelo. A workaholic is clearly not lazy, but such a person is seen as lelo in the sense of being completely lethargic and slothful with regard to the cultivation of virtue and purification of the mind. Our translation of this term is ‘spiritual sloth,’ which we have taken from the Christian tradition, where it is very comparable to the Buddhist notion.

I'm not saying you're lazy so don't get mad quite yet. I'm saying that using "I'm too busy" as an excuse or a reason to not do something important to you, then you might want to give your situation a closer look. I'm saying that sometimes we are busy with work, but not the kind of work we should be busy with.

Sakyong Mipham states: "Speediness is laziness when we use it as a way to avoid working with our minds."

Of course, there's busy people who are literally on fire and being chased by ninjas, I'll give them a pass. But when someone says "I'm too busy" perhaps they are letting you know they are too important to talk to you, or they are just using it as an excuse to not engage. Often I've said in the past that "I'm busy" when I really mean "I'm not really that into your idea to take the time to think deeply about it."

So when we say "being busy is a form of being lazy" we're saying think about what's important, and think about the work you're doing. Is it moving the ball forward? Is it moving YOUR BALL forward. The Ball that you care about?

I have an hour set aside once a week that's for a meeting. The meeting is with myself. No one else comes to this meeting but me. I think about what I'm doing, where I'm going, and what I need to be working on. I use this meeting to think about the business and busyness of my previous week. I think about what busy work I did that was a waste of time, and try to setup myself up for success in the coming week.

My parents and brother are convinced that I'm too busy to hang out or have lunch. I constantly hear "Well, we didn't want to bother you." I'm never too busy for them. Time can be made. It's amazing how quickly a day of meetings (or a half-day) can be cancelled or moved. Days can be cleared and time can be made.

It's easy to get caught up in the chaos of business. It's fun to play Tetris with your Outlook calendar. It's satisfying to pack those productive meetings in and feel important and urgently needed. It's cathartic to delete email and think that getting rid of that email is moving my life forward, but often it's not. Often I'm just on a treadmill, running to keep up. I know this treadmill and my inertia keeps me going.

The hard work is to consciously step off the treadmill, step away, turn around and look at it. What can be removed? What can be refined? In what ways have we taught our bosses or co-workers how to treat us and our time?

I was in Egypt once and the hosts wanted to take me to the Sphinx, but I didn't want to miss a weekend with my sons. They may have thought me rude, but it was about consciously choosing one priority over another. I knew my time and my priorities and made a conscious choice on how I was going to spend it.

In what way are you buying into the idea of being always busy? What are you doing to find balance?


Sponsor: Thanks to friends at RayGun.io. I use their product and LOVE IT. Get notified of your software’s bugs as they happen! Raygun.io has error tracking solutions for every major programming language and platform - Start a free trial in under a minute!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.