Scott Hanselman

This URL shortener situation is officially out of control

June 2, '14 Comments [149] Posted in Musings
Sponsored By

I saw a URL today on Twitter to an article on Slate.com. It was a custom short URL - http://slate.me/1h0svt8 but since I was visiting it via Twitter, it was wrapped with Twitter's t.co URL, so I really started at http://t.co/sxSvcJnT2L.

When I visited it for the FIRST time, I got this lovely HTTP interaction. That's SEVEN HTTP 301s, count them, 7, before I get to the destination page.

image

It would have been 8 redirects if I'd counted t.co as well. Note also that after it bounced around three of Slate's URL shorteners, it also goes through goog.gl as well.

  • t.co is twitter's URL shortener that acts as a "safety gate" that allows Twitter to shut down a bad URL at the Twitter level. This means Twitter can stop malware faster, they say.
  • trib.al is a URL shortener that provides marketing analytics. They are bouncing me around in order to set marketing cookies because it's the first time they've seen me.
  • goo.gl is what you'd think it is, it's Google's URL shortener.

That's a lot of back and forth just to get me a a web page. And getting me a web page is kind of the most important thing the web does. Redirects are being abused and I don't see any work happening in HTTP 2.0 to change it.

The second request to the same URL is better, but still frustratingly indirect.

image

Every redirect is a one more point of failure, one more domain that can rot, one more server that can go down, one more layer between me and the content.

Oh, and just to be obnoxious, I've created http://hnsl.mn/thisurlisverysmall to make the point. Tweet it!

If you prefer long URLs, you can also get to this post from

http://uniformresourcelocatorelongator.com/aHR0cDovL3d3dy5oYW5zZWxtYW4uY29tL2Jsb2cvVGhpc1VSTFNob3J0ZW5lclNpdHVhdGlvbklzT2ZmaWNpYWxseU91dE9mQ29udHJvbC5hc3B4%7CGOvZCfcZVkHOsSZtVQgwUuzvaJeOVXWmOSgexmjuleGbleSSULshLkwpqddRmAkZYVheOvaZCDELQYCzOZzpvGgrnlGTIHypnqBBwVZEJZzlkpTwazjUBoqJUQJyudWXoBQvIOOfwrmqNpHEZmZXwHTYzrCFFSahOScKYLKAfkroAoopMbjuNcLKwSMEzsGeiawVCedYIZFNNQLWSEvQdkZMkDFyDosVlfLLhGizNOTxGQKHESsLoCoNleNtmlPIXedNEQcomXKRsJKOXzrLiAoJZRctSwYduzqvczTPgBgAjvzXRltkhpYDxkEpgiUqthRNiYgLOiDsFptekhiJxyfMKiCCAHYwNHmuKtlDqanKEZLlyqQYjURVbQQXikPrzUPYKHCmZrPOBUCHGssMyMekyfCkNOwhjgOGSrPPUQYtkLdvLQHjnszIJTOfKKMlBVMUoayZGMigAnIzrRfRtIczCOrhbFWthtMysDnHnTmDaTAfZFUCCGPskHqmVCtGFBhkwGQJxUdgPIYRyQXJJhylmfkCRQrvJqwOqnneWMKDTfcVdRxHXKHPkXoxwVpqfRWpSAzJKWMSKObRjzUfHXINRnlIcEGeigJJEIMcbfyXxMhVDxzwyOMboEfHHzTnQPbLyuRFKLxMlrfQbNMkoKJopCKDnKoxiNSFgBGoWjdYApYozbVIaBLoPHpDHXwgCneURTJdLnfLJPEEtxvmaVchmoNnyCvXnTmYFnFnDnLytKClfNFDJgpYsoyXhvTsuhhYapBzXBcKwacpcsZcMScmJIFHVNnrnxnwPIxHlWDMQKAeljmeInjBjACURODHbCSsgGvaAzaRPCLAhYQmtGYOeUfMqKSGPsEDQLDxSYxvtgGLSrfkOU

What do you think?


Sponsor: Big thanks to Mindscape for joining us and sponsoring the blog feed this week! I discovered Raygun.io and started using it for my side project and I 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

We are abstracting on the shoulders of giants

May 28, '14 Comments [42] Posted in Musings
Sponsored By

middleMy new startup has data centers on three continents, utilizes global load-balancing, traverses networks with ease, has both an iPhone and Windows application, was written in a simple high level language, and enables an amazing scenario to help people get more done, faster.

But the real story - the real mindblower for me - was not the hours and hours of software that my partner and I wrote, it's the years and years of software that we didn't write.

We globally load balanced web sites and services across multiple servers in Europe, Asia, and the US. Windows Azure Traffic Manager handled that.

We sat our communication protocol on top of SignalR, an open source library using ASP.NET that hides the complexities of the real-time Web, handles NAT traversal for us, and basically removed the network for us as an issue. SignalR sits on stop of HTTP and Web Sockets, which sits on top of TCP/IP.

We used RayGun.io for our error management, and get complete stack dumps when a failure occurs in our application, this enables us to upgrade fast and often and give a good experience to our users

We used InnoSetup to install our application, it's truly one of the most amazing applications I've ever used. Give him money.

We used the ZXing QRCode Open source library for creation of QR codes. We didn't worry about the graphics details.

We used MahApps.Metro UI to make our Windows application look great. Added some controls, and it's lovely.

And it all comes together using C# and the Xamarin set of tools. The iPhone app, the Windows app, and the cloud service, are all C#.

I've been in the software industry for over 20 years now and I remember when writing C was considered a rather high-level language. I generally understand the full stack from assembler all the way up to managed code and beyond to the cloud. It's fantastic that today we think about managing VM clusters as much as we think about managing bytes.

Think about the giant shoulders that our application is standing on. Think about the shoulders that your application is standing on. Software abstraction has enabled us to do so much.

We can marvel at the abstraction layer that is Google. For many, that IS the internet. You type a question into a text box and push a button and the entire world opens up to you and a just a fraction of the planet truly appreciates the orchestration and history that makes it all happen.

Do I have a point here? Probably not. It just struck me today. Go listen to my chat with computer science legend Len Bass on this week's podcast to get a feeling for the history and power that we exploit every day.

There is value in taking a moment to think about the deep and broad stack that your application sits on. Go thank and support the projects, both open source and not, that your application uses. Revel in the layers of abstraction that others have created and appreciate the ones that you have created. They make all the LEGO pieces you're using just the correct size, and they make snapping them together a lot of fun.

It's a great time to be a programmer. This blog post was dictated with the myEcho application.

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

Bloggers: Know when to use a JPG and when to use a PNG and always Squish them both

May 21, '14 Comments [25] Posted in Musings
Sponsored By

The best rule of thumb for bloggers using images in their posts is:

Use JPGs for photographs, landscapes, and faces. Use PNGs for charts, graphs, screenshots and cartoons. Use GIFs only for animations, and sparingly.

As with all rules of thumbs, you should use your best judgment. You should aim to understand how these two image formats work so you can make the right decision.

JPEGs

imageJPGs (JPEGs) are "lossy." That means they lose data. They literally throw image data away that they figure your eyes won't see. A good example would be a landscape with a large blue sky. The image format could hold all the detail of the blue sky, literally millions of pixels saying blue, blue, dark blue, darkish blue, sky blue...or it could say "this is a whole area of mostly blueish." Sure, some detail is lost, but for the most part, it's a big blue sky, right? When you save a JPG in your paint program (like Paint.NET) and there's a quality slider for the JPG, the lower the number the more data you'll throw away.

File from Wikimedia Commons

PNGs

PNGs are "lossless." That means that they don't lose data when they are saved. They are more like ZIP files than like JPGs. PNGs also are known for their ability to have transparent regions. With a JPG you might have a white background, but a similar PNG could have a transparent background and be overlaid on other graphics.

File from Wikimedia Commons

Regardless of which one you choose, chances are that the paint app you use (even Photoshop) haven't removed all the unneeded data from your graphics files. Applications like PNGGauntlet or PNGOut can squeeze 10, 20, even 30% from a already-saved file without any loss in quality. This is especially important given the number of folks browsing on mobile devices. Bandwidth matters, and you do everyone a disservice with every one megabyte graphics file you upload to your blog.

pnggauntlet-screen-a0eadac6[1]

I'm a huge fan of PNGGauntlet. There's also Trimage that optimizes JPGs and PNGs on Linux, and ImageOptim for Mac.

PNGGaultlet works HARD. It will turn your PCs fan on, I'm sure, as it works very hard. But PNGGauntlet tries all of PNGOUT, OptiPNG, and DeflOpt and picks the best result to create the smallest PNGs.

After you've got that blog post perfect, I recommend you add a "squish the graphics" step to your workflow. You'll only gain speed and happier readers.

Related Links


Sponsor: Many thanks to Izenda for sponsoring the blog feed this week. Please do check out their Intuitive Ad Hoc Reporting with Stunning Visualizations - Embed real time dashboards into your ASP.NET applications for easy, custom reports across all devices. Download a FREE TRIAL of Izenda 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

FREE Pluralsight video: "Get Involved" in community!

May 7, '14 Comments [17] Posted in Musings | Open Source
Sponsored By

imageI'm absolutely thrilled to announce that my feature-length collaboration with Rob Conery called "Get Involved" is now available FREE from Pluralsight!

You can watch the whole movie RIGHT now for FREE. No sign up or subscription needed! Please tweet and tell your friends!

http://getinvolved.hanselman.com

We really poured our hearts into this production and we really hope you enjoy it.

In this feature-length production, Scott Hanselman and Rob Conery offer suggestions and advice on how you can get out there, and get involved. Blogging, Twitter, Github, StackOverflow, User Groups and Conferences: all of this can make you a happier, more productive developer and inspire you to take your career to the next level.

You certainly don't have to be social to be better at writing code - but sharpening your skills this way helps you when it comes time for a job interview, a yearly review where a promotion is on the line, or when you want to start running an Open Source project.

If you're a fan of This Developer's Life you know how tightly Rob and I like to produce things - this video is no exception.

Filmed on the streets of Portland and at a Portland user group, we talk about Blogging, Twitter, Github, StackOverflow, Open Source, Speaking, User Groups and Conferences - all of this hoping to make you a happier, more productive, more connected developer. We want to inspire you and perhaps to take your career to the next level.

Additionally, we stretched far beyond Portland to seek out the other people who active in the social technology space!

  • Jon Skeet joins us to talk about what a Good Question is on StackOverflow - and also how you can gain reputation by providing Good Answers - and edits to Good Questions!
  • We venture out to the Portland Area DotNet Users Group (PADNUG) and meet a few developers who have just started going - as well as people who have been there for years.
  • While we were there, I gave a 10-minute lightning talk on Azure - a great way to get started speaking if you're not a fan of public speaking. Rob filmed the whole thing.

By the way, if you do have a Pluralsight Subscription, you've got access to thousands of hours of technical video training, like my other video on technical presenting!

image

The Art of Speaking - Become a better technical public speaker

Have you thought about speaking on technology publically? Maybe you want start talking a local user groups and then work your way up to larger regional code camps? "The Art of Speaking" is an 80 min Pluralsight course that Rob and I created to help you do just that!

You'll learn all about:

  • The Speaker Mindset
    • Not Wasting Time
    • What to do, What Not to Do
    • Defining a Perfect Talk
  • Preparation
    • Choosing Your Demo
    • Choosing Your Delivery Style
    • Handling Pressure
    • Engaging the Audience
    • Code vs. Slides
    • Creating an Outline
    • Creating the Story
    • Building a DemoYou have not watched this Clip.
    • Building a More Complex DemoYou have not watched this Clip.
    • Creating Your Slides
  • ExecutionYou have not watched this Module.
    • The Unexpected
    • The Tech Check
    • The Delivery

Keep an eye out for my next video with Rob, coming very soon exclusively to Pluralsight Subscribers!

Rob has a lot of great videos as well like these and many more!

Rob and I also have a one hour video where we move the This Developer's Life podcast website to Microsoft Azure LIVE, so check that out.

Many, many, thanks to Pluralsight for giving this video to the community for free! If you're on Twitter, go thank them now @pluralsight.


Sponsor: Big thanks to Aspose for sponsoring the blog feed this week. Aspose.Total for .NET has all the APIs you need to create, manipulate and convert Microsoft Office documents and a host of other file formats in your applications. Curious? Start a free trial 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

Analysis Paralysis: Over-thinking and Knowing Too Much to Just CODE

March 30, '14 Comments [106] Posted in Musings
Sponsored By
Pair Programming Photo courtesy of FOCUS100

I read a post on ArsTechnica today called "I know too much to program quickly. What can I do?" that is summary of a StackOverflow question by Zilk, who says:

Lately, I've been noticing that the more experience I gain, the longer it takes me to complete projects, or certain tasks in a project. I'm not going senile yet. It's just that I've seen so many different ways in which things can go wrong. And the potential pitfalls and gotchas that I know about and remember are just getting more and more.

Trivial example: it used to be just "okay, write a file here". Now I'm worrying about permissions, locking, concurrency, atomic operations, indirection/frameworks, different file systems, number of files in a directory, predictable temp file names, the quality of randomness in my PRNG, power shortages in the middle of any operation, an understandable API for what I'm doing, proper documentation, etc etc etc.

This really hit me because THIS IS ME. I was wondering recently if it was age-related, but I'm just not that old to be senile. It's too much experience combined with overthinking. I have more experience than many, but clearly not enough to keep me from suffering from Analysis Paralysis.

I have two side projects I'm doing on vacations and in the evenings when the house is asleep. One is a port of popular iOS application to Windows Phone, the other is a iOS app with a cloud service startup with my buddy Greg. Both projects have had awesome beginnings and then stalled when things just got overwhelming.

I kept starting features, the stalling. I felt like I was thrashing to disk, spending more time swapping ideas around in my head rather than just doing them. I'm still getting lots of things done, in general, I'm productive, but when I code I just thrash.

I'm overthinking stuff. "Write settings to a file" turns into a mess of paranoia around concurrency situations, upgrading settings from previous versions of the app (that don't exist, mind you), and it just snowballs from there. It's not exactly scope creep, but it's a kind of architectural paranoia. I see so many issues and possible bugs that I've learned over the years that could derail a feature that I end up derailing the feature.

YAGNI

The answer, they say, is You Aren't Gonna Need It. "Perfect is the enemy of the good" reminds user Telastyn.  These are easy to intellectualize but hard to internalize. User Mouviciel says:

Looks like you are not experienced enough :). The next lesson is: stick to requirements, not more.

I get that, but me, I often need another brain to complement my own.

How I Solve Overthinking

I learned about Agile from James Shore while I was working at Corillian some years ago, but it's Pairing that resonates with me the most. With a good pair, you'll get 3 times the work, not double.

I worked my way through both these startup issues by bringing in another brain. I'm not the best programmer, but I do OK. But somehow we are both better when we pair. I paired with Greg on the iOS and my new friend Jan Hanneman on the other. They are both clearly better coders than I, which is intimidating, but I'm still sure I provide value. What they gave me was a fresh perspective and a focus to say "YAGNI" and just get features done. The ironic part is, if I'm brought in on a project to pair, that's what I bring also.

My wife thinks this is hilarious. It's the old relationship joke where your partner says something for years and years, then one day you rush home from work to share this amazing new "insight" from a stranger...the same insight your partner has been sharing all this time.

Since I work remotely, all my Pair Programming has to happen over video chat and screen sharing. I use Skype, Lync, Join.me, and whatever else works. We take turns working through features in Trello boards, sharing one person's screen, talking and coding, designing and brainstorming, then commiting to Git, syncing, and switching the share.

This seems to work well for sessions as long as 3 hours, but after that, we get pretty wasted. However the feeling of accomplishment when you work through a problem with a partner is also magnified.

Does your coding life get paralyzed? How do YOU work through it?

* Photo courtesy of FOCUS100

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 128 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.