My Journey Of Learning Programming Through Flatiron School #33

Original Source: https://webdesignledger.com/my-journey-of-learning-programming-through-flatiron-school-33/

My name is Mason Ellwood, and I’m currently working on Flatiron School’s Online Full Stack Web Development Program. Each week, I’ll be writing about my experience, what I’m learning, and tips on learning to code.

It is official! I have passed the Ruby CLI Gem Final project. If you would like to try out my gem for yourself please visit https://rubygems.org/gems/masonellwood_cli_app_two. Rubygems.com is basically the https://www.npmjs.com/ for the Ruby community. If you do not know what NPM is either then RubyGems is basically a place where you can find, install, and publish Ruby Gems that you build yourself. It is an open source project, kind of like Github, where users can store and use other people’s gems for their own purposes.

“RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a “gem“), a tool designed to easily manage the installation of gems, and a server for distributing them.” wikipedia

Thank you, Wikipedia.

If you would like to view the screen share of me running through my application, check out the video below.

Sorry for me speaking so quietly in the video, I was in the waiting room at MD Anderson, so I had to keep it down.

To install my Gem to your Gemfile please type into your terminal

gem install masonellwood_cli_app_two

Depending on if you have your local environment setup because most likely you will receive an error of “YOU ARE NOT ALLOWED TO WRITE TO THIS FILE” or something along those lines. This is a mac default so unless you set up RVM or some alternative type of Gem management tool, then most likely you should not change the reader writer permissions of your lab without knowing what you are going.

If you would like to set up your own local environment, you should seriously check out the setup instructions that The Flatiron School has published, they are awesome and they are the same ones that I used to set up my machine. (https://learn.co/manual_setup)

If the file installed without a hiccup then simply type into your terminal

Weather-channel

And this should prompt you to my program which will run through a CLI or command line interface.

Through this project I have learned to speak and present code to a viewer, refactor code on the spot, build a ruby gem, publish a ruby gem, change file permissions, create a local development environment, use bundler to create a base template for gem construction, deeper understanding of debugging, require and use other gems to build projects from, and to be able to approach a problem and think through the steps to solve that problem.

The Professors that have worked with me to complete this project have been amazing, and I thank them for their time and patience with anything that I needed help with. Throughout this project I was finally able to see that I can do this, I can be the developer I want to become, and this decision to become a developer is not over my head.

Read More at My Journey Of Learning Programming Through Flatiron School #33

Improving the Conversation Between Strategists & Developers

Original Source: http://feedproxy.google.com/~r/buildinternet/~3/UtYn17lDDwA/

Hey developers and fellow strategists, we need to talk.

I’ve noticed that we think differently about our relationship in the builder community. You get excited over hardware, lines of code and open APIs while I seek to influence consumer behavior with technology. I feel like this divide may push us away.

Let’s fix this.

Helping Developers

I’ve realized my role in the builder community is to be your biggest fan. I may never need to code in my life but understanding you as a coder is one way we will overcome this. Here are my promises to you:

I will minimize as many distractions as possible to keep you focused  This includes screening phone call before they get to you, waiting to ask questions until you have time to actually think about them and keeping those boring project management short.
I will make you (and what you work on) look amazing. Remember all that traveling I did last spring talking with techies about our platform? I may have dropped your name a dozen times when talking about it. They were impressed.
I will promote your passion to the people who can pay for it. Translating the work you have done into jargon non-techies will understand is my job and I love teaching people new things. So if I ask an obvious question about how it works, it so I can better promote it to folks with dollar-bills to spend.

 

Helping Strategists

Here’s what I ask of you:

Bug me when you are working on something that will blow my mind. I love when we can geek over technology but I sometimes get busy with client work. Take the initiative and come by to talk about what you are working on. I assure you, I won’t tell you to go away.
Write the technology and hardware used on a Post-It. I know, I’ve asked you the difference between JavaScript and jQuery a hundred times. Let’s keep our sanity and when we are done talking, write down the technology and hardware used so I can Google it later. This will save us both a lot of time (and headaches).
Champion my ideas to find better outcomes to problems. The best success we have at selling our capabilities is to team up and think. Ignore the desire to say it’s impossible on the first try. Ask me questions, goals, and outcomes I’m looking for that could help solve the problem. Sometime it won’t be the first thing that comes to mind.

 

 

Helping Each Other

Making (and keeping) promises like these will help us work smarter when tackling an obstruction across the path. I’ve seen this happen at One Mighty Roar where you’d have a hard time identifying someone as a developer or a strategist because everyone invests in the people around them, constantly learning.

The opportunity to improve this relationship is there everyday. You’d be surprise how much of an impact it can have.


The Internet of Islands

Original Source: http://feedproxy.google.com/~r/buildinternet/~3/AwO8myx1V6c/

This morning I found a device that would turn my bed into a giant scale.

It’s a high point for hardware. The rise of crowdfunding and the maker’s movement have helped awesome ideas turn into products you can actually own. We live in the future. Everything is wonderful and nothing is wrong.

Unless you count the islands. Those are a problem.

Gilligan’s IoT

What are islands? Turns out when great hardware launches constantly, the connected device space becomes an overloaded tech flea market. The devices are all valuable on their own, but most suffer from “Now what…?” moments of integration with other things. No two speak the same language, forcing real world application to be based on which parts are easy to stitch together instead of best. Everything is technically connected, but design isolates the useful parts.

Islands are isolated grids of connected devices — silos in an “Intranet of Things”. They come in four types:

Ownership islands

A device connects to a closed grid only. Access is through a proprietary gatekeeper which limits available data and features. Most common for security systems or payment processing devices where the data needs to be accurate.

DIY islands

A device is capable of connecting to anything, but you’ll need to build the bridge first. These devices require technical skills to work with anything outside their product family. Most crowdfunded devices targeting the maker’s culture (i.e. Arduino) launch with “if it has an API, it’ll be fine” DIY mentality. IFTTT has started to attack this particular flavor of device fragmentation with support for smart systems SmartThings and Wemo.

Privacy islands

A device generates sensitive data or runs inside private spaces. If these devices were to connect to a public grid, they’d have to stay anonymous. So far IoT has been a homebody, and privacy islands are most common in home automation device grids.

Niche islands

A device connects to a specialty grid with an intentionally limited user base. This island is most common with today’s enterprise IoT platforms, which miss out in the same way an internet for only business websites would.

Islands are not automatically a bad thing. There are plenty of situations (especially with security and privacy) where intentional islands are the right decision. As the IoT space expands, it’s the unintentional islands and fragmentation we need to look out for.

Connected… to what?

Today’s hardware-first approach for the Internet of Things is like having a room full of smart people that refuse to meet each other. Great on paper, independently impressive, but dead silent from the balcony above. “Build it and they will connect” doesn’t work.

A lot of folks talk about “connected devices” and the “Internet of Things” as statements of connectivity. They aren’t. They are statements of context. A device with a Wi-Fi signal and API isn’t necessarily connected the Internet, it’s just accessible. The important part is not the device, it’s what the device connects to.

I’ll repeat that.

The important part of a connected device is not the device. It’s what the device connects to.

The moment you realize this, IoT’s future is no longer about hardware. Hardware is a constantly revolving door of better stuff that makes last year’s thing obsolete. The Internet of Things is a software problem.

Hardware helps software ask better questions

When you start with hardware, software is what makes your hardware work. A hardware focused approach may create great devices, but most fail the “now what” moment of open-ended integration that comes with connectivity. Offering a RESTful API is only the first step. Some try to sidestep this problem by promoting an open source software initiative, but that’s open-sourcing the wrong piece of the equation and most of the responsibility for teaching.

When you start with software, hardware is what helps your software ask better questions. Questions like “How hot is it in here?”, “Who just walked in?”, and “What’s the quietest conference room available?”. All of these examples are answerable only through a combination of software and hardware. What would you app do if it could ask questions about the real world?

Future proofing the device grid

The Internet of Things is a grid, and we’re all responsible for organizing the things we put on it. What’s important is not just the types of things we attach, but how we teach them to communicate. Today one of the popular answers is Bluetooth LE. Last year it was NFC, but years of barcodes, RFID, and QR also carried the torch to today.

The newest spec will always be around the corner. An ecosystem can’t grow on a foundation that needs to be replaced every two years. What won’t change is the translation. The world needs more people building ecosystems and products that celebrate the latest Kickstarter success story instead of panic attacks about differentiating.

Platforms like IFTTT get this. To them, new stuff is an opportunity to build more great tools. Why wouldn’t they want more players? More importantly, IFTTT doesn’t require a monopoly to be successful. It’s part of the pipeline, and can be responsible for all, pieces, or none of specific interactions. Platforms as tools don’t depend on universal usage — just being the best option more often than not. GitHub isn’t the only source control platform folks use, but it’s damn good at the collaborative bits.

We need more onramps

As people realize the connected space is more than Twitter-enabled toasters, more “things” will join the grid. Awesome. The problem now is a lack of structure waiting for them. Something to bridge the islands. There is no good way for the average person to get involved. When’s the last time you visited a site direct via IP address? The IoT needs its version of browsers.

Developers won’t have any problem, but they aren’t always why we build things are they? The early onramp is paved by the folks that get it, but at a certain point you’re joined by people who don’t know how to code. These are the people delighted to build if only they were offered a “hammer”.

Now where’s the toolbox?

Banner image source.


How to Balance a Startup With Parenthood

Original Source: http://feedproxy.google.com/~r/buildinternet/~3/yIetNC8K_Eo/

One of the common startup myths is that single 20-somethings are the most successful entrepreneurs and that they are the demographic that starts the most companies. Zach and Sam may have started One Mighty Roar before they were even legal to go into a bar, but research from the Kauffman Foundation states that the average founder is actually 40 years old. The same report shows that nearly 70% of entrepreneurs are married and 60% had at least one child. So much for the stereotype.

Tons of startups, from Intel to Starbucks, were all started by parents. I am a dad myself and One Mighty Roar has been growing along with my daughter. Before I became a father, I got to work with a number of folks who taught me some really great lessons about balancing parenthood and a startup, and I still use these lessons to this day.

1. Think of Your Partner As Your Investor

Having a supportive home partner is a must, and you run a chance of a very painful and expensive divorce if you don’t manage the relationship and foster that support. Think of your partner as your investor, because that person has more influence than you think. So before you start a company or pick a team to join, take the time to pitch the venture and convince your most important investor. It is worth getting your partner’s support.

2. Choose Your Startup Team Wisely

The team you work with is like a second family. Pick wisely! There are many reasons I joined the OMR team, but their support of me being a parent from Day One has been nothing but an inspiration. When your team supports your choice to be a parent, it removes a large layer of office politics and acts as a great source of energy. Even your single colleagues may be parents someday. You have to set an example and inspire them not to fear it when their time comes.

3. Communicate Your Schedule and Priorities

Conflict and ambiguity bring an unnecessary level of overhead to work and family relationships. To minimize that overhead, communication and expectations-setting should be at the top of your mind daily. I am a huge fan of “Commanders Intent.” We practice it at One Mighty Roar at every level, from apprentice to founder. You have to let people know what you are going to do and what the final outcome will look like. Communicating possible risks and where you need help will prepare your home and office teams to have your back when needed. In addition to providing context to a lot of your actions, being transparent with what you are doing and how you are going to do it adds a level of personal discipline you need.

4. Focus

If it does not serve your family or business – purge it! Often, the first thing to go are networking events. Those are mostly “drink-ups” that have no real business value, anyway. Second thing to go are meetings with people who are either not helpful to your work or who are “takers.” These are folks who rarely, if ever, reciprocate for the time and connections you give them. Lastly, it is very likely you will be jettisoning a bunch of hobbies and other activities now that you are a parent. If you already have kids, you know that “me time” is like sleep at Navy Seals training – you take when you can get it, since you don’t get to plan for it. For me, sleep has become the most sought after “hobby.” Being a parent and getting to work with my team is extremely fulfilling and honestly I don’t care enough to pick other hobbies back up right now. I know I am not alone thinking that way.

5. Manage Your Energy

Energy management is not just for utilities. Business has strong demands on your mental energy, and your new family can take a physical toll. Pulling all nighters for the sake of work is non-sense. Generally speaking, the work you do when you’re up at 2:00 am isn’t top-quality, and you’re only going to have to redo the work again the following day. So don’t waste your time.

6. Set Boundaries

When people at work and at home know what to expect from you and when, you cut out a massive amount of conflicts. For example, my team knows there are certain days I leave at 5:00 pm to pick up my daughter and am not going to be reachable until she goes to sleep at 8:00 pm. On those days, my wife knows I need to be in extra early to pound out some work. Most weekday evenings I do set aside time to work on finance and legal docs, because I do the best work on those then.

That means that one of the weekend days is exclusively for housework, family fun, and other non-work activities. It also does not relieve me of my share of housework. Those are just couple of examples.

There are many many successful companies being led by parents. Motivation you derive from having to provide for your family, the impending college costs for your kids, that retirement you have to build for yourself, and the drive to make your family proud of you are incredible fuel for building a successful company. Take it one step at the time and you can and will put your family and growing business in equilibrium. It is not only doable, it is also extremely fun and fulfilling.


A Collection of Interesting Facts about CSS Grid Layout

Original Source: https://css-tricks.com/collection-interesting-facts-css-grid-layout/

A few weeks ago I held a CSS Grid Layout workshop. Since I’m, like most of us, also pretty new to the topic, I learned a lot while preparing the slides and demos.
I decided to share some of the stuff that was particularly interesting to me, with you.

Have fun!

Negative values lower than -1 may be used for grid-row-end and grid-column-end

In a lot of code examples and tutorials you will see that you can use grid-column-start: 1 and grid-column-end: -1 (or the shorthand grid-column: 1 / -1) to span an element from the first line to the last. My friend Max made me aware that it’s possible to use lower values than -1 as well.

.grid-item {
grid-column: 1 / -2;
}

For example, you can set grid-column: 1 / -2 to span the cells between the first and the second to last line.

See the Pen Grid item from first to second to last by Manuel Matuzovic (@matuzo) on CodePen.

It’s possible to use negative values in grid-column/row-start

Another interesting thing about negative values is that you can use them on grid-column/row-start as well. The difference between positive and negative values is that with negative values the placement will come from the opposite side. If you set grid-column-start: -2 the item will be placed on the second to last line.

.item {
grid-column-start: -3;
grid-row: -2;
}

See the Pen Negative values in grid-column/row-start by Manuel Matuzovic (@matuzo) on CodePen.

Generated content pseudo-elements (::before and ::after) are treated as grid items

It may seem obvious that pseudo-elements generated with CSS become grid items if they’re within a grid container, but I wasn’t sure about that. So I created a quick demo to verify it. In the following Pen you can see that generated elements become grid- and flex-items if they are within a corresponding container.

See the Pen Experiment: Pseudo elements as grid items by Manuel Matuzovic (@matuzo) on CodePen.

Animating CSS Grid Layout properties

According to the CSS Grid Layout Module Level 1 specification there are 5 animatable grid properties:

grid-gap, grid-row-gap, grid-column-gap
grid-template-columns, grid-template-rows

Currently only the animation of grid-gap, grid-row-gap, grid-column-gap is implemented and only in Firefox and Firefox Mobile. I wrote a post about animating CSS Grid Layout properties, where you’ll find some more details and a demo.

The value of grid-column/row-end can be lower than the start value

In level 4 of the CSS Grid Garden game I learned that the value of grid-column-end or grid-row-end may be lower than the respective start equivalent.

.item:first-child {
grid-column-end: 2;
grid-column-start: 4;
}

The item in the above code will start on the 4th line and end on the 2nd, or in other words, start on the 2nd line and end on the 4th.

See the Pen Lower grid-column-end value than grid-column-start by Manuel Matuzovic (@matuzo) on CodePen.

Using the `span` keyword on grid-column/row-start and grid-column/row-end

A grid item by default spans a single cell. If you want to change that, the span keyword can be quite convenient. For example setting grid-column-start: 1 and grid-column-end: span 2 will make the grid item span two cells, from the first to the third line.

You can also use the span keyword with grid-column-start. If you set grid-column-end: -1 and grid-column-start: span 2 the grid-item will be placed at the last line and span 2 cells, from the last to third to last line.

See the Pen CSS Grid Layout: span keyword by Manuel Matuzovic (@matuzo) on CodePen.

grid-template-areas and implicit named lines

If you create template areas in a grid, you automatically get four implicit named lines, two naming the row-start and row-end and two for the column-start and column-end. By adding the -start or -end suffix to the name of the area, they’re applicable like any other named line.

.grid {
display: grid;
grid-template-columns: 1fr 200px 200px;
grid-template-areas:
“header header header”
“articles ads posts”
}

.footer {
grid-column-start: ads-start;
grid-column-end: posts-end;
}

See an example for implicit named lines in this Pen.

Grid is available in the insider version of Microsoft Edge

Support for CSS Grid Layout is pretty great since all major browsers, except IE and Edge, support it. For a lot of projects you can start using CSS Grid Layouts today. Support for Microsoft Edge will probably come pretty soon, because it’s already available in the insider version of Microsoft Edge.

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

DesktopChromeOperaFirefoxIEEdgeSafari57445211*1610.1Mobile / TabletiOS SafariOpera MobileOpera MiniAndroidAndroid ChromeAndroid Firefox10.3NoNo565954

If you want to learn more about Grids check out The Complete Guide to Grid, Getting Started with CSS Grid, Grid By Example and my Collection of Grid demos on CodePen.

A Collection of Interesting Facts about CSS Grid Layout is a post from CSS-Tricks

Why Your Agency Experience is Perfect for Startups

Original Source: http://feedproxy.google.com/~r/buildinternet/~3/mKiKq-wsKMM/

You got hired because you have a passion for brands and were able to talk intelligently to the client about Snapchat. You always thought you’d be doing something that had an impact on consumers. Clearly, writing Facebook posts for a cheese client wasn’t what you had in mind when you envisioned your career at a marketing agency.

So you’ve realized it’s time to do something else. The good news is, your skills are not at all limited to agency life. In fact, they are very applicable to the startup world. As a former agency person, let me explain why your skills can work well and are very needed in startups.

Building the right team is the most important thing in the first few years on a startup’s life. A quality product, happy customers… all of that is a result of getting the right people on the bus. At One Mighty Roar, we invest heavily in the people we bring into the company. Every person who ends up on our website has a backstory and lessons learned from their former work lives.

For me, I came to OMR after suffering nearly four years of agency life without much to feel good about. Now, my work as a strategist gives me more opportunities to impact how people use technology. Specifically, my team is working to help the Internet of Things be easier to use and make connected devices work together. I can see the real world business value on projects like this and this is my motivation to keep pushing the notion of what’s possible.

You might not realize the skills you learned while eating lunch lonely at your desk trying to power through a deck. But the truth is, startups are looking for people just like you. We sometimes just suck at writing job posts that reflect the skills we really need, so you may need to look beyond the bullet points and seek us out.

Here are four skills that I promise will make any startup person smile during the interview:

Attention to Detail – The likelihood of clients reading your meeting notes is about the same as getting your time-sheets done on time. However, this attention to detail can help the team keep track of items that need more attention. Your ability to take notes and follow up will be a surprising change to people who are used to being pulled in different directions all day. They will look to you as a valuable project manager and as the organized person to remind them about that pitch presentation that has been sitting on their to-do list for a month.

Distill Thoughts to Actionable Goals – Inside the war rooms of startups, many ideas are talked about with little or no action on what to do next. People with an agency background have been trained to distill a client’s thoughts into goals for the agency to solve or explore. Think of the startup as your client. By coming up with action items for each talking point, you’ll be the envy of the office happy hour.

Focus the Team on Solving One Problem – Remember that time you shut your creative team in a room until they solved how they were going to make a 30 second spot into a 15 second one? Well, the same skill to keep a team motivated and focused applies in the startup world too. While it’s not on most job descriptions, startups are looking for people that can motivate teams members, be their cheerleader, and keep projects on the right track.

Creative Thinking with a Mind to Build – Does it ever frustrate you that your agency doesn’t really make anything? You don’t make products, you advertise them. Building things is exactly what startups do. But what they need more of are people with a maker’s passion — but creative thinking — to solve the daunting “What’s next?” question that many agency folks can’t seem to master. The skills needed here are simple: You have the ability to think creatively on hard problems. This type of thinking happens all the time at agencies; you just don’t have the right team to actually implement the ideas. This is your chance to finally create things that people will use.

I hope by outlining the skills startups are craving will inspire you to consider switching to startup life. Skill level aside, what I believe to be the best reason to take your agency experience to a startup is the power you have to make change happen. Some agencies pitch “pie in the sky” ideas to clients knowing moving forward won’t actually happen. Startups, on the other hand, foster a culture to take on challenges and take the risk to actually execute ideas and try new things. Change is something startups embrace. Watching the success of a startup from the outside is one thing, but being involved in the experience will impact you the way you wish your agency did. Trust me, I work at a startup.


Four Elements of Truly Mobile-Friendly Responsive Menus

Original Source: http://webdesignerwall.com/tutorials/four-elements-great-responsive-menus

There are hundreds of ways to create responsive navigation, limited only by your creativity and the boundaries of what CSS can accomplish. Good responsive navigation is a little harder – a responsive menu must become a mobile menu, adhering to the needs and rules of touch-driven devices. Mobile design is rapidly changing, and so the […]

The post Four Elements of Truly Mobile-Friendly Responsive Menus appeared first on Web Designer Wall – Design Trends and Tutorials.

Playing with Shadow DOM

Original Source: https://css-tricks.com/playing-shadow-dom/

About a year ago, Twitter announced it would start displaying embedded tweets with the shadow DOM rather than an <iframe>, if the browser supports shadom DOM?

Why? Well, speed is one reason.

They say:

Much lower memory utilization in the browser, and much faster render times. Tweets will appear faster and pages will scroll more smoothly, even when displaying multiple Tweets on the same page.

Why the choice? Why is it necessary to use either iframes or shadow DOM? Why not just inject the content onto the page?


It’s a totally understandable need for control. An embedded Tweet should look and behave just exactly like an embedded Tweet. They don’t want to worry about the styles of the page bleeding in and messing that up.

An <iframe> makes style scoping very easy. Point the src of the iframe at a URL that displays what you want an embedded tweet to look like, and you’re good. The only styles used will be those you include in that document.

Twitter does this iframe-injection in a progressive enhancement and syndication-friendly way. They provide a <blockquote> with the Tweet and a <script>. The script does the iframe-injection. If the script doesn’t run, no matter, a happy blockquote. If the script does run, a fully functional embedded Tweet.

That script is the key here. Scripts can do just about anything, and they host it, so they can change it up anytime. That’s what they use to detect shadow DOM support and go that route instead. And as we covered, shadow DOM is faster to render and has lower memory needs. Shadow DOM can also help with the style scoping thing, which we’ll look at in a moment.

Height flexibility

There’s another thing too, that happens to be near and dear to my heart. An <iframe> doesn’t adjust in height to fit its contents like you expect other elements to do. You set a height and that’s that. It will have scrollbars, if you allow it and the content needs it. Back in the Wufoo days, we had to jump quite a few hoops to get embedded forms (in frames) to be as tall as they needed to be. Today, at CodePen, our Embedded Pens have adjustable heights, but there isn’t any option for just “as tall as they need to be”. (I’m exactly sure if that makes sense for CodePen Embeds or not, but anyway, you can’t do it right now.)

An element with a shadow DOM is just like any other element and that it will expand to the content naturally. I’m sure that is appealing to Twitter as well. If they calculate the height wrong, they run the risk of cutting of content or at least having the embedded Tweet look busted.

Most Basic Usage

Here’s the bare minimum of how you establish a shadow DOM and put stuff in it:

See the Pen Most basic shadow DOM by Chris Coyier (@chriscoyier) on CodePen.

Notice how the styling within the Shadow DOM doesn’t leak out to the regular paragraph element? Both paragraphs would be red if they did.

And notice how the paragraph inside the shadow DOM isn’t sans-serif like the one outside? Well, normally that would be. Inherited styles still inherit through the shadow DOM (so in that way it’s not quite as strong a barrier as an iframe). But, we’re forcing it back to the initial state on purpose like this:

:host {
all: initial;
}
Handling that fallback

My first thought for dealing with a fallback for browsers that don’t support shadow DOM was that you could chuck the same exact content you were stuffing into the shadow DOM into an iframe with srcdoc, like…

<iframe srcdoc=”the same content”>

Or more likely this is something you’re doing in JavaScript, so you’d test for support first, then either do the shadow DOM stuff or dynamically create the iframe:

See the Pen Shadow DOM Basic by Chris Coyier (@chriscoyier) on CodePen.

Turns out srcdoc isn’t the best choice (alone) for a fallback as there is no IE or Edge support for it. But also that it’s not too big of a deal to just use a data URL for the regular src. Here’s a fork by Šime Vidas where he fixes that up:

let content = `
<style>
body { /* for fallback iframe */
margin: 0;
}
p {
border: 1px solid #ccc;
padding: 1rem;
color: red;
font-family: sans-serif;
}
</style>

<p>Element with Shadow DOM</p>
`;

let el = document.querySelector(‘.my-element’);

if (document.body.attachShadow) {

let shadow = el.attachShadow({ mode: ‘open’ }); // Allows JS access inside
shadow.innerHTML = content;

} else {

let newiframe = document.createElement(‘iframe’);
‘srcdoc’ in newiframe ?
newiframe.srcdoc = content :
newiframe.src = ‘data:text/html;charset=UTF-8,’ + content;

let parent = el.parentNode;
parent.replaceChild(newiframe, el);

}
TL;DR

Shadow DOM is pretty cool.
It’s comparable to an iframe in many ways, including style encapsulation. Embedded third-party content is a pretty good use case.
It’s possible to use it while falling back to an iframe pretty easily.
It’s a part of the larger world of web components, but you don’t have to go all-in on all that if you don’t want to.

Here’s another simple demo (this one using a custom element), but instead of rolling our own back support, it’s polyfilled.

Playing with Shadow DOM is a post from CSS-Tricks

Find Your Five Minute Culture

Original Source: http://feedproxy.google.com/~r/buildinternet/~3/hfH7-EFy3JA/

If I spent five minutes alone with a random person in your company, would I get the right impression?

Earlier this week I spoke on a panel about company culture. Culture is a whale of a topic, but this panel’s common thread was how to grow something that works. Once you hit your stride, how do you actually explain it to others? More importantly, how do you know when the culture works?

Good culture shows up in results instead of manifestos. At One Mighty Roar we use a five minute culture metric. If I leave you alone with anyone on the team for five minutes, three things will happen by the time I return.

You laugh at least once.
You learn something.
You have something to look up later.

Do you know what kind of people would fit?

The three items above have little to do with personality, and more how you approach the world. We don’t take ourselves too seriously and extend the same courtesy to others. We also spend a lot of time experimenting with new things. I could explain our culture like that, but the five minute impression is a showcase to how we live those beliefs.

Plenty of folks spend time writing down lists of things they believe. They’ll have culture manifestos with nebulous statements like “We’re always learning” and “We challenge the status quo”. What do those look like in action? Manifestos have their place, but knowing what it looks like in the wild is different. We like our approach because it’s a simple way to introduce how our team works. Your list will almost definitely be different. For example, a customer focused organization might have “You shared something you’re interested in.” This is just what makes sense for us right now.

What would happen in your team’s five minutes?


Best Email Marketing Tips to Increase Engagement & Subscribers

Original Source: http://webdesignerwall.com/general/best-email-marketing-tips-increase-engagement-subscribers

Email is your post powerful marketing channel when used well. Your visitor’s inbox is a perfect opportunity for you to capture attention, communicate important updates and invite readers back to your site for increased visibility. The stats on email marketing effectiveness say it all – top marketing specialists and service providers tell us that email […]

The post Best Email Marketing Tips to Increase Engagement & Subscribers appeared first on Web Designer Wall – Design Trends and Tutorials.