solution for this question

Write a Python function maxaceregate(!) that takes a list of pairs of the form (name score) as argument, where name is a string and score is an Integer Each pair is to be interpreted as the score of the named player For instance, an input of the form [CKohir 73) CAshwin 33), (Kohir, 7)(Pujara, 122) (Ashwin' 00) lepresents two scores of 73 and 7 for Kohli, two scores of 33 and 90 for Ashwin and one score of 122 for Pujara Your function should compute the players who have the highest aggregate score (aggegrate = total, no add up all scores for that name) and retum the list of names of these players as a list, sorted in alphabetical order If there is a single player, the list will contain a single name

For Instance, max aggregate((('Kohli,73),('Ashwin,33),Kohli',)r Pujara',122).CAsein',90)]) should return 'Ashwin'] because the aggregate score of Kohlis BO of Ashwin is 123 and of Pujara is 122, of which 123 s the highest

Smashing Podcast Episode 30 With Chris Murphy: What Is Product Design?

In this episode, we’re talking about Product Design. What does it mean to be a product owner, and how can you learn the skills required? I spoke to expert Chris Murphy to find out.

Show Notes

Weekly Update

Transcript

Drew McLellan: He’s a designer, writer, and speaker based in Belfast UK, he’s a teacher and, like many of us, one who’s still on his own learning journey. As a design strategist, he’s worked with companies large and small, driving innovation by drawing on over 25 years of experience working with clients such as Adobe, Electronic Arts, and the BBC. He now mentors startup founders, with a particular focus on purpose-driven businesses. His work is underpinned by his own startup, The School of Design, a community for creatives who are designing, building, and selling products. So we know he’s an expert in helping others to learn, but did you know he was once taught to play the hurdy-gurdy by Dame Helen Mirren? My smashing friends, please welcome Mr. Chris Murphy. Hi, Chris. How are you?

Chris Murphy: I’m smashing.

Drew: As mentioned in the intro, you first and foremost are an educator, a teacher, and your focus and your energy at the moment is being put into a lot of helping design-focused entrepreneurs to be equipped with the skills that they need to build products. It’s a phrase that we hear a lot, but what’s it actually mean to be design-focused?

Chris: It’s really interesting. I had to do a pitch at the end of the Propel program that I was on from January to June. If I just rewind a little bit and talk about Propel, it’s a startup founder program that I was a mentor on two years ago. Honestly, I was so excited to be a mentor, and the teams were great. Over the summer, last summer, I came back in for what they have, an office hours session, and Ian, who was one of my colleagues on the program, his instinctive ... “Well, why are you here?” I said, “Because I think I’m actually going to go on Propel next year,” and they were like, “What,” because they had lined me up to teach on it. I just said, “Look, there was so much excitement in the program, and I just wanted to be part of it.” Plus, I feel that I’ve been teaching for 20 years, and it’s time for a change.

Chris: I also think that education’s going through this massive re-imagination at the minute, partly because of COVID and just partly because there’s a pushback against very high fees in universities. The other thing is, and I’m going to get back to your question in a second, my daughter, I think she’s 21, and she’s in her third year at Glasgow School of Art, and she’s racking up on an awful lot of debt to study jewelry. I think there must be a better way to teach design in a connected age. But coming back to your question, design-focused companies. At the end of my pitch at the end of Propel, I talked about Apple, and I know Apple’s a bit of a tired example. But it was at the time the world’s first two billion dollar company, and everything they do is design-focused. I mean, the hardware is considered, the software is considered, as we’ve seen recently, the chips are considered, everything is considered in terms of how it goes together.

Chris: One of the debates I’ve been having in my head recently, Drew, is this idea of ... Yesterday, I spoke to somebody about product design, and I have a friend who’s on Propel and he is a product designer, as in he was studying physical product design. I said, “That’s really interesting,” and he said, “I think you’re calling these people the wrong thing.” I said, “But” ... Another person on the course, who is a product designer, but she’s what we would call a product designer, someone who’s making digital stuff, and so in my head, I think, “Well, these ideas of these separate disciplines are kind of ludicrous these days,” because you can’t really have a product, a physical product, let’s take this laptop here, without some software on it. You can’t have the software and the laptop working together without getting that laptop into our hands, so we then have to go to a shop to buy that. That’s an experience, and that’s been designed as well.

Chris: So if we take just this computer that we’re using to record this conversation, design is involved every step of the way. It’s involved in the processes that are used to mill out the aluminum that all the stuff goes into. It’s involved in Big Sur, which is the operating system that’s running on it. It’s involved with going to the Apple Store to replace my computer the other day, and it’s not like the Apple Store anymore, but it’s being designed as an experience that’s designed for COVID. So everything is designed, everything, or I suppose a fairer way to put it is everything can be designed but not everything necessarily is designed. I think that that’s what I’m interested in. Design can touch lots of things.

Drew: So to be design-focused would mean to make sure to design every little bit of the process that you can or to care about designing more of the bits of the process than a company that isn’t as designed-focused?

Chris: Yeah, I love that. I love that idea of designing more of it because if we step back and we look at the entire process ... And I think designers are quite good at this. Designers are quite good at going into a business and maybe we’re asked to solve this problem over here. I don’t know about other people, but the way I tend to do that when I’m doing work as a consultant is I tend to go in and I’ve been asked to look at this problem, problem X, and I’ll spend a couple of days looking at that, and then I’ll come back and say, “Look, I can totally help you with problem X and we’ll get that sorted, but I really think a more pressing issue is this thing over here. Let’s take a look at that.” Because I am so terrible at business, I usually say things like, “I’ll do that for free, and then I’ll help you with this problem over here,” because I’m really interested in all of the parts of the experience.

Chris: A lot of companies just don’t really look at ... They might be design-focused companies, but perhaps they haven’t considered how they, let’s take an example, package up their products and send them out. For me, when I look at that as an experience ... Because one of the things that we’re doing at The School of Design is a thing called designer tools, which is basically these sketchbooks, of which I have thousands, thousands sitting just over here, these bands that go round them which you put your pens in, and a system I use to keep everything organized in my sketchbooks. We’re selling all of that stuff, but I’m not just putting those sketchbooks into a box. I’m putting them in with lots of little things, like badges and stickers and little notes and all of that kind of stuff, because when that arrives at someone’s house, I want them to open that and have an experience. I don’t want them just to open it and have three sketchbooks. I want them to be thinking, “Whoa, that’s a nice experience,” because I think that that will make a deeper connection with that person. I don’t want to use the word customer. I think I prefer to use the word friend who paid me some money for something.

Drew: So you mentioned Apple there, and despite being, as you say, a slightly tired example, I still think they’re an excellent example. I don’t think it matters that people have mentioned them before because they are such a great example. Are there any canonical examples in the more digital space of companies that do this particularly well, this design-focused approach?

Chris: Look, I don’t want to use another hackneyed example, but I think GOV.UK are doing an amazing job. I don’t think they’re a company, but I think what GOV.UK have done through the digital cabinet office or whatever that’s called and thinking about the processes of government and how people access services, what’s interesting to me is that has had an impact on lots of other companies. So if we look at ... The Co-op is a good example of a company company. A friend of mine, Charles Burdett, who made Workshop Tactics ... I don’t know if you know Workshop Tactic. They’re these really, really great cards, Workshop Tactics. I think it’s workshoptactics.com. If you want to run workshops, they’re brilliant for that. But Charles used to work for the Co-op and was a consult ... He’s working as a consultant there just now, I think, and they’re very good at designing all of the different aspects of the business, including, I think, visualizing how we might shop in the future.

Chris: If you want to go into the Co-op, I have a Co-op just down the street, and if I want to go into the Co-op today, what I quite like to do because of COVID is walk around with my phone and scan things as I put them just straight in my bag and then just leave the shop. I don’t particularly want to talk to anybody because usually I’m listening to a podcast. I mean, I do talk to a lot of people in the Co-op, like there’s Anna and there’s a few people in there who are my friends in the sense that it’s my local shop. But there’s always staff I don’t know, and on those days I just want to get in, get out as quick as possible. If we add COVID on top of that as a potential life-threatening issue, I really want to get in there and get out as quickly as possible with a minimum of fuss and with a minimum of connection with other people as well. That current experience is bringing us to a bottleneck, which is a checkpoint, or not a checkpoint, that sounds very Northern Ireland-

Drew: Checkout.

Chris: ... a till, a checkout, thank you, and that’s a bottleneck. Even with the things on the floor that say, “Maintain two meter distance,” et cetera, people never ... They’re so busy that they never really notice those little signs on the ground. That process could be redesigned in a much, much better way. I think there’s scope there and potential to think about how design impacts everything.

Drew: Thinking in terms of individual founder businesses, entrepreneurial businesses, does it follow that if an individual is design-focused themselves that the product that they make will be that way? Is a product really an extension of the person who designed it?

Chris: I think that’s a really good question, Drew, and I think that the answer to it is it depends. I think it depends on that person and it depends on the scale of the company. If you take a look at Hiut Denim, and I use Hiut a lot in my teaching, it’s a really good example of a company that’s doing one thing well, and that’s their sort of strapline jeans. I think if you look at David’s previous ... David and Claire, because they’re a partnership. If you look at David Hieatt and Clare Hieatt’s previous company, which was Howies, that company had grown so big, there were so many people involved. Once scale starts to creep in, it starts to become very difficult to keep an eye on all of the little touchpoints that matter in the customer journey. I think it’s really telling that when they left Howies, because Howies had been bought by ... It’s complicated. Go read it on the Internet. But it was Timberland, and Timberland was bought, and there’s all this story.

Chris: I think it’s really interesting that what they’re focused on now is jeans. That’s it. They’re telling an amazingly good story around jeans. They’re also packaging everything really, really well, and the jeans are like a vehicle for stories, really. Also, the jeans are ... And this is something I think, Drew, is going to become more important as we come out the other end of COVID, which I hope we come out the other end of. Everyone who’s making those jeans is being paid a proper wage. One of the problems I have at the minute when I look at the world is not everybody is being paid a proper wage and I find that a little bit concerning, as someone ... Look, I’m 51, my son is 25, 24, 25, something like that. It’s terrible. I should know all this stuff. He’s a wedding photographer. He has been a wedding photographer for a year and a bit. His business is completely decimated because no one’s really getting married at the minute because it’s just difficult. He has no salary because he didn’t have enough self-employed books to get the support.

Chris: He’s fallen through the cracks, and there’s a lot of other people who’ve fallen through the cracks. I would argue that’s a design problem, that we need to look at that as a design problem. But if I also look at that wider issue of COVID and the government and all of these things without getting too political, I read an article in the Guardian yesterday about Matt Hancock’s neighbor, and anyone who’s listening who’s not from the UK, Matt Hancock is the Health Secretary. His neighbor, who was running a business, was texting him and asking for advice about, “How do I supply products for this COVID thing?” There’s an awful lot of rumblings around the chumocracy, is what the papers call it, friends of friends of government ministers who seem to be getting jobs because they know the right people.

Chris: I get this sense that we’re going to come to the other end of this and see this ... Individuals see that, and they think, “Well, where is this money going, and are people being paid properly? What’s the price of this one pound t-shirt from shop X?” I don’t want to mention any brands. But everything has to be paid for, and everything that’s made, people have to be paid to make it. I think people are increasingly interested in are people being paid fairly.

Drew: One thing you mentioned in there was design touchpoints, which by a design touchpoint, you mean anything where the customer, if we can use that term, comes into contact with your product or business? Is that what a touchpoint is?

Chris: Yeah, I hired a placement student this year, which is really unusual because I’ve been teaching at Belfast School of Art for 20 years and I don’t think a member of staff has ever hired a student who’s going on a placement year. But I kind of knew I was leaving, even though nobody else did, so I hired a placement student to help me. I think the last diagram she drew for me was touchpoints because I constantly have conversations with people who say, “What is that?” They’ve never heard that term before. In a sense, that really is what The School of Design is about. It’s teaching you all the things that nobody taught you in art school, basically. So, yes, it’s about building products, but it’s also about just covering gaps in knowledge.

Chris: But touchpoints are everything. They’re from how you answer the phone, which increasingly is not really something that we do, it’s maybe the tone of voice of your email or the tone of voice of your social media messaging or how you write a blog post. There’s so many different ways you come into contact with people, and all of those ways have to be designed.

Drew: So things like microcopy and all of the communications, the tone of voice, the-

Chris: 100%. One of the things that Jasmine, my placement student, has been working on for me is an illustration system for The School of Design so that when she comes to the end of her placement with me, which, at the minute, is looking like about December sometime, but when I embark on The School of Design properly from the first of January, I have everything so that we have visual aesthetic that is considered. If you think back to some of the articles I’ve written for Smashing Magazine on UX design, I’ve always designed those illustrations for those articles with the smashing red, and I’ve always thought, “Well, these are part of the series for Smashing Magazine.” I’ve done some stuff for Smashing in Adobe, and I think, “Well, we should try to make these illustrations on brand,” for want of a better word, because that’s where they’re going to end up, right?

Chris: What was interesting to me, that if we think back to those articles, Adobe published them on the Adobe blog, and I could instantly tell that they were Smashing because they had that color, and you could see looking down the page, some were by me and some were by other people, but you could see, “Oh, that was from Smashing Magazine.” I was stoked for ... I’m so biased because I think Smashing Magazine is doing an amazing job.

Drew: Thank you very much. Yeah, you often hear people talk about entrepreneurial business saying that, “Oh, it all starts with an idea.” I’m not really sure that’s true, personally. I think, to me, the products that really make it and are successful often start with a problem.

Chris: Yeah, I knew you were going to say that. Yeah.

Drew: Or a constraint or a limitation. It always starts with a struggle, and it probably carries on that way as well. Do you agree with that?

Chris: I do, I do. I think that most products ... I mean, if we think of products, they probably fall into two categories. One is problem-solving, like I have an issue and, oh, look, I have this issue and there doesn’t appear to be anyone solving it in a particularly delightful way. Perhaps someone is solving that problem but maybe not in a delightful way, and so we can bring delight to the party, and we can bring delight to the table. I think we should be thinking about that full-stop for everything. So one category is that I have a problem. But I think another category is just delight. We buy a lot of things for no other reason than they bring joy into our lives. I think everybody has probably got something that they bought that they could get a cheaper version of this thing, but they bought this thing because it brings product.

Chris: I have an example behind me, which is this shoe. I have these shoes in two sizes. Unfortunately for people who are listening to this podcast, you can’t see the shoe. It’s a Camper shoe. All my shoes are Camper shoes. I fell in love with Camper a few years ago. It’s a really good story. Portugal, I think, is the company. I only buy the Pelotas shoes, which have got the balls on the feet and on the soles, and they have a story behind that as well inspired by footballs, I think. This is a Camper Kvadrat. I don’t know how you pronounce Kvadrat. It’s like K-V-A-D-R-A-A-T or something, and it’s a textile company. I bought this in a size 10 because that’s my usual size, and I also have it in a size 11 because it’s such a stiff fabric, it’s really tight. So I had to buy another one, and so these are kind of like an ornament sitting on this bookcase behind me.

Chris: Now, I could buy these Camper shoes, and I think they probably cost me about 90 pounds or something. Now, I don’t need to buy those shoes for 90 pounds. I could probably go and get a decent pair of shoes for 20 pounds. But they just bring a bit of joy into my life. When I put the shoes on, they’re bright blue, and people usually say, “Whoa, where’d you get your shoes?” So they’re a conversation starter. They’re not just a shoe. So that’s another half. I think if we think of those products as being in those two categories, problem-solving and delight-bringing, ideally, we want a mixture of the two, we want problem-solving and delight-bringing. But I’d say probably 70% are problem-solving and about 30% are no other reason than joy.

Drew: You mentioned the story behind a product. How important is it to have a sort of origin story behind your products?

Chris: I think it’s really important. I think that people are hungering for stories now. I think if we think back to the overlong section where I was criticizing the government, which you might want to edit, I think stories are important. I have a whole deck, it’s on Notist as well, which is called Product Storytelling, and it looks at the story behind Hiut Denim, but it also looks at the story behind Field Notes, which are somewhere behind me on that bookcase. Field Notes are a really good example of this. If you go to the Field Notes website, and you click on any of the printed products, they will tell you crazy details like, “Thanks to these three people who invented the staple,” and, “This particular printing press is called a such and such and such and such,” and, “It’s printed with these Pantone Hoya inks,” and, “The paper is this, that, and the next thing.” If you’re spending $9.95 on three tiny notebooks, the story’s kind of important because you could probably just pop down to your local stationer’s and get a much cheaper set of notebooks.

Chris: But you’re not really buying notebooks, you’re buying a story there. I think that Field Notes are a really good example of that because they’ve taken something which could easily be a commodity and it could easily be something that you buy based upon the price and they’ve turned that into something that is a story and that you’re buying not just because it serves a purpose, it’s useful to put in your pocket and take notes. Just, it’s something that brings a smile to your face. On one end of the spectrum, they have the standard brown field notes, which are kind of the commodity end, and even those aren’t really a commodity. Then, on the other end, they have their editions, where they’re trying different print finishes and they maybe are inserting maps.

Chris: There’s a huge amount of Field Notes influencing this, the designer tool sketchbooks that we’re working on for The School of Design because Andy McMillan, who folks may know for Build Conference and XOXO, he is the person who printed all of these sketchbooks. When he moved to Portland, I bought them off him, or I bought some of them because we used to share a building and he was one floor down and my studio was above him. I bought a box off him, and I started to use the sketchbooks, and I always used to put my ... I’d do them in a particular way. I’d put a postcard on the cover so I can tell that’s the current sketchbook, and then I have a table of contents on the inside and so on and so forth.

Chris: When he was selling them, he had a shop called Draft Tools or Draft Supply. It was Draft Supply Co. You can see it on the Wayback Machine. He said sketchbooks shouldn’t be celebrated. They should just be cheap. It’s the ideas that should be celebrated. I agree with him, but I kind of wrote something recently where I said, “But why can’t the sketchbooks be celebrated as well?” When he got them printed ... I wish I could show you, Drew. There’s literally boxes of these everywhere. They’re printed by a company called Oddi, O-D-D-I, and I remember Andy saying to me that he’d had them printed by Oddi, and I was like, “Why did you get them printed by Oddi? They print books, and they’re probably an expensive place to get notebooks made.” But, for me, I looked at the paper and the print and the binding, and it’s just there’s a story there, and Field Notes have done a really good job of telling that story, and they’re very successful as a consequence.

Drew: So is it about creating an emotional connection with the customer on whatever level?

Chris: 100%. And this is one of the things, one of the many things, that I am trying to cover in The School of Design. I’m just writing that down frantically in motion. Because a lot of the purchases that we make today are driven by emotion, not necessarily by rational decisions. When the M1 computer came out, oh, two weeks ago, coming back to my son, the photographer, he is working on a very old computer with the screen hanging off and I happen to have a spare, old-ish MacBook Pro, I said to him, “Okay, you can take this, and it would improve your life considerably.” But at the same time, I was like, “But maybe you should get that M1,” because I had been completely seduced by the visuals and the storytelling and the chip and the memory and all of that kind of stuff. After about 10 minutes of talking to him about this, I was like, “Maybe you should be getting this computer that I have and I should be getting that M1."

Chris: Then, after I rationally thought about it the next day, I thought, “I don’t need an M1 computer. There’s nothing wrong with this one. I bought it last year.” But that’s a really good example of emotion getting the better of you. You think to yourself, “Oh,” and you get carried away. I’m sure we’ve all been in a shop where we’ve bought something and we didn’t really need it, but we bought it on a credit card, and then maybe when the credit card bill comes in, we think, “Why did I buy that X?” That’s a good example of emotion and not rational thinking. I think a lot of this isn’t taught in design school. I’m really struggling with what The School of Design is, but it’s definitely this, right? It’s psychology, it’s touchpoints, it’s customer journeys, it’s emotional responses versus rational responses, it’s mental models. It’s all of the things that nobody really mentioned to you when you were at art school but you really need to know in order to work as a designer now.

Drew: I think having that sort of story behind a product is something that Apple does particularly well. I think they do it so consistently and have been doing it for so long now that perhaps people don’t even notice that it’s happening, but everybody listens to it. They can say, as you were mentioning earlier, “This new product has been milled from a single piece of aluminum,” and they’re telling that story. On a practical level, we don’t care how it’s been manufactured. They can use whatever manufacturing process works best for the end product. But they sell it to you on that, this is the care that’s gone into it, this is the process, we did this research, we found that this was the ... Then you see the unboxings on YouTube and the reviews, and they’re all, “Ah, did you know this was milled from a single piece of aluminum?” Those stories really sink in and give people an attachment to the product more than if it was just a utilitarian tool.

Chris: 100%. Because I’m leaving Belfast School of Art, at the moment, I’m bringing home boxes and boxes of stuff. One of my boxes, I don’t think it’s here, I think it might still be in the university, is called the experience, and it’s a cardboard box full of stuff that’s to do with this whole topic. There’s a lot of stuff from Howies, including a box of Clipper tea that came with a bag I bought. I was like, “Why are you putting that tea in,” and they said, “We always put a box of Clipper tea in with everything you buy.” I was like, “Right, okay,” fascinating for me.

Chris: But one of the other things, which I don’t have anymore, as a lecturer I used to do about 10 or 15 years ago where I had an Apple computer box in one hand and a Dell computer box in the other hand. The Dell box was a brown cardboard box, silkscreen-printed, pretty utilitarian and not very exciting. The Macintosh box was just the opposite. My story with the students was always like, “If you’ve just bought a computer that was 1500 pounds, this unboxing experience over here is telling you every step of the way you’ve made the right choice. The Dell box, on the other hand, wasn’t really doing anything. It was just getting it from A to B without getting scratched.” I think that that’s a real missed opportunity.

Chris: Packaging is something that’s often overlooked, and, actually, if you go and look at ... There’s some great books on Japanese packaging that we could all learn from in a Western culture. There’s a really good book called How to Wrap Five Eggs, and there’s another book called How to Wrap Five More Eggs. They’re both about the Japanese obsession with wrapping. They take an object, and they wrap that in tissue, which is considered, and they then put that in a bag, which is considered. They then maybe wrap that up and tape it together, which is considered, and then they put it in something else. Every step of the way is like a layering process that makes you just feel amazing, and all you’re unwrapping is an egg. It’s incredible.

Drew: Does communicating all these sorts of details and thinking about all these little touchpoints ... Obviously, it works for big businesses, mega-corps like Apple who’ve got lots of money to spend at it. Can it work for very small companies, too? You mentioned Hiut Denim. They’re just a small company, aren’t they?

Chris: I love the way you said mega-corp because it feels like it’s out of a film from the future, and they probably colonize planets as well. Yes, I think it works almost better for smaller businesses. I would argue that if you’re a smaller business, you have a real advantage. Let’s say I’m a mega-corp and I’m sending out my stuff. It’s very difficult for me as the CEO of mega-corp to hand-write a note for every single customer because the business is just too big. Then if I write a note and then try and sign it, well, maybe we could scale it a bit, right? But then what happens is you write a note and then you actually print the signature. It’s no longer actually signed. Then people like me who are cynical go like this and they hold it up to the light and they go, “Oh, that’s not signed.” That’s actually now having the opposite effect, in that it’s looking like it’s personal but it’s definitely not personal. Most businesses don’t think about any of this kind of stuff, but I can’t be alone in feeling that way.

Chris: But, on the other hand, if I’m a small business and I open my package, who’s a good example of this? Counter-Print Books. Don’t go to the website, it’s counter-print.co.uk, I think. Just don’t go to that website. You’re going to spend a fortune on books. But Richard Baird who publishes Logo Archive, which is a fantastic little zine, every issue of Logo Archive that I have had from Counter-Print Books has a little message from ... I think her name is Celine, and it always says, “Enjoy your zine, Christopher,” and she says thank you. I’m just like, “Wow, I’m so stoked.” I took a photo of that recently, which I’ll tweet when this comes out. I’ve got all the thank you notes.

Chris: I was teaching a group of crafts people about two or three months ago, and one of the other crafts people on the call, because I was teaching and they were all muted, I could see that she was wetting herself laughing. I was like, “Why are you ... Have I done something?” I’m thinking, “Is there something behind me?” I said to her, “Angela, why are you laughing?” She said, “I’ve also got all these notes as well.” I was just like, “Oh my goodness.” I thought maybe I was the only person who kept these. But I said to her, “It would feel like sacrilege if someone’s written you this little note to just crumple it up and throw it in the bin,” because it feels like that connection has been made with you across time and space. You can do that as a small business. You have advantages as a small business that big businesses don’t.

Drew: It’s almost like giving it a sense of provenance, isn’t it, like if you went to a local restaurant that has its own kitchen garden and grows its veg and sources its meat from local farms? It’s giving that feel of connection.

Chris: I wish I could show you. I’m opening up noti.st.mrmurphy and I’m going to go and find Paint a Product Picture. And Notist is so nice, so slide nine from Paint a Product Picture, which I’ll give to you and you can maybe put in the show notes, is a screenshot of the Apple Dictionary of the word provenance, “The place of origin or earliest known history of something, the beginning of something’s existence, something’s origin.” In my notes beside the slides in the slide view, the tall slide view, which is fantastic, “In an era of cheaply manufactured goods, customers are eager to know the provenance of your product.” That’s a good example of the differentiation you can have as a small business versus a large business.

Chris: The bigger a business gets, the more people there are in the business, the more there are people in middle layers of management who come along and say, “That thing that we’ve had made by this seamstress in Cardigan Bay, I think” ... If we come back to Hiut Denim, they call those people grandmasters. To you and me, they’re ... I don’t think you’d call them tailors because tailor to me evokes a Savile Row kind of image, like a suit that’s tailored to you. What they probably are are seamstresses or people with a sewing machine, and Hiut Denim call them grandmasters. But the bigger the company gets, the more this middle layer of management starts to say things like, “Look, we’re paying all these people in Wales 10 pound an hour basically to stitch up these jeans. What if we got those made in Bangladesh or somewhere cheaper, where the cost is less expensive and the cost of living is less expensive and there perhaps are less factory condition checks, et cetera? We could save a ton of money, and we could make more profit."

Chris: That’s the slippery slope, and when that happens, the provenance suddenly disappears. People care about that kind of thing now. I think coming out the other end of COVID, I think people will remember ... There were certain companies when COVID started, I remember in the UK, that were ... If you were an essential business selling food, you could stay open, but if you weren’t an essential business, you had to close. There were certain companies like Sports Direct who were saying, “We are an essential business.” There was a backlash in the public saying, “In what way?” It was kind of like, “Because people need to do sports while this is all happening.” I think that those kinds of things, people have long memories.

Drew: As a product owner, how important is it to rigidly stick to that vision that you had when you started things up? I think of companies like Basecamp, which was formerly 37signals, and founder Jason Fried there as always marching to the beat of his own drum in terms of what the product should and shouldn’t be. That’s quite often in the face of customers who are saying, “We will pay extra if we can have these features,” and the answer has always been, “No, that’s not what we’re about.” Is that a key to success, or is that just one path that someone might choose?

Chris: It’s a bit of both, I think. All my answers are always it depends. I think here’s a good example which is closer to home. Over the years, I’ve asked you to make changes to Notist where I’ve said, “I’m an educator. I don’t particularly want to make up fake conferences so I can share my slides.” But your product is really designed for speakers at conferences. I’ve almost come to a form of ... I’ve asked you to make changes to your product many times as a customer, and you’ve decided not to do that, and that’s entirely your right to say that because it’s your product. I think that there’s a place for having a vision and not immediately bowing to the needs of one customer.

Chris: It’s like yesterday, I was thinking about The School of Design and where we’re going. I wasn’t sure if the word designers was an important part of it for the customers, or was creatives a better word? I was having this debate with my other brain in my head, and I was like, “Actually, I think it’s designers.” But the reason I had used the word creatives was because one of the people who’s taking a course with me at the minute is not a designer. He’s a developer, and he said, “I think if you used the word creatives, I would feel part of it. But if you use the word designers, I wouldn’t feel part of it.” So I was almost going to change the whole pitch for the business because of the sake of one person, which, when I thought about it rationally a couple of days later, I thought, “That’s insane,” right? It’s called The School of Design. It’s all about design. You can be a non-designer and you can come into The School of Design, that’s totally cool, but I’m not going to change the language for that one person.

Chris: I think that comes back to what I was saying about Notist earlier. You have a vision, your product is working really well for that vision, and you’re sticking to it. I think that that’s a good thing. The flip side of that, if we think about 37signals, Jason Fried, et cetera, they are very strong-minded. They know what they want to do, and they also know what they don’t want to do. One of the problems with getting stuck in that way of thinking is that you can miss innovations. You can be so focused on this is what the thing is that customers really need something and just don’t do it, I think, because you feel so dogmatic. When we launched Get Invited, our ticketing platform, which is struggling because ticketing in the middle of COVID is a problem, our vision at the beginning was let’s not be Eventbrite. Let’s not put so much stuff on the page. Let’s just keep it simple.

Chris: When I briefed Kyle and David, my two co-founders, who were students when we built the business, it’s incredible, I said to them, “Look, above all, we must never lose sight of the fact that these pages for the events need to look beautiful. So we have stop people, normal customers, from messing up the pages by doing design.” And you know what? Actually, we were wrong. Overwhelmingly, people came to me and said, “Is there any way I can change the color scheme here because it just doesn’t fit my brand?” At the beginning, I was kind of really ... “Nope, forget it.” People were saying, “Could we put our logo on it,” and I was saying, “Absolutely not because it’s going to ruin the design.” Once we had hundreds of people coming and saying that they wanted to change the color or they wanted to add their logo or could they add more than 140 words to a description, we had to listen to the overwhelming evidence that perhaps we were being a bit too narrow-minded and we needed to flex a bit. So it’s that balance between sticking to your vision and not getting stuck in a cul-de-sac.

Drew: And how do you weigh into that the fact there might be competitive products or services in the marketplace that might do things that you don’t do or have features that you don’t have? There’s obviously a temptation there to start matching all the competitors feature for feature.

Chris: I think matching competitors feature for feature is a slippery slope because as soon as you do one, then you suddenly start feeling you have to do another. Before you know it, you’ve lost track of your original vision. If we come back to the Notist example, the thing I was describing to you was probably a different product. It’s probably the guts of Notist but batched as a tool for speakers who are not events, they just make a lot of decks, they make a lot of slide decks, and that’s a different product. So there’s opportunity there in the sense that you could use the same code base to make something different with a different brand and a different audience and a different target, et cetera. But perhaps if you did this thing and this thing and this thing, then suddenly your thing’s lost its identity.

Chris: Coming back to Get Invited, the example, we were very careful to ... If 100 people ask for X and we sit back and look at it rationally and think, “Okay, maybe we should buckle here and we should give them this thing because it’s affecting people’s willingness to take up the product,” so that was something. But it’s the slippery slope. I think you want to be you. You don’t want to be a smorgasbord of your competitors.

Drew: I suppose there’s a balance there between building a very narrow band, focused solutions for a specific need, versus building something that could fit a number of uses, I guess, to use a metaphor, a bit like a garlic crusher and a chef’s knife. The garlic crusher gets the job done with zero effort, but it only does that one thing, and the chef’s knife can also mince garlic, but it can do a thousand other things at once, but it requires a bit of skill to learn and to use. So, in terms of products, is there a way to balance that up? Do you go down a very focused, easy path and then duplicate it if you want to grow?

Chris: I think for me, at the beginning of the product journey, it’s really important to have focus. It’s really important to think, “Okay, well, who are my customers? What are they going to spend, and how am I going to look after them to the best of my abilities?” I think you could sell something that appeals to everybody and as such appeals to nobody. For me, at the beginning of the journey, it’s really important to focus down and think, “These are the core people.” It feels bizarre to me, but we’re nearly in December. I’ve been working on The School of Design in a kind of beta form for 11 months. I still don’t really know what it is. When I started the journey in January, my audience was definitely students. It was like, “This is cheaper to learn UX and UI using what was then called Design Track. It’s an alternative to university education, and it’s students.” The more I’ve been working on it, the more I think it’s not students, it’s actually professionals who are in the middle of their career and there’s just a lot of things about design they need to know. But I haven’t said, “Okay, I’m now going to include those people.” What I’ve actually said is, “This is the wrong audience and this is the right audience, and these people, I am not going to waste any time over."

Chris: I think that, at the beginning of your journey, if you try to be a knife ... This is going to be so cool with this metaphor here because people are not going to understand us if they come right into this bit of the podcast. At the beginning of your journey, if you try to be a knife, you’re being all things to all people, and I think it’s better to be a garlic crusher at the start and then over time add more things, as you scale slowly. So, for me, what’s really important, what are we trying to do and can we get a group of people to be really happy with what we’re doing and also pay us some money in the process because, otherwise, this is just a hobby. Once we’ve got those people happy, can we start to expand a little bit but not just in a massive way where then we’ll lose focus and we’ll become a knife? But at some point in the future, it might be worth considering becoming a knife because a garlic crusher at that point is perhaps too limiting.

Drew: You mentioned finding the right audience. It’s obviously important to find a market and work out what that market should be and tailor the product to fit that market. Is that something that the program at The School of Design addresses? Is that something that it equips people with?

Chris: 100%. I think that one of the things that we’re looking at is definitely audience. Who’s the audience for this thing? One of the modules that I was ... I mean, I don’t even know if we have modules, actually, if I’m honest. But, certainly, one of the things that I will be teaching is a thing I call venture testing. I talked about this in a workshop I was doing on Wednesday for startups in the Northwest, up in Derry, Londonderry, Derry. Covering all the bases here, Derry for one audience and Londonderry for a different audience, that’s a big city in the Northwest. I was talking about this process called venture testing. For me, it’s like build a smoke test page, use Facebook and Instagram to drive traffic to that smoke test page, and if there is interest and there are sign-ups, great, keep working on it. If there is no interest and there are no sign-ups, then either you’re driving the wrong traffic to the page, in which case, modify and change, but if no one is signing up for anything, then it’s time to close and move onto the next thing.

Chris: So I talked about a workshop that I’d launched with a friend of mine on the Propel program, and we had one sign-up. I kicked off the talk on Wednesday with, “This was a success.” Most people are looking at you thinking, “But you only had one sign-up.” Then I’m showing the structure of the course that I was going to have to write and saying, “One person is not worth writing all of this content and making all of these screencasts, so this has saved me a massive amount of time.” It’s really important not to get deluded with your own ... “I really believe this product’s going to be amazing,” and you don’t really check with anybody else, and you’re like, “This is going to be” ... That’s how the Segway kind of happened. The Segway kind of didn’t really turn into what the Segway guy thought it was going to be. It’s now a tours around Berlin type product. It’s not the future transportation.

Drew: On a practical level, what sort of format does The School of Design take? Do you know yet? Is that still up in the air?

Chris: Yeah. I literally have absolutely no idea. What I’m doing ... Well, two or three people I have to say are massive. First of all, the team on Propel have been amazing. Secondly, Ben. There’s a particular guy, Ben Allensi, on Propel who’s been really great. He’s young, he’s early 20s, and he has a startup. He really inspires me because he’s young and he’s got a lot of commitment and passion. Another guy, Mehall, as well, he’s 19, and he, with a friend, has made over 40 grand. He’s a first-year student at Ulster University, I’m amazed, and he’s making a product that connects to satellites for farmers. It’s incredible. Another friend, Al Parra, who’s been helping me with my website, which has been the slowest website build known to man or woman or any other gender. It’s been very, very slow, and that’s because I haven’t really been sure what I’m doing.

Chris: I think the biggest clue I got was signing up for Anne-Laure Le Cunff’s Ness Labs. Ness Labs is amazing. About two weeks ago, I got an email from Anne-Laure, who’s a friend of mine, saying, “Welcome to ... The course starts on Monday.” My immediate reaction was, “Have I signed up for a course that I can’t remember?” It wasn’t. It was more a case of if you’re a member of Ness Labs, you get access to these course. That, for me, was a real turning point because at that point, Drew, I realized that up until now I was selling workshops and with the workshop, you got access to a community. I then realized that what Anne-Laure was doing was selling a community that gave you access to workshops. That’s the same thing, but different. I think that that’s the biggest clue I have in terms of where I’m going.

Chris: It’s a community. It’s not a community you can join right now because I’m still working on it, and there is a very small community of around 30, 40 people who are on our Slack who are all helping each other, and they’re super, super early beta people. So it’s a community, and then my feeling is that if you’re in the community, you just get access to learning. The best way to explain it, if I pull up my Notion ... I have a library in Notion, which is free, and it’s library.theschoolofdesign.com, and it’s essentially everything I’ve learned and everything I’ve taught. But there is a book called Hello: A Practical Guide to Building an Email Newsletter That Works, and it’s part of the series of books that I envisage that I’ll be working on over the next year or so. There’s three ways to read the book, and I think this explains The School of Design.

Chris: Way number one is read it from first page to the last page in that order, right, just pick it up and read it. Way number two is just dip into it, okay, just read bits. Way number three is don’t read it. I realize that that sounds a little bit like, “What?” So I’ve written here, when I say don’t read it, I don’t mean ignore it. A lot of people just don’t have time to read at the minute. They’re too busy rushing around. So I’m going to be taking the books and the learning materials and saying, “Join me on Thursday evening at 7:00, and we will run through the contents of that book.” Then, if you want to go and read certain aspects and go into more depth, you just go and get that book, and it’s free, and it’s in the library, and you have access to it.

Chris: So what I see The School of Design being is a community of designers who know they need to know more, that they haven’t learned everything there is to know, and I think that I’m going to probably get into trouble by saying this, but I think that membership price is probably quite low. I think it’s something like 60 pounds a year or something. All my friends have told me that’s far too low. But I think that the community, it should be open to as many people as possible, and, to me, that’s more important than making money. Somehow or another, Drew, I have to earn enough money to pay my bills in order to just help as many people as I can. That is essentially my vision.

Chris: Essentially, my vision is that The School of Design is like a master’s course but it doesn’t cost what a master’s course would cost. Because if you went to do a master’s course in London or something, it would be 10,000 pounds. I think that in The School of Design, there probably are some courses that are more premium that you can do, but the majority of stuff is just being part of a community. I don’t know about you, but I think communities are going to be big as we move forward. I think that places like Smashing’s community and The School of Design community and Anne-Laure’s Ness Labs, people are hungry for that, especially in this world where we’re not really connected to people. So that, for me, is really exciting.

Drew: It is very exciting. You don’t refer to students as students, do you, in The School of Design? You have another term that you use.

Chris: Yeah, I was calling them founders because that was informed by the Propel program. Founders was the word I was using a while back. I’m not 100% sure if it’s still the right word because I’m not necessarily sure that everybody in The School of Design is a founder. I think that some of them want to build their own businesses, but some of them just want to do a better job of building businesses for other people. I’m torn at the minute, Drew. Last week, I was like, “It’s for people who want to build their own products,” and, yeah, it’s definitely for those people, but they might be a subset. That’s because I was having a conversation with somebody recently who works at Booking.com. I’m helping this particular person with some mentoring, and he doesn’t want to leave Booking.com. He’s very happy, but he knows that there are certain things that he wants to learn to enhance his current understanding, and he’s been out of art school for probably about eight or nine years. He just is at that point where he feels like there’s a few more things he’d like to learn but maybe doesn’t have 10 grand to go and do a master’s.

Drew: I guess it comes back, like you were saying, about Hiut calling their workers grandmasters, it highlights the importance of the choice of language in our products.

Chris: 100%. And I probably would still lean towards founders than students because, to me, students has so many connotations. Students, to me, is the wrong word. I know that. Also, I’ve written two books on language, The Craft of Words with Nicklas, my partner at the time. So we’ve got The Craft of Words, Part One, which is on macrocopy, and The Craft of Words, Part Two, which is on microcopy. We should put a link in in the show notes. But language is so important. How you choose to describe things affects how people perceive things. Language is another part of The School of Design.

Chris: One of the things that I’m doing at the minute is looking at the library, which has some rather ambiguous section titles, like Life First, Work Second, and I’m like, “God, that’s awful. Why don’t I just call it Process or something?” But there are sections in the library like Marketing, Branding. Pricing is another one. There are sections in the library that will still be there. Productivity is another one that I’m adding, in terms of how can you be mindful but be productive as well, and Mental Health or Mindfulness is another one because, to me, living a life intentionally and not just autopiloting through your life is important, and living a life with purpose is important as well. But maybe I’ve just got old and I started to realize these things.

Drew: Is the program focused on founders who are making digital products or the founder who’s ... Would they feel just as at home if they were making shoes?

Chris: Yeah, I think for me it’s products. I would remove digital because I was talking to Cara, my wife, about this yesterday. She’s a silversmith. For me, that distinction isn’t really there. So if we think back to when we were talking about Apple earlier in the conversation, there’s the service design aspect, there’s the physical product design aspect, there’s the software aspect, all of these things we need to know. I don’t think that one designer can do all of those things, but, for me, one of the things we used to start the master’s off with was this idea of a t-shaped person. Tim Brown from IDEO talks about this. You’re really good at a thing, but you understand the other things as well. So I think that the kinds of people who are joining The School of Design are t-shaped people. They’re really good at something, but they understand how to work with other people who are good at their thing, too.

Chris: We have a section of the library which I’m working on, I’m going to be launching next year, which is called Beacons, which are examples of companies that we can learn from. In my Notist decks, it’s noti.st, N-O-T-I, dot, S-T, slash, mrmurphy, there are a number of the beacons are in there. Hiut Denim is one. Field Notes is another. Ustwo Games is ... I’ve been talking to Mills at Ustwo Games, who’s super, super interesting, Mills, amazing. There’s a ... Blok Knives is another one, Benjamin Edmunds. What’s interesting to me is quite a lot of them are not digital products. They’re physical products. We can learn by just looking at all of the landscape of stuff, that consumers give you money in return for you to give them, as we’ve said earlier, solutions to their problems and joy. How do we as designers build those kinds of things? I think we’re good at doing solutions to your problems, sometimes we’re missing joy, and sometimes maybe we could a bit more work into just joy and no solutions to problems.

Chris: But we can learn as designers of products digitally from physical products as well. For me, if you look back to the Bauhaus at the turn of, well, not really at the turn of, but the beginnings of the 20th century, you have a lot of people, Walter Pierce, Johannes Itten, Walter Kandinsky, who are ... They don’t have ... They’re not like, “Oh, I” ... Mies van der Rohe is doing chairs, but he’s also designing buildings, and he’s also designing textiles. At no point, did anyone say, “Oh, no, mate, you can’t do that because you’re a chair guy.” If you look at Charles and Ray Eames, which is more than Charles Eames, it’s Ray Eames as well, and Ray always gets way overlooked, which I think is wrong, the Eames partnership were making films, they were designing chairs, they were ... These people, to me, are like mega-mega-beacons. So we can learn from Dieter Rams. We can learn from Charles and Ray Eames. We can learn from the Bauhaus. We can learn from the Ulm School. If I suppose the only way I can describe The School of Design is that it’s like a master’s education minus the master’s price tag, it’s basically all the stuff I used to teach on my master’s at Belfast School of Art but for a fraction of the price.

Drew: So you’re launching at the beginning of January?

Chris: First of January, yeah.

Drew: What does that launch look like?

Chris: On the first of December, I’m just going to start my blog properly at theschoolofdesign.com. And I’ve got a mailing list, which I’m going to start properly sending emails out and things like that. It’s been busy for me because I’ve been teaching for the last semester. But from the first of January, probably inviting more people into the Slack and then finding our way forwards, lots more customer conversations. What’s really important to me, Drew, is not opening the doors to all and sundry with something I haven’t thought through. I would’ve thought by now that I would’ve got it finished because I’ve spent the last year thinking about this, but it’s been through so many iterations that I’m still learning. What I would say is you can access the library right now, it’s at library.theschoolofdesign.com, and there’s a lot of stuff in there.

Chris: That, for me, is not going anywhere anytime soon. But I see some of those sections being turned into mini-lectures or workshops. It’s just like, “Do you feel like you need a shot of creative injection energy in your arm? Show up on Thursday evening at 6:00, and we’ll do a session on something this week, marketing or product storytelling or mental models.” I’m sure most designers, they don’t need to turn up to all of them to get their money’s worth. They just need to show up to a handful. The other thing I think we’ll probably be doing on the first of January is sharing the first season of speakers. We have this idea of seasons, like a Netflix type thing. So Mills from Ustwo has said he’ll do a talk for us. We’ve a few other interesting people who we’ve lined up.

Chris: That first season is called ... Oh my word, what is it called? I can’t remember. It’s something about the fact that the world has changed. It’s to do with what is tomorrow with COVID. Basically, we just get people to come and they ... They had a thing on Propel called Founder Firesides, which was amazing. I loved it because you would show up and someone would be beaming in from somewhere in the world and Chris, who is the person who ran Propel, would just ask them a bunch of questions and then we as people on the course could ask some questions, too. I don’t know if anyone in Smashing community knows Farnam Street. Farnam Street do something similar. They have monthly AMAs, and they get really interesting people. They ask the community if there’s anything you want to ask this person, what would you ask them? I just see there as being an opportunity to build a community of people who want to learn together.

Drew: It all sounds really exciting, and I look forward to following it as it all happens and seeing what comes of it. It sounds like a great opportunity for those who wish to continue their design education or maybe start their design education.

Chris: Well, start as well. Start as well. There’s an awful lot of people that I’ve been teaching on Propel over the last couple of years who maybe when they started did not really know much about design. By the time I’d finished with them, you’re running a few sessions, they were picking up pens, they were sketching interfaces, they were a bit more design-aware. I think we all need to be design-aware as we move forward. We’ve talked about a lot of it just now, which is great. Awesome.

Drew: I’ve been learning all about product design. What have you been learning about lately, Chris?

Chris: What I’ve been learning about is Facebook advertising. Facebook gets a really bad rap, but I have this idea in the venture testing module, which is what I call traffic beating. It’s terrible. I’m going to pull it up here because I can read it off here. So you’ve built your smoke test page, okay? You’ve got your product described. What I’ve written here in beating traffic, “If you’re unfamiliar with the world of grouse shooting, the idea of beating might be new to you. Here’s a description from the National Organization of Beaters. A beater flushes birds, pheasants or grouse, from cover, driving them in the direction of the guns. In this peculiarly British metaphor, the birds are your customers, and the guns are your smoke test page.” I’m really interested in how do we get people to see the page that we’ve built to describe the product, how do we find the right people, and how do we get them pushed over to here?

Chris: Facebook is one way, but Reddit ads and Google ads ... I think that designers moving forward need to have some of the skills that startup founders have, which is startup founders are trying to achieve a lot on usually not very much money, certainly, the model of startup thinking we have on this side of the Atlantic. In the San Francisco, Silicon Valley kind of world, it’s like, “Don’t worry about customers. Here’s 100 billion dollars, and good luck.” That’s a completely crazy way of running a startup if you’re in the UK. If you’re in the UK or somewhere that’s not Silicon Valley, it’s like you build things, you try them. If people are interested, you do more of it. If they’re not, you move onto the next thing. So that’s what I’ve been learning about. It’s like how do I get more people to see the things that I’m testing?

Drew: If you, dear listener, would like to hear more from Chris, you can follow him on Twitter, where he’s @fehler, that’s F-E-H-L-E-R, and you can find The School of Design online at theschoolofdesign.com. Thanks for joining us today, Chris. Did you have any parting words?

Chris: Yeah, my parting words would be just start. If you have an idea, just start, right? Don’t build it in your head and make it really, really complicated. Until this year, I used to do that. I used to think, “Oh” ... if you look at my Tiny Books, which was my previous thing, tinybooks.com, it was so big in my head. There was going to be a book about this, a book about something else, a book about this, and then there was going to be a smaller book about this and even smaller book called a Comet about something else. I had this huge solar system in my head, and the one thing I did this year was embrace an everything is a prototype mentality. Everything I am doing is a prototype. So if something works, great. What did I learn from it? If something doesn’t work, great. I still learned something from it.

Chris: My advice, my parting words, would be if you have an amazing idea, just start because I’ve met so many people in the last 30-something years who have an amazing idea and when I say, “Can I see the homepage or do you have anything done,” it’s still in their sketchbook. I’d rather see it out there on the web or somewhere. So start, one word, simple.

Laravel 6 – Redirect to a page after successful login

Hi,

I would like to ask how to redirect to another page, like for example dashboard page (because normally after successful login it will redirect the user to home page) ?
I am new at laravel environment and I will highly appreciate all your comments and looking forward to learn a lot from you.

Currently I am using Laravel 6 version.

Thanks

How to Share User Properties between Google Apps Script Projects

The Properties Service of Google Apps Script is used by developers to store app configuration and user specific settings. The properties data is scoped to a specific user, or a specific project, and cannot be shared between different projects.

The Email Form Notifications add-on also uses the Properties Service to store rules that are defined by the user. The rules created by User A are not accessible to User B.

However, in some specific cases, we may want to give access to our store data to another user so they may build upon the existing configuration rather than having to build everything from scratch.

The new import export option allows the user to export properties data as a plain text file that can be imported into the property store of another user.

Access the Property Store

On the server side (Google Script), we define two methods - one for exporting data as a JSON file and the other method for importing data from the property store of another user into our own.

/* Choose DocProperties for editor add-ons */
const getStore = () => {
  return PropertiesService.getUserProperties();
};

/* Export user settings */
const exportUserData = () => {
  const data = getStore().getProperties();
  return JSON.stringify(data);
};

/* Import user settings */
const importUserData = (data) => {
  const json = JSON.parse(data);
  getStore().setProperties(json);
  return 'OK';
};

Export User Properties as a Text File

For exporting data, the HTML file contains a simple download button that connects to the server, fetches the data and allows the user to save this data as a text file on their computer.

<p>Export Data</p>
<button onclick="downloadFile();return false;" href="#">Export</button>

<script>
  function downloadFile() {
    google.script
      .withSuccessHandler(function (data) {
        var a = document.createElement('a');
        var blob = new Blob([data], {
          type: 'text/plain',
        });
        var url = URL.createObjectURL(blob);
        a.setAttribute('href', url);
        a.setAttribute('download', 'file.txt');
        a.click();
      })
      .exportUserData();
  }
</script>

Import User Properties from a Text File

For importing data into the property store, the user can upload a text (JSON) file that contains data as key-value pairs. These files are easily readable in any text editor and you can also add define new properties by adding new keys to the JSON file.

<p>Import data</p>
<input type="file" id="file" accept="text/plain" />

<script>
  document.getElementById('file').addEventListener(
    'change',
    function (event) {
      var file = event.target.files[0];
      if (file.type !== 'text/plain') {
        window.alert('Unsupported file');
        return;
      }
      var reader = new FileReader();
      reader.onload = function (e) {
        google.script.run
          .withSuccessHandler(function (success) {
            window.alert(success);
          })
          .withFailureHandler(function (err) {
            window.alert(err);
          })
          .importUserData(e.target.result);
      };
      reader.readAsText(file);
    },
    false
  );
</script>

The File Reader API of JavaScript is used to read the contents of the selected text file. The onload event gets fired when the file has been successfully read in memory.

The readAsText method of File Reader will read the file as a string but you may also use the readAsDataURL method should be wish to upload file in base64 encoded format that can be decoded on the server.

Admin 2020 Version 2 Introduces New Lite Version, Better Plugin Compatibility, and Modular Architecture

Six months ago, Admin 2020 captured the attention of WordPress users with its fresh approach to skinning the admin screens. Version 2 of the plugin has been completely rewritten to support a modular architecture so users can enable or disable features, or selectively enable them by user role or username. Some users prefer the default menu but want to be able to categorize their media into folders with the plugin’s CMS-friendly architecture for organizing media and posts. This update significantly improves performance for those who don’t require the analytics, admin bar, menu, or other features.

The plugin now has a new settings interface that is less cluttered than the previous version.

“Admin 2020 started off as a WordPress admin theme, and that was always at the core of the plugin,” developer Mark Ashton said. “As we grew, we added more and more features on top of that and it became very difficult in its current iteration to separate those feature sets, or disable some features and let others carry on.”

Version 2 also greatly improves compatibility with other plugins. Ashton was spending a lot of time adding support for other plugins, which slowed down development. The new approach to compatibility causes fewer styling conflicts and works without having to add custom stylesheets for other plugins. Prior to this version, Admin 2020 disabled 90% of WordPress admin styling and applied its own.

“While this gave us complete control over layouts and styling, it was one of the reasons we had to spend a lot of time adding support for other plugins,” Ashton said. “So for version 2, we kept the WP styling (most of it anyway) and applied a lightweight theme on top of it. The end result is a theme that is more refined, quicker, and the most compatible we have ever put out.
Usually the only plugins we have problems with these days are the ones that actively disable non standard WP scripts and styles, which obviously breaks admin 2020’s layout.”

In the interest of keeping Admin 2020 lightweight, the plugin now uses a custom build of the UIkit framework that is more tailored to its specific use case.

“Instead of having uikit as a base, and then layering on top of it, we just tailored it to suit the plugin needs and thanks to the wonders of scss it is an incredibly easy framework to modify,” Ashton said. “Doing this also allowed us to support RTL much easier which was a very common feature request.”

New Admin 2020 Lite Version Offers Basic Features, Coming to WordPress.org in 2021

Admin 2020 is now available on the plugin’s website in a Lite version for free. In recognition of WordPress.org’s undeniable force as a distribution channel, Ashton is considering changing his previous strategy of pursuing a fully commercial model to embrace the idea of marketing a free plugin with a paid upgrade.

“Admin 2020 has grown so much since we launched in May this year and it’s no longer just an admin theme,” Ashton said. “In fact, we see it as more of an admin extension now that also has a theme. Because of this, we felt there are now enough features to be able to offer the lite and pro versions.”

With the new modular system in version 2, the free and commercial versions are the same plugins, except the lite version has the paid modules removed.

“This means the development of the two versions is synched and updates, new features and bug fixes all rollout at the same time,” Ashton said. “For the time being we are going to stick to our own distribution channel just to keep everything streamlined, but releasing through wordpress.org is something we have planned for next year.”

Launching a new business during a pandemic is no easy feat but Ashton has grown Admin 2020’s user base to 3,642 active installations and is still looking to hire someone to assist in developing and maintaining the plugin.

“This has grown dramatically since the release of version 2 and will likely be around 5,000 or more in a week due to the sales from the Black Friday/Cyber Monday event,” he said.

Next up on the roadmap, Admin 2020 users can expect more customization options and deeper integration with WooCommerce. Ashton is currently working on the custom admin pages feature set that will allow users to create admin pages using the block editor and some of the more popular page builders.

“We are also working on expanding our WooCommerce integration with the idea of having a full suite of cards and data available on the overview page to help better visualize your business and sales,” Ashton said. “We are also going to be changing admin 2020’s name towards the end of the year but I won’t say what to just yet.”

Block Navigation Plugin Provides Missing Context-Based Outline for the WordPress Editor

Álvaro García wrote the first code for his Block Navigation plugin back in November 2018. It is one of those hidden gems that I wish I had known about two years ago as I began using the block editor. It has been available. I simply did not know about it until blindly stumbling upon it in a discussion in the WordPress Gutenberg Community group on Facebook.

The goal of the plugin is to provide an alternative to the editor’s current navigation. For the most part, it excels. WordPress has set the bar so low that any improvement seems like a godsend.

The plugin adds a new sidebar panel titled Block Navigation. That panel then lists each block with the added context needed to understand what block it is associated with in the content. For example, a Paragraph block in the navigation list will display its first few words. Other blocks do the same. Images and galleries in the list display their respective thumbnails. It handles nested blocks too.

All users must do is search for and click on the block they want to jump to in the content.

Block Navigation sidebar in the WordPress editor.
Navigating to specific paragraph in the document.

The plugin is packed with several other features. Users can shift blocks up and down from the navigation panel. They can also move blocks anywhere in the document with the click of a button or remove them altogether.

One of the more interesting features of the Block Navigation plugin is its ability to log a block’s data to the console. For developers, this could be a handy feature to quickly look up information for a block. While I doubt the average user would use it, there might be some potential applications for support requests, particularly with third-party block plugins.

Console log triggered by the Block Navigation plugin.
Console log of a block’s data.

The downside of the plugin is that it does not provide a color scheme that simply matches the default WordPress color palette. However, it does provide a dozen color options for users to choose from. The Banana (light) scheme seemed the least out of place.

With the navigation being handled in the sidebar, it could interfere with some users’ workflows. For users who prefer to keep the block options sidebar available at all times, they will need to switch back and forth between sidebars. The plugin does provide a button for switching to each block’s setting via its submenu (vertical ellipsis icon) in the navigation list.

The thing that would make this plugin better would be putting it into the editor toolbar, replacing the current Outline dropdown.

It Should Be a Core WordPress Feature

The block editor’s Outline dropdown is lackluster at best. For short posts, it is unnecessary. For long posts, there is no context for any of the blocks in the list. The goal is to be able to jump to specific points in the document without scrolling. However, unless you know the exact location in the block you want to jump to, it can sometimes be impossible to use the feature.

Block editor outline dropdown.
Outline dropdown.

The Document Outline section of the Details dropdown provides some much-needed context. It displays the post’s headings. However, this outline does not allow users to click on an item and jump to its associated block.

Details dropdown in the WordPress block editor.
Details dropdown.

Paal Joachim Romdahl proposed a fix for the Outline dropdown in October 2018. “What about just using the icon and then showing some of the text in the beginning of the paragraph?” he asked in a GitHub ticket that has seen no discussion for nearly a year.

Proposed merged dropdown of Details and Outline dropdowns in the block editor.
Merged dropdowns.

There is currently an open pull request on GitHub to merge the Details and Outline dropdowns in the toolbar. The original proposal added a tabbed interface. However, an alternative patch without the tabs proposed in the same ticket would merge the best of both worlds by adding the more-detailed structural outline while linking to the blocks in the document.

The only question left now is whether I can still update my WordPress 5.7 wish list to include this feature.

Leveraging CloudAMQP Within My Heroku-Based SaaS Solution

In the "Using Heroku to Quickly Build a Multi-Tenant SaaS Product" article, I documented the foundation for a new SaaS solution that I am building (initially for my sister-in-law) — utilizing the Heroku ecosystem. Using Heroku allowed me to deploy the app quickly, without having to worry about infrastructure, DevOps, scalability when the app gets popular, etc. The "Integrating Twilio Into My SaaS Solution In Heroku" publication provided an example of how easy it is to create a Twilio instance and integrate the solution into my Fitness-based SaaS solution. This current journey has resulted in a feature set that both trainers and their clients have been able to enjoy.

This article is going to focus on invoicing clients for services that have been performed and will utilize messaging solutions within the Heroku ecosystem. The goals of the invoice process are as follows:

Why JSON Won Over XML

json versus xml

The vast majority of APIs today are using the JavaScript Object Notation (JSON) to represent the structured data that they are exchanging. While JSON has been popular for a number of years now, there still are APIs out there that use the Extensible Markup Language (XML) instead, and in some communities, this still is a popular data format.

Why JSON Won Over XML

It's interesting to think about the fact that the first wave of APIs, called Web Services back then, was based on XML ( SOAP being the most notable representative), and how quickly this changed for SOAP and XML being discarded as being too heavy and too clunky.

20 Questions From New Scrum Master to the Development Team

TL; DR: 20 Questions from New Scrum Master to the Development Team

From Scrum Master to Development Team members, this set of questions addresses the foundations of a Scrum Team's capability to build valuable products: technical excellence and what it takes to achieve this proficiency level. The questions have been modeled after some basic principles that high performing teams have in common—from keeping technical debt at bay to collaboratively creating a Product Backlog.

The Essential Role of the Development Team for the Success of the Scrum Team

No matter whether you picked Scrum for the right purpose—building emergent products in the complex domain—, whether your Product Backlog is actionable 24/7 or whether your Scrum Team is entirely self-organizing. If your technological basis is drowning in technical debt, and the Development Team lacks technical skills, you cannot be successful as a Scrum Team. Therefore, as the new Scrum Master, you need to immediately determine the Development Team’s state of affairs.

Detecting Credentials In Source Code: Solutions Guide

In modern software development, we rely on hundreds, sometimes thousands of different building blocks. The glue that connects all the different building blocks are collectively known as secrets. These are typically API keys, credentials, security certificates, and URIs. These are the modern-day master keys. They can provide access to cloud infrastructure, payment systems, internal messaging, and user information to name a few. Once an attacker has a secret, they can move laterally between systems to uncover additional information and secrets, and because they are authenticated, they look and appear like valid users, making it extremely difficult to detect.

But even having established how sensitive these secrets are and why they should be tightly wrapped, this next statement may surprise you:

Getting Started With JAVA (for .NET Developers)

Introduction

Every platform has its own weaknesses and strength and when selecting a platform you should off course also take into account the context of your organization and the goal that you want to achieve.

Please remember, there is no best language or platform. They are only fit for purpose.

JavaScript Parser To Create Abstract Syntax Tree(AST): Acorn

0. Preface

JavaScript parser — Acorn and AST are useful things. They help us automatically and efficiently edit source code. This post shows you how to build and edit the AST of JavaScript code.

1. Content

2. Install the JavaScript Parser — Acorn

To quote from the github repository, Acorn is a tiny, fast JavaScript parser, written completely in JavaScript, released under a MIT license. Acorn can generate abstract syntax trees for JavaScript codes. It has 3 modules: the main JavaScript parser named “acorn”, the error-tolerant parser named “acorn-loose”, the syntax tree walker named “acorn-walk”. This post focuses on the main parser. In this section, we introduce its installation.

Microservices Powered By Domain-Driven Design

Have you been finding it difficult to model the boundaries of your system’s microservices? Have you been slowed down by the Technical complexity of your codebase? Has your team been stepping on each other’s toes?

If answers to any or many of such questions are yes, then Domain-Driven Design is likely useful to your Team!

Lots of Ways to Use Math.random() in JavaScript

Math.random() is an API in JavaScript. It is a function that gives you a random number. The number returned will be between 0 (inclusive, as in, it’s possible for an actual 0 to be returned) and 1 (exclusive, as in, it’s not possible for an actual 1 to be returned).

Math.random(); // returns a random number lower than 1

This is incredibly useful for gaming, animations, randomized data, generative art, random text generation, and more! It can be used for web development, mobile applications, computer programs, and video games.

Whenever we need randomization in our work, we can use this function! Let’s look at eight different ways we can use it. These examples are all from different authors doing something interesting with this API.

Animation

To spawn an object and animate it, we use Math.random. The neon lines form spontaneous hexagons but randomization is also in its generative sparks. 

Computer-generated music

This program takes the traditional melody of “Auld Lang Syne” and plays random notes from it in piano. A change package is created from the count data and a random number is generated to select a value. The octave is also randomly selected.

Display a random image

Images are stored in an array. A number is generated and multiplied by the number of images in the array via array.length. Then Math.floor rounds the value to a round number and sets the image src in the HTML when the page is loaded or the button is clicked.

Random background color

This is where the magic happens:

const random = (min, max) => {
  return Math.floor(Math.random() * (max - min + 1)) + min;
}

The first line of code randomly shuffles the array and the second line returns a random umber between 0 and 10. In the example of a random color background, the range of colors and specifics such as hues, saturations, and shades can be set. 

For another method for generating a random hex color, check out this article by Chris Coyer. 

Generative art

In this morphing fractal curve, Math.random is used twice to set the colors for the gradient and once more for the max radius of the curves. This is a great way to construct an entirely new appearance with every iteration!

Word generator 

We replace the header with a randomly selected word from an array using Math.random:

var word = words[Math.floor(Math.random() * words.length)] + "!";

This is a lot like the random image example — the perfect sort of practice for beginners! 

API key generator

Here’s a super real-world practical use case for random numbers! The demo generates 16 random numbers to create a universally unique identifier (UUID) that can be used as a key that provides access to an API.

Text scramble

A few phrases are stored and displayed in sequence, separated by an animation that appears to scramble the letters with random characters between phrases that are selected by Math.random.

Rock Paper Scissors

In this childhood classic game of Rock Paper Scissors, Math.random is used to generate a randomized move for the computer playing as the opponent. It makes a pick from the three available moves.

Strong Password Generator

This password generator uses Math.random to get a password array filled with uppercase and lowercase letters then adds random digits to the generated password. This is another great practical example!

A couple of notes…

It’s possible you have questions after seeing Math.random in these examples. There are a couple I see come up often…

Is Math.random() really random? 

Not exactly. Math.random() returns a pseudo-random number. This algorithm is called a pseudo-random number generator (or PRNG). This means its randomization can be reproduced under certain circumstances. 

The randomization is based on the algorithm xorshift128+, which is likely running on your browser.

So, it’s random-ish.

How do you handle repeated values?

There are many methods to achieve unique values without repetition. The Fisher-Yates is one great way to prevent getting the same number twice by shuffling the sequence. Math.random will select a value from the shuffled array of a finite sequence demonstrated by the code snippet below.

function shuffle (array) {
  var i = 0
    , j = 0
    , temp = null

  for (i = array.length - 1; i > 0; i -= 1) {
    j = Math.floor(Math.random() * (i + 1))
    temp = array[i]
    array[i] = array[j]
    array[j] = temp
  }
}

Is Math.random() the same as WebCrypto? 

As you’ve seen from this article, Math.random() is awesome! However, if you dealing with sensitive applications and need a more secure method of randomization, I’d recommend WebCrypto. Reasons you may want to use WebCrypto include temporary verification codes, random password generation, randomized lottery numbers, etc. 

If you need randomization for the purposes of cybersecurity, cryptography, or statistics ,  use the function window.crypto.getRandomValues and check out Mozilla’s documentation on the WebCrypto API.


The post Lots of Ways to Use Math.random() in JavaScript appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Collective #637




Collective 637 item image

Boop!

A tutorial on how to create a brilliant React hover animation effect with React Spring.

Read it




Collective 637 item image

Infinite Bad Guy

Infinite Bad Guy is an AI experiment that uses machine learning to seamlessly align thousands of covers of Billie Eilish’s “Bad Guy” into an infinite music video.

Check it out



Collective 637 item image

List.js

An easy-to-use library for adding search, sort, filters and flexibility to tables, lists and various HTML elements.

Check it out















The post Collective #637 appeared first on Codrops.