Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Samantha Ming
The Skira Way of Preserving the Core and Stimulating Innovation at a Tech Startup
How do you prioritise and align focus when change is the only constant? How do you manage products when you haven’t reached product-market-fit and everyone’s requesting changes?
Fetching Data and What to Do With It
Fetching data from an API was a difficult thing for me to get working. The concept itself was understandable. Go and grab data from a url, convert it into a readable format. Once that’s done, put in some code that’ll display said data on a webpage. Simple right? But, it’s the inner workings, the syntax, and most importantly knowing where to start that kept getting me confused and unsure what to do.
HTML abbr Tag
The default styling of <abbr> varies a bit from different browsers. In Chrome and Firefox, it will have an underline and when hovered it will a tooltip of the title value you passed. Text of “TIL” being displayed as underlined If you open this page on Safari, there will be no underline. Also, the underline is only present if you have a title attribute. With its unique tag, it also makes customization styling very easy.
CSS Variables
Move over Sass, we have #CSS variables! I still love Sass of course. But it’s great native CSS supports this. No need for a preprocessor & no more compiling 🥳 Global scope will allow you to access the variable everywhere. Local scope will just be within your specific selector 👍 :root { /* 1. Defining in Global Scope */ --color: red; /* 2. Available in all selector*/ color: var(--color); /* red */ } .local { /* 1. Defining in Local Scope */ --color: blue; /* 2.
JavaScript Module Cheatsheet 📄
Here's a cheat sheet to show you the different ways of exporting and the corresponding way to import it. It really distills to 3 types: name, default, and list.
Strikethrough using HTML5
Code Tidbit by SamanthaMing.com CSS is great for styling, but not so good for providing meaning of your content. That’s what HTML semantic tags are for. When you’re trying to strikethrough content, there’s typically a reason you’re doing that. And that reason can be described using the proper HTML tag.
String startsWith() Method in JavaScript
CodeTidbit by SamanthaMing.com If you ever need to check if a string begins with another string, use ES6’s startsWithmethod. I really like this method because intuitively it's so comprehensive. Even if you don't know have any tech background, just by reading the code, you can more easily deduce what's happening in comparison to indexOf 🤓 I really like the direction JavaScript is going. Not just introducing all these helpful methods, but evolving the language to be more human readable.
How to Create Multi-Line String with Template Literals in JavaScript
CodeTidbit by SamanthaMing.com With the arrival of Template Literals, it’s finally super easy to produce multi-line strings. Previously, we had to use the \n or separate string concatenation which was messy and difficult to read. Finally, it’s easier now.
3 Ways to Set Default Value in JavaScript
Code Tidbit by SamanthaMing.com My go-to has always been the ternary operator for assigning a value to a variable conditionally. But ever since I discovered that || can be used as a selector operator, I’ve been using that more. I find my code so much easier to read 👍 Yes, it takes some time to wrap your head around it. But once you grasp the concept, it’s super handy. Now I don’t think less code makes your code better.
2 Ways to Merge Arrays in JavaScript – DailyJS – Medium
Code Tidbit by SamanthaMing.com Here are two ways to combine your arrays and return a NEW array. I like using the Spread operator. But if you need older browser support, you should use Concat.
ES6 Arrow Functions Cheatsheet – DailyJS – Medium
Code Tidbit by SamanthaMing.com Here’s a cheatsheet to show you the many ways to write your arrow functions. // Explicit Return, Multi-Line a => { return a } // Explicit Return, Single-Line a => { return a } // Implicit Return, Multi-line a => ( a ) // Implicit Return, Single-Line a => a // Multiple Parameters, Parentheses Required (a, b) => a, b Implicit vs Explicit Return We have several ways of writing our arrow functions.
How to Remove Array Duplicates in ES6 – DailyJS – Medium
Code Tidbit by SamanthaMing.com Here are three ways to filter out duplicates from an array and return only the unique values. My favorite is using Set cause it’s the shortest and simplest 😁 1. Using Set Let me start first by explaining what Set is: Set is a new data object introduced in ES6. Because Set only lets you store unique values. When you pass in an array, it will remove any duplicate values. Okay, let’s go back to our code and break down what’s happening.
How to Remove Array Duplicates in ES6 – DailyJS – Medium
Code Tidbit by SamanthaMing.com Here are three ways to filter out duplicates from an array and return only the unique values. My favorite is using Set cause it’s the shortest and simplest 😁 1. Using Set Let me start first by explaining what Set is: Set is a new data object introduced in ES6. Because Set only lets you store unique values. When you pass in an array, it will remove any duplicate values. Okay, let’s go back to our code and break down what’s happening.
Set Input Focus with HTML5 autofocus – Samantha Ming – Medium
Set Input Focus with HTML5 autofocus Code Tidbit by SamanthaMing.com Use the autofocus attribute on form elements to automatically focus the input field when the page loads 👍 This is super handy if your site has a form and you can automatically select the first input field and your user can start typing right away 👏 For example, if you have a search site like google, you can use this attribute to automatically select the search field.
3 Tips To Improve Your Programming Skills – Samantha Ming – Medium
2. Help Others 🤝 After I graduated from my programming bootcamp, I worked as a teacher assistant where I helped students with their assignments and projects. At first, I was super hesitant to do it. Because I was just a programming newbie. Yup, that’s the infamous imposter syndrome kicking in. But then I realize, of course, I can do it! I graduated the bootcamp. Even if I’m a complete newbie, I still have more programming knowledge then the new students who just started out.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Samantha
Contact Samantha, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack