text:
Where You Once Belongedby Kent Haruf
In Where You Once Belonged, acclaimed novelist Kent Haruf tells of a small-town/b>
The red Cadillac pulled down Main Street and sat by the tavern for hours, unnoticed. Then Ralph Bird of the Men's Store recognized the driver as Jack Burdette and bolted to the sheriff's office. The prodigal son of Holt, Colorado, had returned--and he was far from welcome.
In Where You Once Belonged, acclaimed novelist Kent Haruf tells of a small-town hero who is dealt an enviable hand--and cheats with all of the cards. In prose as lean and supple as a spring switch, Haruf describes a high school football star who wins the heart of the loveliest girl in the county and the admiration of men twice his age. Fun-loving, independent, Burdette engages in the occasional prank. But when he turns into a man, his high jinks turn into crimes--with unspeakable consequences. Now, eight years later, Burdette has returned to commit his greatest trespass of all. And the people of Holt may not be able to stop him. Deftly plotted, defiantly honest, Where You Once Belonged sings the song of a wounded prairie community in a narrative with the earmarks of a modern American classic.
Editorial Reviews
"A beautifully told parablesimple and stark and true." Newsday
"Where You Once Belonged speaks with the authenticity of . . . Hemingway and Faulkner." The Denver Post
"Haruf's brooding, pondering style translates into first-class writing." Rocky Mountain News
Product Details
- 9780307807854
- Publisher:
- Knopf Doubleday Publishing Group
- Publication date:
- 11/09/2011
- Series:
- Vintage Contemporaries
- Sold by:
- Random House
- Format:
- NOOK Book
- Pages:
- 176
- Sales rank:
- 70,976
- File size:
Meet the Author
Kent Haruf's honors include a Whiting Foundation Award, a Stegner Award, a Frank Waters Award, and a special citation from the PEN/Hemingway Foundation. His novel Plainsong won the Mountains & Plains Booksellers Award and was a finalist for the National Book Award, the Los Angeles Times Book Prize, and the New Yorker Book Award. He lives with his wife, Cathy, in his native Colorado.
Brief Biography
- Hometown:
- South Central Mountains of Colorado
- Date of Birth:
- February 24, 1943
- Place of Birth:
- Pueblo, Colorado
- Education:
- B.A., Nebraska Wesleyan University, 1965; M.F.A., Iowa University (Writers' Workshop), 1973
Customer Reviews
Average Review:
Most Helpful Customer Reviews
See all customer reviews
A very good read. Interesting characters with lots of memorable events, but I was so, so disappointed in that ending!
Common people, real life.
Kent Haruf tells the story of a man who can't see beyond his own point of view, through the eyes of a friend who can't help seeing too deeply into everyone else's mind. And slowly the tangled links between the two become clear. Jack Burdette is back in Holt Colorado, and at first nobody even sees him. But when they do, nobody's glad. Jack doesn't even seem to know why he came back. The narrator, however, sees more than a fat man in a car, and tells the story of a boy growing up, childhood pranks, drinks and poker slowly turning to unintended hurts and deepest wounds. The story changes when Jack leaves town. A larger than life character, he leaves a hole much larger than life in the community. At this point the narrator begins to enter his tale. Permanent losses are paired with the incomplete and hope begins to grow. But don't read this story for an upbeat ending. It's a novel of middles and middling through, believing there's hope when hope fails, and finding out if there's really any place where you belong. In the end, the main character is neither the narrator nor the man in the car, but the town itself, wounded, growing and healing from the hurts its people inflict. Disclosure: I borrowed this book from a friend.
Where you once belonged is an interesting story. Jack Burdett (the main character) shows many different talents as well as emotions. He grew up with a rough life, but still managed to be a football star through high school, and earn a full ride scholarship. He didn't do so well in College, and ended up getting into trouble. He's a very unpredicatable character. Throughout the story he makes a numerous amount of choices, which did not lead to the best of choice for him, and ended up hurting him in the future. Kent Haruf did an excellent job describing the characters, and event throughout the entire story. He did so well that while I was reading, I actually stopped and thought about all the desccriptive words he used, and it inspired me as a writer.


text:
A long while back it seemed like the new cool app thing to do was to represent people/avatars in circles instead of the squares (or squares with rounded corners). I made a snarky comment about this myself almost exactly 2 years ago when I noticed that some apps I was using at the time switched to this:
Seeing a trend that the new avatar shape in apps is a circle and no longer square — Tim Heuer (@timheuer) March 23, 2013
Seeing a trend that the new avatar shape in apps is a circle and no longer square
Now since this seems to be a popular trend and people are doing it I've thought XAML folks have figured it out. However I've seen enough questions and some people trying to do a few things that make it more complex that I thought I'd drop a quick blog post about it. I've seen people trying to do profile pic upload algorithms that clip the actual bitmap and save on disk before displaying it to people stacking transparent PNG 'masking' techniques. None of this is needed for the simplest display. Here you go:
<Ellipse Width="250" Height="250">
<ImageBrush ImageSource="ms-appx:///highfive.jpg" />
That's it. You'll see that Line 3 shows us using an ImageBrush as the fill for an Ellipse. Using an Ellipse helps you get the precise circular drawing clip without having pixelated edges or anything like that. The above would render to this image as the example in my app:
Now while this is great, using an ImageBrush doesn't give you the automatic decode-to-render-size capability that was added in the framework in Windows 8.1.
NOTE: This auto decode-to-render-size feature basically only decodes an Image to the render size even if the image is larger. So if you had a 2000x2000px image but only displayed it in 100x100px then we would only decode the image to 100x100px size saving a lot of memory. The standard Image element does this for you.
NOTE: This auto decode-to-render-size feature basically only decodes an Image to the render size even if the image is larger. So if you had a 2000x2000px image but only displayed it in 100x100px then we would only decode the image to 100x100px size saving a lot of memory. The standard Image element does this for you.
For most apps that control your image sources, you probably are already saving images that are only at the size you are displaying them so it may be okay. However for apps like social apps or where you don't know where the source is coming from or your app is NOT resizing the image on upload, etc. then you will want to ensure you save memory by specifying the decode size for the ImageBrush's source specifically. This is easily done in markup using a slightly more verbose image source syntax. Using the above example it would be modified to be:
<Ellipse Width="250" Height="250">
<BitmapImage DecodePixelHeight="250" DecodePixelWidth="250" UriSource="ms-appx:///highfive.jpg" />
No real change other than telling the framework what the decode size should be in Line 5 using DecodePixelHeight and DecodePixelWidth. The rendering would be the same in my case. This tip is very helpful to when you are most likely going to be displaying a smaller image than the source and not the other way around.
So there you go. Go crazy with your circular people representations! Hope this helps.
Wow, what a week. I have to say even as employees of Microsoft, we get surprised when we go to our conferences and see some of the bigger announcements. There are things that are being worked on that are new or just in different divisions that we're not focused on. This past week at the Build 2015 conference was an example of that for me. Lots of good stuff for developers from client to server!
At Build this year we introduced the Universal Windows Platform v10 with a set of new APIs and unified features for all Windows devices. Perhaps the best vision of this is the Day 2 Keynote where Kevin Gallo walked through an example of this and a single app running on tablet, phone, Surface Hub, HoloLens, etc.
Visit the keynote and watch the whole thing or if you want to jump to the start of this portion it starts at about 23 minutes in. A really well done, compelling demonstration of the Universal Windows Platform.
For the XAML developer on Windows, there was a lot of goodness shown from my team. We've been working hard on a lot of internals and new API exposure for the Universal Windows Platform. Our team had some representation in some deep-dive sessions from Build and the recordings are all now available…here's a list for you to queue up:
One of the things I was really happy to have is part of the Office team come and talk about how they build Office on the same platform we ask you to build apps on. It is good insight into a large application with lots of legacy and goals that might not be typical of smaller apps or smaller ecosystems. A big focus for XAML this release was performance given that customers like Office and the Windows shells themselves leveraging XAML for their UI.
I hope that if you are a XAML developer you take some time to look at what new features are available in the Universal Windows Platform for you in Windows 10.
If you want to get started playing around, the best way is to be a part of the Windows Insiders program. Everything you need to get started you can find here https://dev.windows.com/en-US/windows-10-for-developers. You'll want to join the Insiders program, then download the Visual Studio tools and get started creating/migrating apps! To help get you started after that here are some helpful links:
As you play around with the bits, please continue to give us feedback. The best way is to be involved in the conversation on the forums. Ask questions there, get help from the community, share learnings, etc. Secondarily the Windows Insider Feedback tool (an app that is installed on Windows already for you as 'Windows Feedback') is available for you to give direct feedback to the teams. Please choose categories carefully so that the feedback gets directly to the right team quickly.
Thanks for helping make the Windows Platform better. I hope these direct links help you jumpstart your learning!
I can't wait to talk XAML at Build 2015 with you all!!!
Hey all! Been really quiet here on the blog as I've been focusing on both new personal and work aspects of my life. On the work front, the team I work on has been working hard on delivering on our promise of converged Windows app development using the native UI framework for the platform – XAML. It has been a real journey of change, stress of new customers and some exciting changes to the platform that are just the beginning.
My team (XAML) and the entire Windows Developer Platform team will be joining thousands of you in San Francisco for Build 2015 to share what we've been working on for Windows 10.
I'll be joining members of my team in San Francisco to talk about what's new in the UI framework, some ideas/tools/new 'stuff' to build apps across mobile and desktop, improvements in data binding, all the work we did in the platform for performance, and more!
Aside from San Francisco, I've been fortunate enough to be asked to deliver an address at a few events as a part of the Build Tour. These are a set of events across the globe (25 events running from after Build main event until near end of June) that bring the best of Build along with local flare/content with partner showcases and are FREE events!
I will be joining the local community of developers in Atlanta (20-May-2015 at the Georgia Aquarium) and Chicago (10-June-2015 at The Field Museum of Natural History) in the United States event. Unfortunately (for me as well as I would have loved to meet more in the world) some of the international events conflicted with personal obligations so more of my colleagues will be attending those representing the developer platform.
Please consider joining me and colleagues around the world at these FREE events by registering for your closes Build Tour at http://www.build15.com and encourage your friends and co-workers to register as well!
I look forward to sharing our work with you, hearing your feedback about the Windows developer platform and seeing what kind of apps you are bringing to the ecosystem for our mutual customers!
See you in San Francisco, Atlanta and Chicago!
TL;DR – I got off my butt, started eating better and lost 40lbs in ~100 days. You can too.
UPDATE: As of NOV-2014 I'm down 55lbs since this timeframe. Feel amazing, found new hobbies that are active and loving life again.
This year started very depressing personally as each look in the mirror showed another chin growing under the previous. I weighed the most I've ever weighed in my life and it just kept getting away from me. My move to Redmond brought back a different office life for me from my previous role at Microsoft and I became much more sedentary than before. Now, this doesn't mean I was a triathlete before, but I certainly didn't sit in an office as much as I have in the past 4 years. I really put myself fully into work and nothing else…and it showed physically.
As my kids got more active (I have two kids; 8 and 12) I participated more with their activities. I realized how out of shape I was when I couldn't ride a bike like my kids, couldn't run around the baseball field to help with Little League practices without being out-of-breath, etc. I had to do something. The problem is I've 'tried' before a few times. I haven't really dedicated myself but tried dumb diets and various techniques to lose weight, get active and get healthy. None worked…or I should say none lasted long at all. Perhaps another catalyst is the fact that I turn 40 this year and my wife keeps bothering me about "project 40" and being the best we can in our 40's. These all combined to be a wake up for me to really, really try harder to get fit and healthier.
As of this writing I've lost 40 pounds! I'm very happy with my results so far as it is much more than just pounds, but I still have a way to go for full change. I wanted to share my 'program' with others in the tech community as I think others probably suffer from the same sedentary work/life style as I do and probably use the same excuses that I have in the past as well.
For context, I'm a white male, 39 years of age, 5 feet, 9 inches and started weighing 225lbs at the start of this process. I started wearing a size 38 pants, wore an XL (and sometimes it was snug), and my dress shirts were 17.5 collar. I have no idea of my body fat percentage other than it was probably a lot when I looked at my man boobs and belly. Maybe too much information for a blog post? Oh well, now you know where I was coming from.
I hesitated to write this secret in a blog post because I could make MILLIONS sharing it as the health industry is booming right now. But I'm generous so here's the single secret formula to losing weight and getting fit: STOP EATING SO MUCH CRAP AND MOVE AROUND MORE! Seriously, anyone who really tells you any different is just lying. Yes I'm aware there are medical conditions. Yes I'm aware there are tons of studies around the plagues of white bread. Yes I'm aware that there are fads that encourage eating only things that dinosaurs could have eaten. I don't care. Seriously. Nothing can sustain your fitness more than the realization that you just need to eat smarter and be active. I don't think this involves you turning into a gym rat, nor does it involve requiring any significant investment in stuff/supplies/equipment, but it does involve dedication and time…sometimes two of the hardest things to give up.
No amount of exercise will help if you keep stuffing yourself with crap food. That was a big part of my problem. I LOVE food…all kinds – I don't discriminate at all on food. Ever. I would eat whatever I thought tasted good…and lots of it. There is no way anyone can really lost weight and get fit without changing the habit around eating smarter. Notice I didn't say diet, or only eat plants, or whatever. Eating smarter isn't always about eliminating everything, but about being aware of what you are eating.
For me, the easiest way was to track calories. Now I don't care about anyone who is going to jump on my method and say 'counting calories is not the right way, blah blah' – I don't want to hear it. For me it is a simple formula. More calories in…more weight. Less calories…less gain. This method also allowed me to basically continue to eat whatever I wanted. My eating habits would change naturally because guess what – an 18oz rib-eye is a lot of calories! There are other methods like Weight Watchers that are similar ('points' based) in basically assigning a value to all foods you eat. I think these approaches are the easiest to understand and manage.
The best way to understand what you are eating is to write it down. Seriously write EVERYTHING down. And I'm not talking "sandwich" is what you write down, I'm talking "two slices wheat bread, 1.5oz turkey, 1T mayo, 1oz cheese" detail here. There is no way you can begin to understand how much you are eating unless you understand it at that level. For basically 4 months I wrote every ingredient down in every meal I ate. It started out to be incredibly annoying but just became routine and I used tools to make it easier (see below).
My wife helped out a lot here as she's been trying to eat more "clean" foods. Whole foods. Our home doesn't have a lot of packaged foods anymore and our refrigerator looks like a farmer's market most of the time. Do I miss a lot of foods? HECK YES! But now that I'm at my goal I can indulge a little bit more and moderate the 'not good but tastes great' stuff more easily.
For me, I had to radically change my diet. I wasn't eating any breakfast usually (and when I did it was a chocolate-filled croissant), would have whatever the café special was at work (usually high in calories) and would LOVE to go out for dinner at typical restaurants (Mexican, Asian mostly). I also had a soda for lunch and didn't really drink much else during the day. I changed this completely. I focused on trying to eat more protein, less sodium and less sugars. I didn't really focus on other specifics like carbs, etc. Here was a typical day for me food-wise:
That's the essence of it. It was/is VERY hard change for me and my food love. But it was necessary to get me back on track. I think I'll be celebrating my goal victory with an amazing meal but will be smart about my choices more often than other times. This is what worked for me. Calorie counting doesn't work for everyone and there are a ton of opinions about it…but for me, it worked and I have the evidence to prove it.
I first realized I needed to exercise and move around. I am not an athlete at all other than golf and in the Pacific Northwest that is harder to be active in golf regularly for me than it was in Arizona. I'm not a runner. I'm not a biker. I had a gym membership for two years that never saw a single swipe of my membership card. Ever. I'm horrible at exercise. I realized though that extreme times calls for extreme measures. I'm not one that is going to be real proactive in determining what I should be doing and I would likely get lazy quick. For me, I need someone to guide me to jumpstart, etc. I've had friends talk about the P90X3 routines so I decided I was going to go that route. My wife was going to do it with me as well so I'd have two people yelling at me to keep going!
For those who don't know, P90X3 is a pretty intense exercise routine to be completed in 90 days. It is a derivative of other P90X programs, but the latest form is shrunk to 30 minutes/day of intensity. I figured that was a good time block I could commit to as an hour just seemed like I'd give up. I have a great benefit plan at work that actually paid for the DVDs and some equipment for me. I chose the P90X3 Basic Kit to start. And I just started. That's it, you just have to start.
This program is intense (for me at least). It is 30 minutes of non-stop exercising. I cannot do a pull-up yet one whole 30 minutes is dedicated to doing pull-ups, then drop-down to push-ups, then back up to pull-ups – repeat for 30 minutes…seriously. FWIW, I still can't do a pull-up. Because I learned this early, I also got a set of resistance bands as the 'modified' workout for these types of things. For the 90 days I did almost always the 'modified' version shown in the DVDs as I sometimes just couldn't lift my unfit body into the positions they were asking!
Time of day was important to me as well. I chose the morning before everyone got up. My house really sucks for this type of exercise, but I did my best to make it work. Each morning around 6 or 7 I'd get up with my wife and we'd put in the DVD and just start. I'd grunt, complain and get frustrated…but I did it each day. 30 minutes seemed like an eternity but it was a great chunk of time to be able to get started. There were 2 weeks that were really tough. One week I was traveling to Russia and did my best to exercise on-track with the program, but admittedly it was harder not in your comfort zone.
SIDE NOTE: These people are still shipping DVDs only. I had to scramble to remember how to burn a DVD, only to also have to find a DVD drive to burn them for my travel. C'mon people, digital copies!!!
SIDE NOTE: These people are still shipping DVDs only. I had to scramble to remember how to burn a DVD, only to also have to find a DVD drive to burn them for my travel. C'mon people, digital copies!!!
The second week we had a house full of visitors and they occupied my workout area. This gave me a good 'excuse' not to do it, but I felt horrible for missing my commitments that week.
I also chose to get more active in general. I volunteered for helping my son's Little League team. It doesn't sound like much, but again when you are out of shape, you try running around a field catching balls constantly hit into the outfield! I also had so much fun with Little League that my wife and I started a co-ed softball team with the city. We suck bad, but it keeps me active and I'm having a ton of fun playing softball! Most recently I went and invested more into my fitness and acquired a bike. I have been riding at least twice weekly to work and on the weekends. I live in a place where everything is uphill and this is proving to be a challenge to me, but again, I'm making a commitment to being active, no matter what. In the short time I've become addicted to cycling now and being a gadget freak doesn't help my cause…so many cool gadgets for cycling!
There are also little things I do, like only take stairs now at work, walk whenever possible between buildings that maybe I used to shuttle between, etc. These are small things but they add up.
Outside of the actual exercise equipment (resistance bands, dumbbell, DVDs) my tools I used were only three more: a scale, a heart rate monitor and the Lose It! app.
At first I only weighed myself once a week. I recommend this in the beginning as well. When I started seeing results I started getting more excited and got more aggressive with my goal plan and was motivated by immediate results. I started weighing myself daily. Same place, same scale, same time every day. For me it was after my morning shower. I logged my weight each day – the gains and the losses. It served as a constant reminder of how close I was to my goal and how much progress and success my plan was working. I used a simple scale, not a fancy Bluetooth/Wi-Fi thing that automatically synced with an app (although that would be cool).
I wanted to estimate my calorie burn during exercises. I acquired a heart rate monitor in order to assist. I chose a Timex watch combo that I found a good deal on and love. I completely acknowledge that calorie burn on these things are not an exact science and estimates. Don't flame me about that in the comments. Again, this is something that worked for me. I used it for each workout and to be aggressive I would subtract 75-100 calories from what it said I was burning in the exercise. I felt this really was a valuable tool to my success. Doing the P90X3 routine after a while I knew that the MMX workout, for example, would burn a certain amount of calories so sometimes I didn't use the monitor if I knew that I was doing the workout the same as previously.
Lastly the best tool for me was the Lose It! app. I know some of the folks that wrote this app and so I've had it installed for a long while. Since then there are others like it, probably the most popular other one being MyFitnessPal. I started with Lose It and I like it so I haven't switched.
NOTE: MyFitnessPal is also free and actually has more connection points to services, etc. than Lose It's free version. Lose It has a premium fee ($40/yr) where you can do these same things that MyFitnessPal provides for free. It might be enough for me to switch but I like the Lose It app method of program for goals.
NOTE: MyFitnessPal is also free and actually has more connection points to services, etc. than Lose It's free version. Lose It has a premium fee ($40/yr) where you can do these same things that MyFitnessPal provides for free. It might be enough for me to switch but I like the Lose It app method of program for goals.
Lose It (and similar apps) provide everything I need to achieve my goal. It provides a method for establishing a program based on current/goal weight and gives you a daily calorie budget to monitor. You add exercises (estimating calorie burn) and can create your own custom exercises as I did with the P90X3 routines. It has a food log that includes a scanner so if something you are eating has a UPC symbol (or even the ingredients), then you can scan it and get all the nutritional info not just calories. Others have this too. It has a social component that you can join challenges and have other micro-goals to achieve. The food log became the most valuable tool for me as I mentioned earlier that writing down what you are eating is the most insightful thing to weight/food/portion control.
These simple tools was all I needed to be successful.
So hear I am 109 days later from the point I started. What are the results? Here's the raw numbers:
Of course your results may vary. People's attitudes, abilities, body shapes and physiological make-up are all different and I'm not here to say that anyone would get the same results as me. Maybe some would be better, some worse. I'm certainly not going out and buying coach shorts and muscle shirts yet, nor am I ready to put my before/after pictures on display for the world to see but I'm proud of my results so far and feel a lot better about my health now than I have in quite a long time.
If you are reading this blog you probably are in the same industry as me (tech) and maybe you face the same challenges of constant sitting for long times, no exercise, crap food for 'convenience' and just perhaps the same laziness that I suffer from. Well, if you have anyone that cares about you, or that you care deeply about then you owe it to yourself to take a moment and think about your health and what you can do. For me I was just gaining too much and it got to a point of concern. The single-best wake-up call for me was starting to track what I ate. It was obscene the amount of calories I was stuffing my face with and the types of food I was okay eating on a regular basis. I don't think a Snicker's bar is bad…but all things must be in moderation and I just wasn't. Take a step even if you feel in good health and write down your food for a week. It might surprise you as much as it did me and perhaps may trigger you to do something. If you are already eating right, exercising and a healthy person then bravo for you!
I am no fitness coach, no health expert, no dietician. I'm just some normal guy who was fed up with my laziness and decided to do something about it. The decision and steps were NOT easy for me. In fact, they continue to be difficult for me. But I have proof now in my own abilities to get healthy, eat smart and learn to love types of exercise. I have found something that works for me.
Hope this helps anyone!
Before Windows Live Writer was even publically released, I was glad to have been an early beta user/tester of the product. The team thought early about an extensible model and it has been my content authoring tool ever since. It has allowed me to use *my* preferred content workflow with my cloud providers/formatters/tracking and other such plug-ins due to this extensibility.
One of the first plugins available was one of mine I called Flickr4Writer. It was pretty popular (as most 'firsts' are) and I got a lot of good feedback that changed the functionality and user interface. Is it the best design/code? Probably not, but it seems to have served the needs of many folks and I'm happy about that. I put the code into the Open Source world around the same time and it never received much uptake there and only one contribution of literal code (plenty of feedback).
I depended on an early library that was created called FlickrNet. I contributed a few small fixes during my development of Flickr4Writer to the cause. This has been a very popular library and I think even used in some close-to-official Flickr apps for the Windows platform. It served my purpose fine for a LONG time…until 2 days ago.
Because Flickr4Writer was pretty much complete and 'bug-free' for the mainstream cases, it hadn't been touched in years and there was never any need. I felt no need to fiddle with code at all that didn't need to be messed with. Another factor also was that Live Writer plugins are pretty locked on .NET 2.0 for loading, so there was no real incentive for me to move to anything else. Two days ago I started getting emails that Flickr4Writer was not working anymore. One writer sent me a very kind note detailing what he felt the problem was due to the recent API changes required by Flickr. One 27-June-2014 the Flickr API went SSL-only and pretty much all my code broke. Well, to be true, the version of FlickrNet I was using no longer worked. It was time for me to update.
I spent a few hours today switching to the latest FlickrNet library (and using NuGet now since it is published that way now) and take the time to switch over all the now-obsolete API usage my app was using. I hit a few speed bumps along the way but got it done. I sent the bits to a few of the folks that emailed me and they indicated it was working so I'm feeling good about publishing it. So here is the update to Flickr4Writer, version 1.5 and the steps:
This worked for a set of folks and a few tests I did on my machines. Performing the re-authentication is key to get the updated tokens for the API usage for this plugin. I apologize about making folks uninstall/re-install but the installer code was one thing that was really old and I just didn't want to spend too much time getting that working so I just created a new one.
I'm really glad people find Flickr4Writer useful still and I apologize for not having an update sooner (I actually didn't get the notice that Flickr indicates was sent out…probably in my spam somewhere) but I appreciate those users who alerted me to the problem quickly!
Hope this helps!
Recently I embarked on porting the TagLib# library to a Portable Class Library (PCL). In my efforts I noted some frustration I had of the "convert and compile" flow to find issues. Well, turns out I didn't have to do that much pain as pointed out by Daniel in the comments! The .NET team has released a tool to help out us developers called the API Portability Analyzer (currently in Alpha). This tool basically looks at any existing .NET assembly and gives you a report to help you see where the APIs used are supported in the various .NET profiles available.
The tool is a single command-line exe and is as simple as launching:
ApiPort.exe path-to-your-assembly-file.dll
I recommend putting this in your path somewhere so you don't have to remember the full path to launch. The output from the console tells you very little and only really about what you it is doing:
Microsoft (R) API Portability Analyzer version 1.0 (alpha)
Copyright (C) Microsoft Corporation. All rights reserved.
To learn more about how this tool works, including the data we are collecting, go here - http://go.microsoft.com/fwlink/?LinkId=397652
Identifying assemblies to scan. Done in 0.01s.
Detecting assembly references. Processed 1/1 files.Done in 0.23s.
Sending data to service. Done in 2.88s.
Computing report. Processed 508 items.Done in 0.02s.
Writing report. Done in 0.17s.
Replaced output file "c:\ApiPortAnalysis.xlsx"
You may notice that the tool says 'sending' and yes, it is communicating with a public service. The team notes this in the download:
NOTE: During the process of identifying the .NET APIs used by a binary Microsoft collects the list of .NET APIs used by the user submitted binaries. Microsoft also collects the names of various user created APIs. The tool does not collect the binary code, only names of APIs are collected. Microsoft will also collect assembly information such as assembly references for the binary & the Target Framework Moniker (TFM).
NOTE: During the process of identifying the .NET APIs used by a binary Microsoft collects the list of .NET APIs used by the user submitted binaries. Microsoft also collects the names of various user created APIs. The tool does not collect the binary code, only names of APIs are collected. Microsoft will also collect assembly information such as assembly references for the binary & the Target Framework Moniker (TFM).
The real value is in the output data conveniently formatted into a pre-filterable Excel document. The process was fairly fast for me, but I suspect might take longer for larger libraries (duh). An example of the output is like the one here directly showing the TagLib# data that I used above.
If you read my previous post you will see that the areas I had frustrations about are clearly identified in the Unsupported columns for my target platform. The tool attempts to recommend some alternatives when it can. I can imagine this gets better over time as the recommendations for TagLib# were only two, whereas it should have provided recommendations for XmlDocument/XmlElement/etc. to the XLINQ equivalent areas.
In the end though, this is a helpful tool for those looking to convert. I wish I had known about it in advance, but now that I know it is in my toolbox and my PATH!
A long while back I had written a quick sample when Silverlight introduced drag-and-drop into the framework. Then I decided to show dragging MP3 files into a Silverlight app and reading the metadata and album art. In order to accomplish this I had to read into the ID3 data from a Silverlight library. I found a few libraries but settled on TagLib# to do the job. I had to modify it a bit to get it working in Silverlight as the .NET profile wasn't the same. Recently a surge of people have been emailing me for the code. I spent time searching and apparently I didn't think the TagLib# modifications were that important because I never saved them anywhere! A conversation started on Twitter and I decided to devote some "20% time" to making these modifications and take it a step further and make it into a Portable Class Library (PCL). Here's my journey…
My first task was finding the source of truth for TagLib#. The main link on the Novell developer site was broken and stale. I found it on GitHub and started looking around. It really hadn't been updated in a long while (after all, it really didn't need to be fore core .NET framework) and the project is very stale. There is no open issues list on GitHub as you have to use Bugzilla, but that didn't even look like it was getting much attention. I emailed the maintainer listed in the authors file in the repository and he indicated he's not really the maintainer. This felt like a project kind of fizzling down (if not fizzled already).
In looking at the tests, the project structure, and taking into account that I may want to do some things different, I made the decision to fork rather than clone. I'm not totally married to the decision but I don't think anyone is keeping the lights on to take a pull request either though. I forked the code and started with new projects and using Visual Studio 2013 as my tool of choice.
At first I thought that I would be doing perhaps a few different flavors, portable and full .NET framework. Because I thought I would I decided to use the new Shared Project system in Visual Studio 2013 and the new Shared Project Reference Manager VS extension that allows me to add references from any project to shared code easily. This gives me the flexibility for the future and sets my project system up in advance. You'll see in the end I haven't actually needed to take that step and perhaps won't even need the Shared Project anymore, but for now I'm keeping it as it does me no harm.
Once I moved the code over and set my target profile for PCL, I hit build. Whoa. About 140 compile errors. Immediately I thought that I didn't want to spend the time. I took a look at the issues and quickly realized that the base code had, in fact, changed a bit from when I messed with it in Silverlight. I started making a list of the things that weren't compiling as I was targeting .NET 4.5, Silverlight 5, Windows 8+, Windows Phone 8+, and iOS/Android (Xamarin). The biggest errors came from the fact that the library was still using XmlDocument and hadn't moved to XLinq. Beyond that there were things like Serializable, ICloneable, ComVisible and File IO that weren't going to work. I got really frustrated quickly and about gave up.
Working at Microsoft I am fortunate to have access to try more things and indeed I reached out to some folks for help. I was able to get some things working continued with XmlDocument, but it didn't feel right and starting to think about releasing this updated library I just realized this wasn't going to work. I remained frustrated.
Sometimes when you are frustrated you just want to vent to the world. We call that Twitter these days. I was pulling some hair out and posted a comment, which was quickly replied by a member of the .NET team with a bit of a touché comment.
@timheuer Funny, because I spent the day trying to write Windows XAML from the millions of WPF examples in the wild. :)— David Kean (@davkean) May 23, 2014
@timheuer Funny, because I spent the day trying to write Windows XAML from the millions of WPF examples in the wild. :)
I chuckled but I also knew that David and others were going to be the key to helping me find the fastest path here. I started emails with the PCL team, including David and Daniel, who are incredibly knowledgeable and responsive. I finally got most working and then my colleague and I started chatting about my frustrations. He worked on XLinq for a bit and basically told me to suck it up and do the conversions and that it wasn't that bad. We walked through a few of the scenarios and indeed it really ended up all being isolated into one area that I could quickly scan through. I could now remove my dependency on XmlDocument and have no other dependencies for this portable library.
Hooray for helpful people! Even when you vent, the good peeps will still help out!
After the full conversion, a few things remain. Right now I have #ifdef'd out come of the interfaces and attributes that weren't working. Once I get to a point of porting all the tests over, I'll decide if they are even needed. Perhaps the biggest change though for users of this lib will be the removal of the default string path of file access. In discussing with some folks, I could have tried to make a portable storage layer work, but it started to make less sense quickly to do that in the library and leave that simple task to the app developer. This provides flexibility for the app to do what they want without the library trying to work around how different platforms do their file IO routines. What that means is that the default way of reading a file's tags changes from:
var tagFile = File.Create("ironlionzion.mp3");
var tags = tagFile.GetTag(TagTypes.Id3v2);
string album = tags.Album;
' file is a StorageFile
var fileStream = await file.OpenStreamForReadAsync();
var tagFile = File.Create(new StreamFileAbstraction(file.Name, fileStream, fileStream));
var tags = tagFile.GetTag(TagTypes.Id3v2);
string album = tags.Album;
in a simple case. Yes, you as the app author have to write a bit more code, but it puts you in control of ensuring the file location you are reading. You can see here that I did add my StreamFileAbstraction class to my fork by default, which was the key in the Silverlight port and is actually the key for WinRT as well. Any app developer can create their own IFileAbstraction implementation and substitute it in the ctor of the create functions and be ready to read. I actually did this in the test project to re-implement a LocalFileAbstraction for test purposes and used the System.IO.File classes to achieve that, which are available when running VS unit tests.
What started out as a frustrating exercise turned out to be helpful for me to better understand PCLs and hopefully add value to those who have been asking for this. As mentioned, this isn't fully tested and still a ways to go, so if you use it please log bugs (and help fix them) to complete the implementation. I won't be working on this full time of course, but do hope to get the test suite ported over as well. Here are some relevant links:
I'm just coming back from Build 2014 and it was a great pleasure to talk to customers/developers. It is one of the best parts of my job right now in seeing how customers use the technology our team represents. If you are a XAML developer and didn't have a chance to go to Build or haven't watched all the sessions, here's a quick short list of recommendations I'd have:
There are many more (app model, localization, accessibility, tiles, notifications, etc.) so please do look at the event site and download/watch your favorites. I think the list above gives you a good intro to the UI area changes and introduction to the concepts of Universal Windows apps. If you haven't heard of that concept yet, you can jump to the Keynote from Day 1 for the quick demo.
The last session above is one that I want to write about today in this post. In current form, a Universal Windows app in Visual Studio Update 2 allows you to maximize your sharing of code/assets across your Windows Store and Windows Phone app. If you are like most developers, you rely on a great ecosystem of libraries and SDKs to augment your app and add functionality, UI or make things easier to develop. In our keynote sample, the app we migrated (SportsLeague app) used JSON.NET and we showed that we are able to re-use the same library (which in this case happened to be a Portable Class Library, aka PCL) across the different endpoints.
One thing that is important is that you will need to add these references to each of your project 'heads' (the term we use to describe each endpoint in a shared project solution). For some that are using direct binary DLL references to PCL libraries should be okay. For others that are using Extension SDKs and/or NuGet packages, you may find yourself into some scenarios where either the SDK is different or the NuGet package isn't updated yet to understand the Windows Phone 8.1 project type. There are a number of these that are already updated like JSON.NET, Caliburn.Micro, etc. If you find yourself using a library that isn't updated yet, you may want/need to prod the author to update. Better yet, if it is Open Source, submit a pull request with the update yourself!
The other category are things that might be platform-specific and/or native. These things are generally more complex than something that might work in a PCL and have dependencies on various native compiler/linker options or have been compiled in such a way that are different for the Phone device versus a tablet device. One such example is SQLite.
SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private. SQLite is currently found in more applications than we can count, including several high-profile projects.
SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private. SQLite is currently found in more applications than we can count, including several high-profile projects.
SQLite links against the C++ Runtime and as such needs to make sure the right linking happens for the phone and tablet CRT profiles. Right now, the SQLite for Windows Phone Runtime 8.1 is in some testing, but since a lot of people have been asking me about it, I'll share my private build from source of the SDK. This comes with a "works on my machine" guarantee :-). This is a build of SQLite from their source, which is Open Source, and modified to compile/link against the Windows Phone 8.1 SDK. When the official version comes out you should update to that version from their site. For now, you can download my build of UPDATE (12-MAY-2014): SQLite team put out their official build for Windows Phone 8.1: SQLite for Windows Phone 8.1 here.
If you are an author of one of these SDKs that people use, please consider doing an update to make your customers happy. If you are an Extension SDK provider you will want to produces an Extension SDK for Windows Phone 8.1. If you already have a WinRT SDK, then you may just be able to copy the manifest, etc. and just produce changes to your manifest so it installs to the right location. Here is an example:
<Installation AllUsers="true" Scope="Global">
<InstallationTarget Id="Microsoft.ExtensionSDK"
SdkName="SQLite.WinRTPhone81" SdkVersion="22.214.171.124" />
As you can see in lines 3,4 above the TPI/V values are different than your existing SDK which tell the SDK where to install.
If you are an author of a NuGet package, you also will want to make your package Windows Phone 8.1 aware. Again, if you have an existing package that works with Windows 8.1, then you may just be able to duplicate the content/lib/tools to a folder labeled 'wpa81' and test that out. Example NuSpec:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<authors>Tim Heuer</authors>
<owners>Tim Heuer</owners>
<file src="lib\portable-win81+wpa81" target="lib\portable-win81+wpa81" />
If you see at line 11 the 'portable-win81+wpa81' it allows me to combine the two targets telling NuGet this applies to either. Of course if I had any nuanced differences I could also just use 'wpa81' and put the phone-specific lib (or assets) there.
In both cases if you have any UI aspects, most likely you may want to do some work here to make sure that any UI assets are tailored to the device targets for a great experience.
I hope this helps clarify some of the reference questions that I've received and I hope that if you are an SDK author you will work quickly to help your customers realize their goals of a universal Windows app!
Recently I've been writing a few XAML Behaviors for Callisto and looking to take some contributions on this front as well. One thing that I realized is that this will bring in a new dependency for my toolkit. I'm still trying to figure out if I want to do that or not, but that's not what this post is about. My #1 consumers of Callisto are using the NuGet package. I also distribute Callisto through the Visual Studio gallery as an Extension SDK.
What's the difference you ask?
While not an official answer, this is my basic definition I always describe to people. It is not complete comparing all features but defines what I see as the core difference between the two.
An Extension SDK is installed per-machine and allows you to install it once and use for multiple projects. It is deployed through the Visual Studio extensions mechanism (VSIX) which has a feature that allows for you to be notified if a version is updated in the IDE. This is a proactive update that even if you just have VS open you get a little toast if any of your extensions are updated…very handy. Extension SDKs also have some cool features about enabling you to supply design-time assets that don't ship with your application and also provide some nice per-architecture deployment capabilities rather easily. Extensions SDKs have great support for native projects as well.
NOTE: People sometimes confuse VSIX == Extension SDK. VSIX is a packaging and installer mechanism, not an SDK only. You can have a VSIX that deploys a tool, templates or an SDK.
NOTE: People sometimes confuse VSIX == Extension SDK. VSIX is a packaging and installer mechanism, not an SDK only. You can have a VSIX that deploys a tool, templates or an SDK.
A NuGet package is installed per-project when added as a reference to your project in Visual Studio. You can add them similarly through the "Add Reference" type dialogs (although in VS it is called Manage NuGet References) and once you select your package it is installed (per the package's manifest instructions) into your project. If you want to use the package for multiple projects, you must repeat this step for each project. One benefit of the NuGet route is that it does become a part of your project, you can check it in to source control, etc. One disadvantage currently is it doesn't do the design-time aspects and the per-architecture deployment aspects well.
You might look at these differences and wonder why you would want to take a dependency on a per-machine item in a per-project package. And you'd be right to ask that question. Again, I'm still wondering myself. However one thing to note is some Microsoft-delivered SDKs are delivered shipped with Visual Studio as Extension SDKs, as is the case with the Behaviors SDK. So you can't have VS installed without it, but NuGet also can be used in non-VS scenarios as well. This can be complex depending on your package/needs. For mine, this might be acceptable.
I admit that this title is a bit misleading, but allow me to explain first. NuGet allows for you to extend the package install a bit by including a PowerShell script to run during install (and uninstall) of the package. This script can give you context of 4 things in your project/tools environment: install path (where the package is being installed), tools path (the folder where the script will actually reside), package (the NuGet package object) and project (a reference to the IDE Project instance). It is this last piece that helps you manipulate the project structure.
In Visual Studio 2012 a new interface was added to the VS project extensibility to accommodate automating adding Extension SDKs. This new interface, References2, includes a new method AddSDK. This is the hook where you can add Extension SDKs.
NOTE: The other methods of Add() are still supported and would allow you to add references to files, GAC assemblies, etc.
NOTE: The other methods of Add() are still supported and would allow you to add references to files, GAC assemblies, etc.
The AddSDK has 2 parameters but only one is required, the identifier of the Extension SDK (it is weird to me that the first param is optional but oh well). The ID of the Extension SDK is the name of the SDK (as defined by the deployed folder or the ProductFamilyName in the SDKManifest.xml) combined with the version number. A final string to pass in the second parameter of AddSDK is then something like:
BehaviorsXamlSDKManaged, version=12.0
Now that we know this format we can add this to our NuGet install PowerShell script. Here's an example of what one might look like:
param($installPath, $toolsPath, $package, $project)
$moniker = $project.Properties.Item("TargetFrameworkMoniker").Value
$frameworkName = New-Object System.Runtime.Versioning.FrameworkName($moniker)
Write-Host "TargetFrameworkMoniker: " $moniker
if ($frameworkName.Version.Build -ge 1)
Write-Host "Adding Behaviors SDK (XAML)"
$project.Object.References.AddSDK("Behaviors SDK (XAML)", "BehaviorsXamlSDKManaged, version=12.0")
Notice the first line with the param() function. Per the NuGet documentation this is required to get the environment objects like $project. Now in line 8 we have a reference to the VSProject, then can get at its object model, get to the references and add one to an Extension SDK, in this case the Behaviors SDK installed with Visual Studio 2013.
The tricky thing with this approach is that when someone were to remove a package you may be tempted to remove the SDK reference as well. Since there is not really good tracking whether someone may be using the reference, it is advised against that approach. Your app developer may be using that Extension SDK now outside of your package and you have no reliable way of knowing that. What you can do is alert the developer during uninstall:
param($installPath, $toolsPath, $package, $project)
Write-Host "Callisto was removed, however Blend SDK (XAML) was not
as it may be a dependent reference on other things in your project.
If you do not need it, manually remove it."
Not awesome, but helpful at least to output some data to the developer.
Again, while this may be unconventional and some NuGet purists will scoff at the mere suggestion of doing something like this, it is good to know this is easily available. My goal is to help developers (including myself) and if there are ways to merge these two worlds of Extension SDKs and NuGet packages until (if?) they unify then by all means I love helping make my productivity better.
I'm an avid user of Twitter (join me on Twitter @timheuer) for things social, family and technical. I use it to keep in touch with friends, learn things from technical sources, get news and otherwise interact with names I've never met in person. My use of Twitter has changed much over the years and I've found myself just using the web site more and more while on the desktop where a full browser is available. On my mobile I use native clients but presently not one of the 'official' Twitter mobile apps (I find them less full-featured than the 3rd party ones which also offer a better performing experience for me). In my use of the web site I've noticed more and more links that say "view summary" in my feed.
Sample Twitter Summary Card from dev.twitter.com
When expanding this, the twitter post (which is limited to 140 characters itself) basically provides more information about the post. The most frequent I've seen is what Twitter calls a Summary Card, which reads metadata from the URL posted in the Tweet, effectively extending the 140 character limitation a bit (however summary descriptions are limited to 200 characters). I post to Twitter most of my blog posts and thought it would be a great little enhancement to provide this summary data in the feed view (it isn't expanded by default so users must explicitly click 'view summary' and thus there is no real risk of making your Twitter feed more noisy without you choosing to read more).
I recently learned more about these after a quick exchange with @JeffSand (former director at Channel 9, now at Twitter) about another implementation (more on that later) and thought I'd get into doing the Summary Card for my own personal use. Twitter has some pretty decent documentation on this topic on their Dev center. There are a few types of Cards available for content authors to leverage and the great thing is that you, the content author, really just have to add metadata to your content and that's it. Twitter feeds/apps do the rest by interpreting and displaying that data in a Card view in the feed.
Summary Cards seem to be the most popular to me but that could be just my own personal use. The others that I could see add value are the App info/install and deep-linking ones. These do presently, however, seem to add most value in the mobile space and not the desktop space.
After reading about these, I set out to add this metadata to my own content on my site.
At present I use Subtext as my blogging engine of choice. This is due to some choices made long ago using .Text and then migrating to Subtext when that transitioned the work. Subtext has served me very well over the years but is showing its age more recently as I've been desiring to modernize some things and leverage the vast ecosystem of WordPress type themes and plugins. Still, it is Open Source, written in ASP.NET and so I could modify things as I need.
I first went to the source of Subtext and thought I'd just upgrade. The version I run is the latest stable/release build of Subtext and hasn't really evolved since that version release a few years back. The version on GitHub now is moving toward ASP.NET 4, which is good and I thought I'd just move to that. I had an immensely painful time trying to do this upgrade and ultimately decided against it (blog post on my ASP.NET migration woes perhaps to come) as there wasn't much return on my time investment at present to do that.
The first thing you have to do is set up your Twitter Card. Twitter's docs have a cool Cards validator tool (only works on Webkit browsers for some reason) to give you a display of your card so you can tweak settings. Once you do this and have your metadata set up, you need to submit your URI to Twitter for validation. This step is critical or they won't show up. This step is also not entirely clear in the process and you may think that just setting the META tags are sufficient…they are not. Use the validator tool to see the second tab to "Validate & Apply" for your card view. I did a basic Summary Card for my entire site to get through this process so I could test/validate my own logic for the per-post metadata later.
I wanted the data from each of my posts to be a unique Summary Card as I felt that has been the most valuable I've used in my feed. Card data is implemented as META tags so your mileage may vary on how you need to implement this.
If you are a WordPress user, there is an amazing ecosystem of plugin developers who have already done this for you and you just install a plugin. It doesn't seem that Twitter provides a directory of recommended plugins for popular CMS systems, so I can't speak to which ones are reliable or not. Twitter Cards for WordPress seems to have a lot of downloads so I'd check that one out first if you are a WordPress user.
If you are a WordPress user, there is an amazing ecosystem of plugin developers who have already done this for you and you just install a plugin. It doesn't seem that Twitter provides a directory of recommended plugins for popular CMS systems, so I can't speak to which ones are reliable or not. Twitter Cards for WordPress seems to have a lot of downloads so I'd check that one out first if you are a WordPress user.
Unfortunately the way Subtext is architected doesn't easily let me jam new META tags into my site that are dynamic (there is a tool that allows me to easily add static ones without altering the page itself). A few properties for my cards would indeed be static (creator, site, domain) so I just used the Subtext admin area to add those. The title and description I wanted to be content-specific. I didn't modify the Subtext source, but rather created my own ASP.NET 3.5 control that did this. I put the code on my GitHub repository for you to view…you'll see it is a quick few lines of code. My control basically gets the context of the request, pulls the title/body out and sets these META tags. Now whenever I post a URL to Twitter, my Summary Card option will be there and provide some helpful information to the reader (hopefully).
Looking at the results, I'm happy with my quick hack. Outside of the web site, the cards only show on Twitter official apps it seems. Here are some examples based on my site content. The red box is only there to illustrate what content is actually the card:
View on twitter.com when expanding 'view summary'
View on Twitter for iOS when viewing full Tweet detail
View on Twitter for Windows
Simple metadata additions providing some more content beyond the 140 characters Twitter allows in the post itself. I chose to use my face in the image because my blog doesn't associate a "poster" image per-post. If yours does, you should use that if available and change the twitter:image value as needed.
This didn't take me long to implement and adds some additional value on to the content I post on Twitter (I hope). Again, this is optional for the user, they have to click "view summary" or view the Tweet in details view to see this, so there is no general feed noise here. I have found that it appears to cache the results per URL so there may be an issue if you change title/description on a post. I've found that my initial tests wouldn't update the previous Cards I had which were just the blog summary data…that's unfortunate, but now I know.
When I talked with @JeffSand he mentioned this would be nice to have the App cards for Windows Phone/Windows Store apps (ugh, we really have to do something about that name). I think this is a great idea! Unfortunately it looks like Twitter needs to do something to understand Windows apps as it only understands iOS/Google Play app stores. I've started a conversation with Jeff's team as of the date of this writing and hopefully we can understand what might be required and deliver some goodness here.
If you are a content publisher (hint: if you are a blogger you are) this is a subtle and helpful addition to your content in my opinion. If you are podcaster, consider using the Player Card as well. It was really easy to understand and implement and I like the results.

subset: commoncrawl