I am certain this is going to sound familiar to many, but while my colleagues and I embrace all things as a collective, quite often a specific technology or its use will be avoided, derided, and hated by some. Whether driven by ignorance, a particular terrible experience, or prejudice1, these deep-seated feelings can create conflict and occasionally hinder progress. For me, my use of LINQ has been a cause for contention during code reviews. I have faced comments like "LINQ is too hard to understand", "loops are clearer", "it's too easy to get burned using LINQ", and "I don't know how to use it so I'd prefer not to see it". And that's all true; LINQ can be confusing, it can be complicated, it can be a debugging nightmare. LINQ can suck. Whether you use the C# language keywords or the dot notation (a debate almost as passionate as tabs versus spaces), LINQ can tie you up in knots and leave you wondering what you did to deserve this fresh hell. Yet any technology could be described the same way when one doesn't know anything about it or when early mistakes have left a bitter aftertaste.
In response to these dissenting voices, I usually indicate the years of academic learning and professional experience it takes us to learn how to code at all. None of it is particularly easy and straightforward without some education. Don't believe me? Go stick your mum or dad in front of Visual Studio and, assuming they have never learned anything about C# or programming, see how far they get on writing Hello World without your help. Without educational instruction, we would not know any of it and LINQ is no different. When review comments inevitably request that I change my code to use less LINQ, none at all, or more understood language features like foreach and while loops, it frustrates me. It frustrates me because I usually feel that LINQ was the right choice for the job. I feel like I am being told, "use something I already know so I don't have to learn."
Of course, this interpretation is hyperbole. In actuality, when presented with opposing views to our own, it is easy to commit the black or white fallacy and assume one must be right and the other wrong, when really we should accept that we both may have a point (or neither) and learn more about the opposing view. Since I find, when used appropriately, LINQ can provide the best, most sublime, most elegant solution to problems that require the manipulation of collections in C#, I desperately want others to see that. It is as much on me as anyone else to try and correct for the disparity between what I see and what others see when I write LINQ. So, with my next post we will begin a journey into the basics of LINQ, when to use it2, when to use dot notation over language keywords (or vice versa), and how to avoid some of the more common traps. We will begin with the cause of many confusing experiences; deferred execution.
we all know someone in the "That's new, I hate it" crowd ↩
even I recognize LINQ is not a golden hammer; it's more of a chainsaw that kicks a little ↩
I grew up in England just outside the town of Congleton, Cheshire (the same Cheshire where Lewis Carroll wrote about the Cheshire cat). I attended primary school (elementary school, for my American readers) at a Church of England school in Astbury, a small village dominated by St. Mary's Church.
St. Mary's Church is a giant 13th century edifice and it is old. The earliest known church on the site was Norman though it is possible that before that a Saxon church existed there. Putting aside the rebuilding and refurbishment that has occurred since the 13th century, when you are inside that building, you are inside a building that has been in use for 700 years. It has even survived damage from horses stabled there during the English civil war (though some of its furniture and glass did not). It is old, so old that I find it hard to comprehend how much time that is.
I have many memories attached to the church, including harvest festivals, May Day celebrations, weddings, funerals, christenings, Sunday school, Easter, and Christmas, to name a few. I was a choir member for several years and an altar boy, I was even a shepherd or wise man in a nativity once. Joy and grief, life and death, faith and belief; my earliest memories of these things centre around that church and its grey stone walls.
Conveniently placed next to a pub as seems to be required of all areas of congregation for the English1, Astbury Church, as it is colloquially referred, is an imposing sight. From the A34, the church is accessed via either of two lanes that form the perimeter of Astbury's triangular village green, with its giant oak tree centerpiece and carpet of daffodils, grass, or snow, depending on the season. The ground falls away on all sides, and when viewed from the bottom of the green (and assuming you're not trying to look directly through the tree), the church stands against the sky, its weather-vane atop the steeple often silhouetted against clouds or an early morning sunrise, if you are lucky enough to see it.
When I went to visit my family earlier this year, I visited the church for the first time in quite a few years. With my parents, sister, nephew, and wife, we explored the church and its grounds, reminiscing about the occasions that had brought us there previously. If you ever get a chance, I highly recommend visiting this Cheshire landmark and touching 700 years of history. For now, you will have to settle for some of the photos I took; it is a beautiful building that has been considered by some to be one of the most beautiful churches in the country, and is just as impressive on the inside as it is on the outside (though my photosphere below is not great, it should give you a sense of what it is like inside).
Google provides some extremely useful online tools that many of us have come to rely on. From Sheets, Slides, and Docs, to Gmail, Maps, and Keep, the advertising giant tends to cover all the angles. The most recent Google tool that I have started using is an improvement over an old service called My Places that started out as a part of Google Maps. It is called My Maps and provides users with the means to build custom annotated maps. Any maps you create can then be embedded into websites or shared via email and social media1.
When first visiting the site, you are offered an option to either create a new map or open an existing map. Any places you had in My Places are already transferred to My Maps and available to open if you wish.
Creating a new map presents you with a familiar Google Maps-style view but with additional overlays for editing the map. These are together at the top-left in two distinct groups. The first is the map structure where you can view and edit the name of the map and its layers, as well as add new layers and adjust the appearance of the base map layer. When I tried this, there were nine different base maps available; from left to right, top to bottom these are Map, Satellite, Terrain, Light Political, Mono City, Simple Atlas, Light Landmass, Dark Landmass, and Whitewater.
To edit the map name, map description, or layer name, just click the text.
Below the description are options to add a new layer and to share the map. There is also a drop down that provides options to open or create a map, delete, export, embed, and print the current map. Below that, each layer is shown. The layer drop down can be used to rename or delete the layer as well as view a data table of items on that layer. The data table allows you to add additional information about various things that have been added to the map (two columns for name and description are provided by default, but more can be added).
Next to the map structure is the toolbox. The toolbox contains a search bar, allowing you to find the area of the map on which to base your customizations. Below the search bar are buttons to undo, redo, select and manipulate, add places, draw lines, add directions, and measure distances and areas. Using these tools, you can build up map layers. When building the Stonehenge map for my blog post on our trip there, I was able to not only search for add mark existing places, but also add custom places. Each item added goes into the selected map layer, which is indicated by a colored bar on the left edge of the layer in the map structure. Clicking a layer changes the layer being edited.
The appearance of each item in a layer can be modified, either as a group or individually, by manipulating the styles option at the top of the layer and clicking the paint can icon on an individual item. By editing the layer style, you can also choose which column in the data table for that layer provides text for the items in that layer, and style items based on data in the data table (useful for representing data on the map). There is a lot of scope in this area, so I recommend playing around with it and seeing what works for your specific use case.
Once you are happy with the map you have created, you can share it, export it to KML (for use in Google Earth and other apps that support KML), and embed into websites. The main share options are familiar to anyone who has shared a document from Sheets, Slides, or Docs, allowing you to share a link to the map as well as control who can edit and view it. If you want to embed the map in a website, an embed code is provided via the map menu, however, as the site will tell you, you need to make the map public before you can embed.
All in all, I found My Maps a pleasant discovery and really nice to use. The styling options and ability to add additional data allow for some impressive customization. I am certainly going to use this application more in the future. How about you? Leave a comment and let me know your experiences with this new addition to Google's collection of online applications, or perhaps add details of alternatives that are out there.
Those planning to use Google My Maps for commercial use should review Google permissions and license terms before proceeding ↩
We all employ stereotypes to generalise groups of people. Often, a stereotype fills a gap between one cultural experience and another, making assumptions about others to provide an easy answer as to why others are different. It is not a particularly constructive approach to cultural differences, often being divisive to the point of pissing people off. Sometimes that is the intent, to troll people, other times it is a side-effect of ignorance.
That's about as deep as I want to get in this blog entry. However, it sets a basis for the following things I did in England that, due to assumptions (stereotypical or otherwise), may be surprising to my North American friends and neighbours.
1. Sound American
To the community I live in, my friends, my colleagues, and my neighbours, I sound British. It does not matter that there's no such thing as a British accent, the distinctions of Scottish, Welsh, Irish, and English (sometimes even Australian) and any variations thereof are irrelevant; we all sound British. Even now, after 10 years living predominantly in the USA, I sound British. Many are surprised that I have retained my British accent after spending so long here. It does not matter how often I might say to-MAY-toe, zee, or gas, to anyone overhearing me talk, I sound British. I believed them too, until I landed in the UK.
Everywhere I went, someone was ready to tell me I sounded American, that I had a twang, that I was losing my accent. Now, at first, I put this down to my saying the odd American word or using an American pronunciation, yet after a day or two, after settling back into my native dialect, the comments kept coming. It seems that immersion in US culture for 10 years does make a difference. Worse still, I could not hear it myself. I was so used to the way I talked, I had not even noticed a change, and I still can't. To one side of the Pond, I sound British, and to the other, American. It has left me a little culturally orphaned, a perennial outsider, a citizen of the mid-Atlantic, land of 80's radio DJ's, bad documentary narrators, and people in old movies1.
2. Eat Well
Possibly the most misleading stereotype I hear about the UK is that all our food is bad, awful, bland, terrible, sludge that no one in their right mind would ever let pass their lips. Though we certainly have some unusual dishes that I find pretty horrible (haggis, jellied eels, black pudding, and tripe), I know many who think otherwise, and it is not indicative of all British food. Every culture has its "acquired tastes" that others think are disgusting (Velveeta, Easy Cheese and corndogs, anyone?), but that is no reason to disparage every food that culture has to offer.
While I was back home, I enjoyed some amazing food: a steak and kidney pie at my old local pub, a home-cooked roast chicken dinner from my mum, and delicious chicken curry. "But wait, curry isn't British!" you may cry, but the curries served throughout the UK have diverged from their Indian or Bangladeshi origins to meet the palates of Britons. As American as apple pie? As British as a good curry.
Now, you may cry that I am biased and of course, I am. However, I am also a very fussy eater (ask my wife) and I do not take my food lightly, not to mention that we are all biased when it comes to our food; biased toward what we like. If you want to know if what I am saying about British food is right, you can ask my wife, Chrissy (though perhaps she may not agree on which dishes are best). Whether you believe me or not, be a little more open-minded and a lot more selective. Don't base opinions about British food on what you are told or on a single, awful or obscure meal; instead, get some recommendations, you might be pleasantly surprised.
3. Farm Programming
Contrary to the belief of the Comcast representative that sold me my first cable service, modern technology exists in the UK2. I realise that many people reading this, if not all, are already aware of this.
As our trip to the UK was to be a working vacation, I spent some of my time sat in the lounge of my parents' centuries old farmhouse, coding, emailing, and taking part in meetings. Even in the "quaint"3 English countryside, the modern engineer can push commits to GitHub, attend a conference call on GoToMeeting, and surf the Internet for cat photos. WiFi and broadband are everywhere in the UK; in fact, in some places, the speeds should embarrass Americans, who have some of the most expensive and slowest broadband Internet services in the world.
4. Not Meet The Queen
No, I don't know the Queen. I also did not meet your friend that lives in Lower Bumblecrap or your great Uncle Charlie from Arserottingham. What I am trying to say, though perhaps a little harshly, is that the UK is a big place. There are over 63 million people in the UK, over 53 million of them in England alone, one of which is the Queen4. She does not tend to hang around and have personal relationships with her millions of royal subjects. I understand the idea that there is some chance I may have met someone's friend or family member, no matter how unlikely, but when I get asked if I know the Queen (even in jest), I want to escape and go have a real conversation with someone else. Why is a country that fought so hard to get rid of the British Monarchy so apparently obsessed with it?
5. Not Stay
The idea of leaving the gorgeous countryside and history of England to live in the US seems unimaginable to some. Like Madonna, Kevin Spacey, and Tim Burton, many Americans would jump at the opportunity to live in the UK. I can see why, it is filled with amazing people, history, and free healthcare, not to mention everyone talks like Dick van Dyke got elocution lessons, but I lived there for nearly three decades, I've done that. Although my family and many amazing friends are there, I don't fit. I never really fit. The culture of cynicism, the Tall Poppy Syndrome, the overcast weather; it just does not suit me, and in the long term, it doesn't make me happy. Although the US is far from perfect and there are many things I miss from my native land5, since moving here I have been happier, more satisfied, more successful, and more accepted. When we returned to the US, the immigration officer said, "Welcome home," and he was right.
Before Chrissy and I went on vacation to England, we were discussing the trip and what we might do while over there (besides spending time with my family). Mid-conversation, Chrissy tilted her head and said, "How far is Dorset from your parents' house?"
"About four hours, why?"
"Have you ever been to Poole?"
"When I was a kid. There's that photo of me with a python round my neck. Why?"
"I have that yellow sweater on. Why do you want to go to Poole?"
"I don't remember that photo. You've never shown me."
"I swear I have, but whatever. Why do you want to go to Poole?"
"Oh, no reason. Just asking."
"Bollocks. Why do you want to go?"
And it was then that I discovered Poole in Dorset, England is the home of the very first Lush Cosmetics shop and spa.
Chrissy is a lushie1, she has ordered items from Lush Kitchens around the world, exchanged products with other lushies and generally had a jolly good time discussing Lush products over the Internet. For a while, it felt like a new package arrived every day. There were even three packages waiting for us at my parents' house in England. Chrissy loves Lush and the opportunity to visit the spot where it all began was irresistible. So, I planned a trip to Dorset.
I found a hotel in Bournemouth (about 15 minutes drive from Poole), a seaside resort on the south coast of England where my family had holidayed when I was 8 or 9 years old (the same trip I met the python), and made a reservation for a couple of nights. Since we were going to be passing nearby, I also booked tickets to visit Stonehenge on the way back (it's about an hour and a half from Bournemouth)2. It would be a lovely little break, Chrissy could get her Lush fix and I could reminisce about childhood vacations while enjoying the English seaside.
The drive down was mostly uneventful until the very end. After checking in to the hotel, we had to navigate a road closure to find our hotel car park; this turned out to be gated with a key-coded entry and incredibly narrow. So narrow that the only reason I even attempted to drive in was the knowledge that someone must have done so already. So unbelievably narrow, a motorbike might have paused to consider the best strategy for passing through3. After squeezing our way into the car park, we rested up in our room before strolling down to and around the beach and pier.
Chrissy's excitement was palpable and photos were mandatory. Within moments of arriving, it was clear Chrissy had found kindred lushie spirits in the staff. When they realised how far Chrissy had traveled to be there, they offered her a tour of the spa and a free postcard as a souvenir of our visit. I do not recall ever being made as welcome in a shop as I was there, and I was only there because I'm married to a lushie.
At the end of the spa tour5, they asked Chrissy if she would like a treatment. She looked at me for encouragement, which, after a very brief moment of hesitation, I gave —how could I deny her this after travelling so far to be here? Within minutes, we were both6 ready to be booked in for their 80 minute treatment known as "The Good Hour", but there was a snag; they could only fit us in the next morning7. This unfortunate delay, we were to learn, was serendipity handing us an opportunity.
With the treatments booked, we headed out to explore Poole. We wandered the quay, saw Sunseeker yachts in varying states of manufacture and repair, admired some exceedingly old buildings, lost count of how many pubs we did not have time (nor the constitution) to visit, bought some gifts from Poole Pottery, and visited the museum. It turned out that Poole was really worth a visit, regardless of the initial reason we were there.
The next day, we returned to Lush. I do not want to go into details about the "The Good Hour" treatment, if you want spoilers I am certain the Internet will oblige, all I would like to say is that it was fantastic. The massage was excellent, the pirate-theme was whimsical and strangely relaxing, and the conversation with my masseuse, Emma, was thoroughly enjoyable if not a little…different8. After our treatment was over, we were given a nice cup of tea (with the option of a drop of rum) while we relaxed and enjoyed some more conversation with the friendly and lovely Lush staff. Everyone who we met was professional, friendly and chatty.
As we sipped our tea someone said in a low voice, "Mark is in if you'd like to meet him."
Mark was Mark Constantine, the co-founder and owner of Lush. Chrissy did not know what to say at first. Her eyes were wide like a child who just heard the distant chimes of an ice cream truck9. We walked out of the spa into the shop and glanced nervously round the corner at Mark. Megan, one of the amazing staff, stiffened up with nerves. No one was sure who should interrupt the boss and ask him to meet two people from Michigan. They were not intimidated by Mark, they were in awe of him.
"Mark is kind of a big deal," we were told.
Eventually someone got his attention and he came over to where we were stood. We shook hands. Chrissy was grinning so wide that her face sank beneath teeth and eyes. Even I was excited; not only was I getting to meet the owner of the company, but it was possibly the best thing that could have happened on Chrissy's pilgrimage to the Motherlush. The three of us posed for a photo, then Mark went back to his task and we finished up our purchases, ready to head off to Stonehenge. What a great day, it could not get any better.
A photo posted by Lush Spa Poole (@lushspapoole) on
Then just as we were about to leave, Mark's hand fell on Chrissy's shoulder.
"Wait here, let me get something for you."
Mark disappeared upstairs where the Lush labs, responsible for inventing new Lush products, reside. We were informed that much of the work in the labs had been focused on products for the new Oxford Street store10. A few minutes later, Mark returned with a small plastic box containing two sparkly cosmetic items.
"These aren't exactly new. They're existing products packaged in a new way."
As Chrissy nearly passed out from excitement, Megan took the shiny products and, after taking a picture of them for herself (these were new to everyone, it seemed), packaged them up for Chrissy. It was a generous finish to an already fantastic trip, something that I am sure we will talk of often. As we set off on our way to Stonehenge, I reflected on the day and how it would not have been possible on our last trip, when I had not brought my anxiety under some level of control. I could imagine us not getting the spa treatments because I worried about the cost, or because I worried about not making Stonehenge on time11. I could imagine us leaving the shop sooner, to be sure we would make our Stonehenge time-slot, missing our meeting with Mark Constantine and his generosity. Worse still, I could imagine me spilling all these anxieties out all over the place like an untamed fire-hose, drowning them in negativity so that we could never look back on them as the wonderful moments they were.
As it is, our trip to Poole was one of the best parts of our three weeks in England. Assuming Chrissy doesn't drag me off to the newly opened Lush on Oxford Street in London, I look forward to stopping by Poole to pop into Lush and say hello to the friendly staff, and perhaps to take a stab at those pubs.