Scott Hanselman

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

Plex for Xbox One is here and my life is complete - Plus Synology setup how-to

October 8, '14 Comments [29] Posted in Musings
Sponsored By

Plex on a SynologyI love my Synology NAS, and I love Plex. I also love my Xbox One. Finally, today these three things are working together to give me a lovely unified view of my media library.

I have a Synology 1511 (the Synology 1513 is today's model). It's a 5 bay Intel-based NAS. I put four 2TB 7200 Seagate drives in it. In the few years since I've had the Synology I've had 2 drives fail and in each case the Synology emailed me, I pulled the drive and replaced them (I now keep two spares around) and rebuilt without incident.

I run Plex on this Synology as it also hosts all my family photos, family videos, and DVD backups. The Synology (since I upgraded the RAM cheaply) also runs Surveillance Station monitoring 4 IP cameras posted around my house, as well as  VPN Server, *and* CrashPlan cloud backup. I used to run most of this stuff on my desktop, but I'm convinced more and more that every connected home needs a Home Server. I've even added a Git Server, iTunes Server, and a "Cloud Station" which is basically "Personal DropBox." Glorious.

I use Plex extensively on my iPad and Surface Pro 3. One of the best features (there's a million) is being able to seamlessly mark a file as "offline" and sync it to a portable device. Makes airplane travel a lot nicer.

The one missing part has always been watching Plex on my big screen. While I do have a Chromecast and we enjoy it, the Xbox One is our set-top box. We changed an option on the Xbox under Settings so it "Boots to TV." The Xbox controls our DirectTV and my wife uses a Logitech Harmony One Remote that we still love. From the Xbox we can "Xbox Watch Netflix" or "Xbox Watch HBO" and it just does the right thing. But switching inputs to the Chromecast, getting a tablet out, starting Plex on the tablet and throwing it to the TV requires more tech than my wife is willing to give.

Until now. Plex is out on Xbox One (and Xbox 360) and there was much rejoicing. A Plex Pass is required, but it's SO worth it, and not expensive.

What you'll need

  • Plex Server running somewhere - You can run it on any decent NAS, your desktop machine, or any machine you have laying around.
  • A Plex Pass - A monthly or yearly subscription. It's a fantastic value. You CAN use Plex free, but with the Pass you get the offline sync, Xbox support, Movie Trailers, Cloud Storage Sync, and Camera Upload.

One note for Synology people like me, you’ll need to install the latest Plex Pass preview release of the server (v0.9.10.3). Not a huge deal, go to Plex Downloads and get the right version for your Nas. I downloaded, then logged into Synology and did a manual install.

PLEX ALL THE THINGS

Now, go to the Xbox One App Store and download it and sign in. If you'd signed in before and got a warning that your Plex Server was the wrong version, you'll want to shut down the Plex app completely or reboot the Xbox to get a proper retry going.

Plex on Xbox One

The app looks fantastic, supports both Kinect AND Voice and really fits in with the other apps I use like Hulu and Netflix.

Plex Home Screen

Movies, TV, whatever.

Plex Home Screen

Plex is epic because it's your media EVERYWHERE. Here's a picture of the devices that my family have used to talk to Plex this year.

Plex Devices

Anyway, enough gushing. I couldn't be more thrilled. If you are already a Plex user, you're gonna love this. I'll do a full video and walkthrough of my setup soon, but Plex on Xbox One has finally turned my Xbox One into the ultimate media server. When the Media Player with DLNA support releases in a few weeks on Xbox One, it'll just be gravy.

Related Links


Sponsor: Big thanks to Octopus Deploy for sponsoring the feed this week. They are FANTASTIC. Truly, check it out, the NuGet team uses them. 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

Can you trust your browser extensions? Exploring an ad-injecting chrome extension

October 3, '14 Comments [41] Posted in Musings
Sponsored By

My perspective on JavaScript-based browser extensions has been far too naïve until this point. We were all burned by bad toolbars or evil ActiveX add-ons in the past, so when I run IE I run it with no add-ons enabled, or very few. However, with Google Chrome and it's sync feature, as well as its rich extension store, it's easy to add a bunch of add-ons and get them synced to other machines.

I wanted to download a YouTube video recently so I installed a "U-Tube Downloader" extension. It is highly rated, seemed legit, so I added it. It puts a nice Download button next to any YouTube video. Like greasemonkey script it was there when I needed and it, and out of sight otherwise.

I installed it and forgot about it. So, put a pin in that and read on...

image

Today I was on my own site and this happened. A video slid onto my page from the right side and started playing. I was gobsmacked. I know this site, I know its code. I know my advertisers. WTH. Where is this coming from?

It's the surfing video there in the lower right corner.

newevil

First I knee-jerk emailed my advertiser asking if they were injecting this, then I pulled back and started to Inspect Element.

Looks like there's a supporting iframe, along with an injected div. That div includes JS from "vidible.tv" and the ads are picked from "panoramatech." But that's not all.

image

There's references to literally a half-dozen other ad-networks and then this, something called RevJet.

image

Search around and here's the first description of what RevJet is.

image

Whoa, ok, it's an extension. But which one? Grep for "Rev" in this folder C:\Users\Scott\AppData\Local\Google\Chrome\User Data\Default\Extensions and I my U-Tube one.

Nicest Ad Ever

I particularly like the comment "nicest ad ever."

image

This extension also injects ads from "Yllix" when I'm on YouTube, and RevJet when elsewhere. Apparently if I set revjetoptout in my local storage, I can get around this. Very NOT intuitive. I saw no options for this extension exposing this.

image

Worse yet, every once in a while, Kim Kardashian shows up in my New Tab page. Again, there's no way for non-technical relative to figure this out. And it's pretty hard for technical me to figure it out. This is deceptive at best.

BxmVMpICUAA6lZq

Ugh.

Yes, I realize someone put work into this extension, and yes, I realize it was free. However, it wasn't clear that it was going to randomly inject ads into any website without asking. It wasn't clear that the ads were injected by this extension. There was/is no clear way for anyone without the ability to debug this to make it stop. Charge me a $1, but don't reach into webpages I visit and mess with my content without telling me.

I recommend you check out chrome://extensions/ and give each enabled one a good hard look. Consider disabling or uninstalling extensions you may have forgotten about or ones you don't explicitly trust. If you're a dev, consider reading the code within the extensions and make sure you're getting what you expect.

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

Inception-Style Nested Data Formats

September 30, '14 Comments [43] Posted in Musings
Sponsored By

Dan Harper had a great tweet this week where he discovered and then called out a new format from IBM called "JSONx."

"JSONx is an IBM standard format to represent JSON as XML"

ByUETcKIIAELf7h

Oh my. JSONx is a real thing. Why would one inflict this upon the world?

Well, if you have an existing hardware product that is totally optimized (like wire-speed) for processing XML, and JSON as a data format snuck up on you, the last thing your customers want to hear is that, um, JSON what? So rather than updating your appliance with native wire-speed JSON, I suppose you could just serialize your JSON as XML. Send some JSON to an endpoint, switch to XML really quick, then back to JSON. And there we are.

Storing a BMW inside another

But still, yuck. Is THIS today's enterprise?

In 2003 I wrote a small Operating System/Virtual Machine in C#. This was for a class on operating systems and virtual CPUs. As a joke when I swapped out my memory to virtual memory pages on disk, I serialized the bytes with XML like this:

8

Hilarious, I thought. However, when I showed it to some folks they had no problem with it.

DTDD: Data Transformation Driven Development?

That's too close to Enterprise reality for my comfort. It's a good idea to hone your sense of Code Smell.

Mal Sharmon tweeted in response to the original IBM JSONx tweet and pointed out how bad this kind of Inception-like nested data shuttling can get, when one takes the semantics of a transport and envelope, ignores them, then creates their own meaning. He offers this nightmarish Gist.

--
Http Response Code: 200 OK
--







{"errorCode":"ItemExists","errorMessage":"EJPVJ9161E: Unable to add, edit or delete additional files for the media with the ID fc276024-918b-489d-9b51-33455ffb5ca3."}

Here we see an HTML document returned presumably is the result of an HTTP GET or POST. The response, as seen in headers, is an HTTP 200 OK.

Within this HTML document, is a META tag that says, no, in fact, nay nay, this is not a 200, it's really a 409. HTTP 409 means "conflict," and it usually means that in the context of a request. "Hey, I can't do this, it'll cause a conflict, try again, user."

Then, within the BODY OF THE HTML with a Body tag that includes a CSS class that itself includes some explicit semantic meaning, is some...wait for it....JSON. And, just for fun, the quotes are HTML entities. "e;

What's in the JSON, you say?

{
"errorCode": "ItemExists",
"errorMessage": "EJPVJ9161E: Unable to add, edit or delete additional files for the media with the ID fc276024-918b-489d-9b51-ffff5ca3."
}

Error codes and error messages that include an unique error code that came from another XML document downstream. Oh yes.

But why?

Inception Nested Data FormatsIs there a reason to switch between two data formats? Sure, when you are fully aware of the reason, it's a good technical reason, and you do it with intention.

But if your system changes data formats a half-dozen times from the moment leaves its authoritative source on its way to the user, you really have to ask yourself (a half-dozen times!) WHY ARE WE DOING THIS?

Are you converting between data formats because "but this is our preferred format?" Or, we had nowhere else to stick it!

Just because I can take a JSON document, HTML encode it, tunnel it with a SOAP envelope, BASE64 that into a Hidden HTML input, and and store it in a binary database column DOES NOT MEAN I SHOULD.

Sometimes there's whole teams who exist only as a data format transformation as they move data to the next team. 

Sound Off

What kinds of crazy "Data Format Inception" have you all seen at work? Share in the comments!

UPDATE: Here's an insane game online that converts from JSON to JSONx to JsonML until your browser crashes!

P.S. I can't find the owner of the BMW picture above, let me know so I can credit him or her and link back!

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
Page 1 of 130 in the Musings category Next Page

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