Scott Hanselman

I'm stuck in someone's for loop

October 24, '14 Comments [16] Posted in Musings
Sponsored By

This is a rant. More and more I'm finding myself using mobile devices, often on my iPhone, but also desktop applications in Windows and I'll push a button and find myself, as user, stuck inside your for loop.

Not Responding

Have you felt like this? The application locks up and you're stuck. Maybe it's Outlook saying Not Responding as the Curtain of Patience (tm) comes down, or perhaps it's Facebook on your iPhone updating Contact photos. Regardless, it's a for loop over a thousand or a million, or perhaps just one more data item than the developer tested, and you're stuck. Do you shut down and corrupt the data store? Do you wait? How long DO you wait?

Asynchronous programming can be hard, but the tools and languages support it, my friends.

Please don't block the UI.

Have you seen this? Why does it happen? What are you doing to avoid blocking calls? Perhaps it's a better UX pattern, or perhaps it's Reactive Programming?

Sound off in the comments!

Related Links


Sponsor: Big thanks to my friends at Octopus Deploy. They are the deployment secret that everyone is talking about. Using NuGet and powerful conventions, Octopus Deploy makes it easy to automate releases of ASP.NET applications and Windows Services. Say goodbye to remote desktop and start automating today!

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

Video: My non-technical partner tries Windows 10 for the first time

October 23, '14 Comments [20] Posted in Win10 | Win8
Sponsored By

You may have watch my YouTube series on being an effective user of Windows 8 and 8.1. I've made a short URL for you to give to your friends and family http://hanselman.com/windows8. It'll take you to a YouTube Playlist that includes all my best tips and tricks on using Windows. The most popular is "Learning Windows 8 in 3 minutes" but if you're looking to get yourself, or perhaps non-technical Dad and Mom up to date on Windows 8, I recommend they check out "Windows 8: The Missing Instruction Manual." It's calmly paced and explains everything they'll need to know.

A lot of people say "Windows 8 isn't intuitive." That's up for debate, I think, as there's a big difference between unfamiliar and unintuitive. A few minutes of your time and you'll feel a lot more "intuitively" about Windows.

That said, Windows 10 is coming. If you have an extra machine you can sign up for the Preview here. It's very early and I would not put this on your primary machine.

I thought it would be interesting to show my very smart, but rather non-technical wife Windows 10 for the first time. Here's an uncut video of her experience running the first build of the Windows 10 Technical Preview.

I encourage you to watch it, it's rather interesting the way that she discovers "new" features, but also learns about existing features from as far back as Windows 7. If you've ever do a usability test you'll find the interactions fascinating.

And again, do check out and share http://hanselman.com/windows8


Sponsor: Big thanks to my friends at Octopus Deploy. They are the deployment secret that everyone is talking about. Using NuGet and powerful conventions, Octopus Deploy makes it easy to automate releases of ASP.NET applications and Windows Services. Say goodbye to remote desktop and start automating today!

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

Put yourself out there and publish that Open Source project today

October 17, '14 Comments [25] Posted in Musings | Open Source
Sponsored By

I helped write FoolProof Software for WindowsIt's a leap of faith to put your code out there. You have to have tough skin sometimes. Mean people will say it's crap. Many years ago (93-94?) I worked on a piece of software called FoolProof Desktop Security. I was just a few years in the industry full time and working on this cool new project that would keep kids in schools from breaking into Windows machines. I was pretty proud of the work. I did the 16 bit Windows, 32-bit Windows, and DOS Clients (in Turbovision!).

A new employee arrived on the project and a week later, perhaps as a way to prove themselves, they sent email to the whole team with the subject "Top 10 FOOLISH Code Mistakes in FoolProof."

And 7 of the 10 mistakes were in my code.

It's gonna happen, and while it's not OK when folks are cruel, I am accountable for how I take the feedback. I decided to double my efforts and take the valid technical feedback (a lot of my code was poor, I was new) and ignore the tackiness of the message itself.

When you write code you're putting yourself out there, even if no one sees your code, they see the result. It's hard to be a creative, to write, to sing, to act, to code. Coding and producing is a declarative statement and as they say:

He or she who is most likely to make declarative statements is most likely to be called a fool in retrospect.

The code I wrote today was AWESOME. The code I wrote yesterday was CRAP! ;) If it wasn't, I wouldn't be growing.

You likely have some code on your machine you're holding off to publish. Perhaps a private or hidden repository somewhere. I hear several times a week things like "I'm not ready for people to see my code." But let me tell you, while it may be painful, it will make you better.

Books are made better by editors. Coders are made better by pair programming and code reviews. If you love it, let it go.

Yes, some people will be unkind, but not the people that matter. Publish your project!

If you're a more senior person, be kind and coach. Share your wisdom.

Related Links


Sponsor: Thanks for my friends at Octopus Deploy for sponsoring the feed this week. Their product is fantastic. Using NuGet and powerful conventions, Octopus Deploy makes it easy to automate releases ofASP.NET applications and Windows Services. Say goodbye to remote desktop and start automating today!

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

100 Technical Things Non-Technical People Can Learn To Make Their Lives Easier

October 14, '14 Comments [79] Posted in Musings | Tools
Sponsored By

My lovely wife has an MBA, speaks 5 languages, and is currently in school to get a third (fourth?) degree. Point is, she's smarter than me (I? See?) and I'm lucky she even speaks to me.

It seems to run on some sort of electricity

However, she's in a class right now and wanted to record the hour long lectures. After trying on her Windows Phone, her iPad, her Laptop with OneNote she got very frustrated. I gave her a portable handheld recorder and she returned from class with 800 megs of wav files then asked me how to share them with the rest of the class.

This started a long talk about WAV files vs. mp3s, DropBox vs. email, megabytes vs. gigabytes and developing a sense of "digital scale." We talked about pixels and dpi, about 40 megapixel vs a 400x400 picture.

She said to me "there's all this stuff that techies know that makes normals feel bad. Where does one learn all this?"

  • Why does this picture print out blurry?
  • Why is that file too big to email?
  • I deleted Angry Birds but my computer is still slow!

"Knowing computers" today is more than just knowing Office, or knowing how to attach a file. Today's connected world is way more complex than any of us realize. If you're a techie, you're very likely forgetting how far you've come!

The #1 thing you can do when working with a non-techie is to be empathetic. Put yourself in their shoes. Give them the tools and the base of knowledge they need.

I honestly don't know HOW we learn these things. But, I figured I could help. If you've ever answered questions like this from your non-technical-partner or relative, then here's a list of

100 Technical Things Non-Technical People Can Learn To Make Their Lives Easier

Ok, perhaps not 100 exactly. I will add more good tips if you suggest them in the comments!

Size

  • A gigabyte is big. It's not something that is easily emailed.

  • A gigabyte might be a whole movie! If you want to get a gigabyte to someone you could either compress/squish it with some software and send a smaller version of the file, or put it on a USB drive and snail mail (post) it.

  • One to five megabytes are reasonable sizes. You can have pictures this size, documents, and small videos.

  • MB means Megabyte. GB means Gigabyte. Note that the abbreviation 1GB means 1000MB, so always double check and look closely.

  • Backup everything. Is your entire company on your 10 year old computer’s desktop? Look for Backup options like CrashPlan, DropBox, OneDrive, etc. Literally ANYTHING is better than leaving documents on your computer’s desktop.

Files

  • Think about where your files are. Are they in a folder on your Desktop? Are they in a folder called My Documents? Keep your files collected in one location (and below) so that you can easily make backups.

  • Learn to use search to find your files. Press the Windows key and just start typing on Windows, or use Spotlight (Command-Spacebar) on Mac.

  • Don’t forget to hover over things and right-mouse-click on things. It may not be initially intuitive, but right clicking often answers all your questions.

  • If you double click a file and it doesn’t do what you want, in Windows, right click the file, choose Open With, then Choose Default Program to pick a new program.

Privacy

Email

  • Assume that your email isn't private.

  • Don’t try to email more than 10 megabytes. Or 5 even. Many of your recipients won’t get the files. They will “bounce back.”

  • Don’t CC more than 10 of your friends or neighbors. At that point, consider another way to talk to them. Some of your friends may not want their email given to the world. Perhaps this is a time to use BCC (Blind Carbon Copy) so you don't expose everyone's email address to each other?

  • Always think twice when replying. Did you want to Reply To All?

  • It’s a good idea to check for hoaxes before forwarding bulk emails. For instance, look at snopes.com if you think Bill Gates may send you money.

  • If you get an email out of the blue that’s telling you to click on a link to “verify”
    your password, credit card, or other information, it’s a good idea not to click on the link. Instead, open a browser and navigate to your account on the site in question.

  • Never ever send your private credit card number, social security number, or anything personal in email. Ever. Really. Never.

Searching

  • If you put your search term - or parts of it - in quotes, you’ll get more specific results. For instance, “mark hamill” “star wars” would probably get better results than mark hamill star wars.

  • Your search term should sound like the answer you’re looking for rather than the question. So search for “2000 academy award winner” instead of “who was that guy who won that film award in 2000”?

  • If you want to google within a single site, try “site:thatsite.com mysearch” to search ONLY thatsite.com.

  • If you get an error message or code when a program stops working, just search for that number, like “0x8000abcd”

  • Be LESS specific. Every new word you add is narrowing your results!

  • You can search for the original source of a picture using Google Image search and uploading the image. It will find other places on the internet that picture lives!

  • If you don’t want someone to know that you’re searching for something that’s either secret or naughty, use your browser’s “Incognito Mode” or “Private Browsing Mode.” Note that while this may hide your browsing from a specific computer, that computer still has to talk to other computers to talk to the internet. Incognito Mode won’t hide your surfing from your boss.

Sound Files

  • MP3s are squished audio files. Remember the rules of thumb around file sizes when emailing.

  • WAV files are big audio files. You can use a program like Audacity to take a uncompressed WAV and “Save As” it into a Compressed MP3.

Documents

  • PDFs are Portable Documents. They are made by Adobe and work pretty much everywhere. This is a good format for Resumes. You can often Save As your document and create a PDF. Also, note that PDFs are almost always considered read-only.

  • Word has doc files and newer docx files. When working with a group, select a format that is common to everyone’s version of Word. Some folks may have old versions!

  • Big documents are hard to move around the internet. Rather than emailing that giant document, instead put it in a shared location like Dropbox, OneDrive or Google Drive, then using the Sharing feature of your chosen service, email a LINK to the document.

  • Collaborating with others by e-mailing documents around doesn’t work very well. If you’re sharing a document as recommended above, you can take advantage of their realtime collaboration features.

  • Don’t use a document when you need something bigger. Your small business’ records should probably go in a database rather than an Excel file.

  • In Windows, files end with a file extension like “.docx”, “.mp3” or “.jpg” that determines what program it’s associated with. If you save a file with the wrong extension, it might open with another program or not at all.

  • Sometimes you can’t see file extensions. In Windows Explorer, in the View Menu, pick File Extension to show them if they’re hidden.

Scanning and Faxing

  • An easy way to scan documents without a scanner is to use a scanning app on your phone. This means you’ll take a picture of the document. There are apps that can make your camera like a scanner.

  • If you need to fax but don’t have a fax machine, there are apps online that can take a photo from your phone and fax it. You can also received faxes as photos or PDFs.

USB Keys

  • Never put a random USB key in your computer. You have no idea where it’s been.

  • USB keys can do all kinds of things to your computer the second you plug it in without your even opening a file. Only use trusted USB keys.

My computer is slow

  • Think about what specifically is slow. Often the thing that’s slow is your internet. Are you on wireless? Is the signal weak?

  • Running a lot of programs at once can slow things down.

  • When your hard drive is almost completely full, your computer can slow down. Watch for warnings!

  • The cheapest, simplest way to speed up a slow computer is usually by adding more RAM (memory).

Bandwidth

  • Not everyone has super fast internet. Some people have a quota for the month. For example, my brother can download only 5 gigabytes (remember that’s 5,000 megabytes) every month. I avoid sending him big files and YouTube links.

Security and The Evil Internet

  • Most of the internet is out to get you. If a website looks wrong, it’s likely not somewhere you want to me. The more ads and popups the worse the neighborhood.

  • If you go looking for things you shouldn’t, like bootleg movies, you’ll be more likely to end up in a bad part of the internet.

  • Bad parts of the Internet will always try to trick you.

  • Be aware of advertisements that are actually pictures of download buttons. These download buttons might literally be next to the actual download button you need to press.

  • Always think three times before clicking on a link that’s been emailed to you. If you have to install something or a message tells you that your computer is missing something, it may be a trick.

  • Consider if a web site’s domain ends with a far away country code you weren’t expecting. Did I mean to be looking for a link in China (.cn) or Kazakhstan (.kz)?

  • Microsoft and Apple will never call your house to tell you personally that you have a virus.

  • Consider turning on “Two Factor Authentication.” That means that in addition to your password you’ll also need your phone with you to login in. That might sound like a hassle, but it stops the bad guys in their tracks.

"Space" - Disks and Memory

  • Memory is like the top of your desk - it’s what you’re working on right now. Disk space is like your filing cabinet, where you store things for later. When you turn off your computer, your memory is cleared but your hard drive isn’t.

  • If you computer is “just slow” there could be a few things going on. Are a lot of things running right now this moment? Close running programs, just like taking things off your desk and clear your mind.

  • Rarely will uninstalling applications “free up space.” If you computer is filling up, it’s likely with photos, videos or movies. Uninstalling Angry Birds from either your computer or phone likely won’t free up the large amounts of space you want.

Pictures

  • JPGs are image files that are great for photos. They are squished pictures, and the compression is optimized for pictures of people and nature.

  • PNGs are image files that are great for diagrams and screenshots.

  • Learn how to take screenshots.

    • Press the PrintScreen key to put a screenshot of the current screen in your clipboard on a Windows PC.

    • On a Windows 8 machine, press the Windows Key and the PrintScreen key to capture the screen to a Folder in your Pictures folder called Screenshots.

    • Press Command-Shift-3 to capture your screen to the desktop on ac Mac

  • Resizing images can be hard and frustrating. On Windows, try the Image Resizer Utility to make large images smaller.

  • The funny pictures you find on the internet are usually small in “dimension” - they have a small number of total dots or “pixels.”

  • A picture that is 400x400 in pixel dimension will look really blurry when it’s printed out on a full piece of paper.

  • For a photo to look nice when printed, it should ideally have more than 200 dots per inch. So for a 4 inch by 6 in photo, you’ll want a picture that’s at LEAST 800x1200, and even larger is better.

  • Megapixels are not megabytes. One megapixel is one million pixels. A “3.1 megapixel” camera will actually make a photoi that is 2048x1536 in dimension. This is nice size for printing in small sizes! A photo like this will be about one megabyte and suitable for emailing.

  • Photos matter. Back them all up.

Surfing and Links

  • Often you’ll search for something on a site, then end up on a page called “searchresults.asp.” You’ll want to share that link with your friend so you copy paste it and send them somesite.com/searchresults.asp. But you need to look at that URL (URL is a link). Does the link contain the thing you searched for? If not, your friend won’t see anything. Look for links like somesite.com/searchresults.asp?q=baby%20groot%20doll when emailing.

  • Search results often have a “share” link that will either get you a good sharing link or send via e-mail for you.

  • Always check for the lock in your browser address bar when you’re about to enter your password. Are you where you think you are? Does the address bar look correct? Is it green? The green address bar gives you more information about the company you’re talking to.

  • Is your password “Password”? Consider getting a password manager like 1Password or LastPass. Don’t put your password on a post-it note on your monitor. Try not to reuse passwords between sites. Don’t share your password with others.

  • Don’t reuse your passwords. If you give a tech support person a password and it's also the password you use for your bank, it’s like giving a parking attendant the keys to your house!

Big thanks to Jon Galloway for his help with this list!

tech_support_cheat_sheet

What did we miss?


Sponsor: Thanks for my friends at Octopus Deploy for sponsoring the feed this week. Their product is fantastic. Using NuGet and powerful conventions, Octopus Deploy makes it easy to automate releases ofASP.NET applications and Windows Services. Say goodbye to remote desktop and start automating today!

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

Using a Surface Pro 3 full time for two months

October 13, '14 Comments [46] Posted in Reviews
Sponsored By

en-INTL-PDP-Surface-Cover-Black-RD2-00080-LargeBack in August I posted my initial impressions of a Surface Pro 3 after using it for a week or so. I paid for the Surface Pro 3 with my own money and have been using it as my primary machine ever since. I've been using it now for two months full time and figured it was time to break down the good, the bad, and the weird.

I won't waste your time telling you specs and details you can search for. Instead, I'll tell you what has worked and what hasn't the last few months.

The Good

  • It's very fast. I haven't had any issues or concerns about performance. I've given talks internationally this last few months and used this Surface Pro 3 for demos involving multiple instances of Visual Studio without concern.
  • I always want more memory, but 8 gigs has been fine. I can run Hyper-V or VirtualBox and run at least one VM without concern. Even better is running the VM off a USB3 hard drive. However, 12 gigs of RAM would have been a nice option.
  • Running two monitors with the Surface Pro 3 Dock is pretty perfect. I'm having no major issues with my 24" monitors. A little more on some subtle video card things below under "The Weird."
  • It's far more usable in your lap than previous Surface versions. I'm sitting on my front porch right now, in fact, typing this post while the kids run around. It's actually kind of nicer than a laptop in that the screen part doesn't flop as I type.
  • The Dock is exceptional. It adds 3 USB 3 ports and 2 USB 2 ports, for a system-wide total of 6 ports. It adds a second Mini DisplayPort as well as Gigabit Ethernet and an audio jack. Drop in, go. It also works nicely with Mouse Without Borders.
  • The kick stand is brilliant. Having a continuous kickstand is perfect and useful. Every tablet should have one.
  • It's really an everything/everywhere machine. I use it for work, then remove the keyboard and use it on the treadmill for movies.
  • I added a 64 gig MicroSD card and put movies on it. Works great on a plane and everyone loves the kickstand and comments on it.
  • The pen is fantastic, but I don't really use it for anything other than OneNote.

The Bad

  • I'm underwhelmed by the battery life. I have been generally underwhelmed with batteries in general in the last year. From my iPhone 5S to my Lenovo to this Surface Pro, all batteries seem to last about 5 hours for me. This is "fine." But it's not awesome. I never take any device anywhere without some subconscious concern about the battery. It's not an all-day battery. From what I can tell the number one thing you can do to get it to last longer is to lower the screen brightness. Unfortunately for me, I like a bright screen.
  • I almost point this under the Weird, but I just don't like the Touchpad on the Surface Pro 3. It's OK, but it's not epic. A MacBook Pro is a universally loved touch surface. No one knows why, but it just feels right. The Surface Pro 3 touchpad is one of the best I've used, but it's very small and you'll want to at least adjust the pointer speed under Motion without Mouse Properties. While I don't use it as a mouse, it's gesture support for pinch to zoom and scrolling is excellent. That said, you'll end up using the touchscreen for that naturally.
  • With every Surface I've ever used there's been this weird thing where it would stop seeing the keyboard. It happens maybe once in 30 attaches, but it's annoying. Just detach and reattach, but it's clearly a flaky bug and I've seen it maybe 8 times in the last two months.
  • I spend a lot of time in Google Chrome and while it's great on my desktop, I must say that using Google Chrome on a hybrid like the Surface that has both touch and high-dpi really makes Chrome feel unpolished. Touch support in Chrome is there, scrolling and pinch to zoom work, but with newer betas there are weird zoom effects they appear to be bringing over from Android.
  • In recent Chrome builds it started popping up the Virtual Keyboard. Unfortunately, that's not Chrome's job to pop up the keyboard. ;) The keyboard pops up when a physical keyboard isn't attached. However, Chrome pops it up whenever a text box is touched, and even worse, resizes the window to half height. It's REALLY annoying. I just can't use Chrome or recommend it on a touch screen. I'd love it if someone from the Chrome team would get in touch with me or someone at Microsoft because this kind of thing makes everyone look bad. Here's an eight month old thread that continues filled with folks with this issue.

The Weird and The Subtle

  • Early on, before the first firmware update that came over Windows Update, I was seeing some concerning heat coming off the the back right side. I had one "thermal shutdown" while sitting in my car. I haven't seen any heat issues since the most recent firmware updates, but it was initially concerning. Ultimately I did have to come to terms with the fact that mine is an i7 processor, not an iPad Air. It does have a fan and it will use it if you are running Handbrake and compressing video.
  • Hotkeys and the keyboard take a week or so to get used to. One feature I'd like to see (can you hear me Surface Team?) is to be able to have F1-F8 be function keys and F9-F12 stay as Home/End/Page Up and Page Down. It took me a while to figure out some of the more subtle hotkeys on a Surface Pro 3 keyboard, for example:
    • Toggle Fn lock - Pressing Fn-CapsLock will toggle the top row to stay as Function Keys.
    • Fn+Spacebar - Printscreen
    • Fn+Del and Fn+Backspace - Brightness up and down
    • Fn+Up and Fn+Down - Page up and Page Down (in addition to the other PgUp/PgDn keys.
    • Windows Key + Vol Down - Screenshot to screenshots folder
  • I think Windows on a tablet should be more aggressive about what it does in the background on a tablet. Every once in a while there's some indexing service or malware service that slows everything down. It's no more on a Surface than it is on my other devices, but somehow I'm more aware of it with this device. When I'm not plugged in or have my keyboard removed, Windows needs to CHILL OUT.

I recommend the Surface. It's an amazing, fast, thin device. It's got some quirks, but I've had two firmware updates in as many months, and Microsoft has publically said it would support it (as well it should) with Windows 10. I think the Surface Pro 3 will likely get more useful updates, as driver updates, pen updates, and firmware updates that will make it better.

Finally, Windows 10 and the "Continuum" concept cannot come fast enough. It's exactly the behavior I want on this device.


Sponsor: Thanks for my friends at Octopus Deploy for sponsoring the feed this week. Their product is fantastic. Using NuGet and powerful conventions, Octopus Deploy makes it easy to automate releases of ASP.NET applications and Windows Services. Say goodbye to remote desktop and start automating today!

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.