Smashing Newsletter
- How To Improve Your Workspace
- Workspaces 1 5 2 – Organize Your Workbench
- Workspaces 1 5 2 – Organize Your Workshop
- Workspaces 1 5 2 – Organize Your Working
- How To Organize A Small Workspace
Every week, we send out useful front-end & UX techniques. Subscribe and get the Smart Interface Design Checklists PDF delivered to your inbox.
Yarn workspaces let you organize your project codebase using a monolithic repository (monorepo). In this article, Jorge explains why they’re a great tool and how to create your first monorepo using Yarn with basic npm scripts, and add the required dependencies for each app. Organize work in the new workspaces in Power BI.; 9 minutes to read; In this article. Workspaces are places to collaborate with colleagues to create collections of dashboards, reports, datasets, and paginated reports. The new workspace experience helps you.
Any time I start working on a new project, I ask myself, “Should I use separate git repositories for my back-end server and my front-end client(s)? What’s the best way to organize the codebase?”
I had this same question after a few months working on my personal website. I originally had all the code in the same repository: the back end used Node.js and the front end used ES6 with Pug. I adopted this organization for convenience, since having both projects in the same repo made it easy to search for functions and classes, and facilitated refactors. However, I found some downsides:
- No independent deployments.
Both apps were using the same package.json, and there was no clear separation on both projects. - Unclear boundaries.
Since I rely on a global package.json, I didn’t have a mechanism to set specific versions for the back end and front end. - Shared utilities and code without versioning.
After some research, I found that Yarn workspaces was a great tool to solve those cons, and it was a helpful tool to create a monorepo project (more to come later!).
In this article, I share an intro to Yarn workspaces. Photo mechanic 6 0 download free. We’ll run through a tutorial together on how to create your first project with it, and we’ll finish with a recap and next steps.
What Are Yarn Workspaces?
Yarn is a package manager by the folks at Facebook, and it has a great feature called Yarn workspaces. Yarn workspaces let you organize your project codebase using a monolithic repository (monorepo). The idea is that a single repository would contain multiple packages. Packages are isolated and could live independent of the larger project.
As an alternative, we could place all of these packages into separate repositories. Unfortunately, this approach affects the shareability, efficiency, and developer experience when developing on the packages and their dependent projects. Furthermore, when we work in a single repository we can move more swiftly and build more specific tooling to improve processes for the entire development life cycle.
React is a good example of an open-source project that is monorepo. Also, React uses Yarn workspaces to achieve that purpose. In the next section we will learn how to create our first monorepo project with Yarn.
Creating A Monorepo Project With React And Express Using Yarn Workspaces In Six Steps
So far, we have learned what Yarn is, what a monorepo is, and why Yarn is a great tool to create a monorepo. Now let’s learn from scratch how to set up a new project using Yarn workspaces. To follow along, you’ll need a working environment with an up-to-date npm install. Download the source code.
Prerequisites
To fully complete this tutorial, you will need to have Yarn installed on your machine. If you haven’t installed Yarn before, please follow these instructions.
These are the steps we’ll be following in this tutorial:
1. Create Your Project And Root Workspace
Sigpro 2 1 2 download free. In your local machine terminal, create a new folder called
example-monorepo
:Inside the folder, create a new package.json with our root workspace.
This package should be private in order to prevent accidentally publishing the root workspace. Add the following code to your new package.json file to make the package private:
2. Create A React Project And Add It To The Workspace List
In this step, we will create a new React project and add it to the list of packages inside the root workspace.
First, let’s create a folder called packages where we will add the different projects we will create in the tutorial:
Facebook has a command to create new React projects:
create-react-app
. We’ll use it to create a new React app with all the required configuration and scripts. We are creating this new project with the name “client” inside the packages folder that we created in step 1.Once we have created our new React project, we need to tell Yarn to treat that project as a workspace. To do that, we simply need to add “client” (the name we used earlier) inside the “workspaces” list in the root package.json. Be sure to use the same name you used when running the
create-react-app
command.3. Create An Express Project And Add It To The Workspace
Now it’s time to add a back-end app! We use
express-generator
to create an Express skeleton with all the required configuration and scripts.Make sure you have
express-generator
installed on your computer. You can install it using Yarn with the following command:Using
express-generator
, we create a new Express app with the name “server” inside the packages folder.Finally, add the new package “server” into the workspaces list inside the root package.json.
Note: This tutorial is simplified with only two packages (server and client). In a project, you might typically have as many packages as you need, and by convention the open-source community use this naming pattern:
@your-project-name/package-name
. For example: I use@ferreiro/server
on my website.4. Install All The Dependencies And Say Hello To yarn.lock
![Workspace Workspace](https://www.cbc.ca/stevenandchris/content/images/cleaning-organizing-workspace.png)
Once we have added our React app, as well as our Express server, we need to install all the dependencies. Yarn workspaces simplifies this process and we no longer need to go to every single application and install their dependencies manually. Instead, we execute one command —
yarn install
— and Yarn does the magic to install all the dependencies for every package, and optimize and cache them.Run the following command:
This command generates a yarn.lock file (similar to this example). It contains all the dependencies for your project, as well as the version numbers for each dependency. Yarn generates this file automatically, and you should not modify it.
5. Using A Wildcard (*) To Import All Your Packages
Until now, for every new package we have added, we were forced to also update the root package.json to include the new package to the
workspaces:[]
list.We can avoid this manual step using a wildcard (*) that tells Yarn to include all the packages inside the packages folder.
Inside the root package.json, update the file content with the following line:
'workspaces': ['packages/*']
6. Add A Script To Run Both Packages
Last step! We need to have a way to run both packages — the React client and the Express client — simultaneously. For this example, we will use
concurrently
. This package let us run multiple commands in parallel.Add
concurrently
to the root package.json:Add three new scripts inside the root workspace package.json. Two scripts initialize the React and Express clients independently; the other one uses
concurrently
to run both scripts in parallel. See this code for reference.Note: We will not need to write our
start
scripts into the “server” and “client” packages because the tools we used to generate those packages (create-react-app
andexpress-generator
) already add those scripts for us. So we are good to go!Finally, make sure you update the Express boot-up script to run the Express server on port 4000. Otherwise, the client and server will try to use the same port (3000).
Go to packages/server/bin/www and change the default port in line 15.
Now we are ready to run our packages!
Where To Go From Here
Let’s recap what we’ve covered. First, we learned about Yarn workspaces and why it’s a great tool to create a monorepo project. Then, we created our first JavaScript monorepo project using Yarn, and we divided the logic of our app into multiple packages: client and server. Also, we created our first basic npm scripts and added the required dependencies for each app.
From this point, I’d suggest you review open-source projects in detail to see how they use Yarn workspaces to split the project logic into many packages. React is a good one.
Also, if you want to see a production website using this approach to separate back-end and front-end apps into independent packages, you can check the source of my website, that also includes a blog admin. When I migrated the codebase to use Yarn workspaces, I created a pull request with Kyle Wetch.
Moreover, I set up the infrastructure for a hackathon project that uses React, webpack, Node.js, and Yarn workspaces, and you can check the source code over here.
Finally, it would be really interesting for you to learn how to publish your independent packages to become familiar with the development life cycle. There are a couple of tutorials that are interesting to check: yarn publish or npm publish.
For any comments or questions, don’t hesitate to reach out to me on Twitter. Also, in the following months, I’ll publish more content about this in my blog, so you can subscribe there as well. Happy coding!
We’ve got you covered from disaster mitigation to Clorox wipes to what a color does for your psyche. This is the one stop shop on everything you need to know about organizing your workspace.
Why You Should Care About Your Mess, by the Numbers
This isn’t just about your desk, this is about your productivity, your reputation and most importantly, your happiness.
According to one survey, the average employee loses an hour a day to disorganization. Another study conducted by P-Touch found that the average employee spends 38 hours riffling through papers or searching for misplaced items per year. That’s almost a full work week! That costs business over $89 billion year after year.
87 percent of workers polled in a survey reported that they feel less productive in a cluttered workspace.
When your workspace is covered in loose papers and old cups of coffee, not only are you less efficient, but your reputation is probably also in the gutter. That same study showed that the vast, 86 percent vast, majority of people view disorganized workspaces as “unprofessional”. To make matters even worse, 80 percent of respondents believe that a messy person damages the productivity of the whole office. Ouch.
Don’t think you’re flying under the radar. Your coworkers are watching. According to a survey by Adecco, 57 percent of Americans say they judge their coworkers’ space.
If you’re okay with getting side-eyed by coworkers, consider this: a messy space is an unhappy space. Disorganized, dirty or cluttered spaces take a toll on your physical and mental health. Dr. Pamela Peeke is a medical professional and author who studies healthy living. She says that messy spaces make us feel hopeless, helpless and raise our cortisol levels. So, purchasing that new standing desk isn’t worth the health benefit if you still have piles of paper everywhere! (You’re also missing out on the 5.5 pounds you could lose this year.)
Don’t let this easy-to-fix problem hurt your health, happiness, reputation, productivity and peace of mind. Take action and organize your workspace for the better. After all, we spend decades at a desk. We might as well get the most out of it.
The 15 Steps to Organization
Where to start? First, take a deep breath. Now, make a plan. With a well-thought out plan, you can work miracles. Don’t worry, we did all the hard work for you. Below is our 15 step plan to organizing your workspace.
Cleaning Your Physical Space
1. Purge your office.
Start from scratch. Take everything out of every drawer, cabinet and bin and put it all on the floor. Take every item off your desk and every other surface and put it all on the floor. Look around. You are at ground zero. It may feel overwhelming, but it’s going to look a lot worse until it starts to look better.
This step will help you be able to visualize a whole new world—you may even find that folder you’ve been looking for a couple of weeks.
2. Sanitize.
Get some Clorox wipes, a trash bag, yellow gloves, and a roll of paper towels and get to work. Clean everything! Wipe up those muffin crumbs that have been sitting next to your keyboard for a week. Scrub out those coffee cup rings. Dust your monitors and keyboards. Get the fingerprints off your picture frames. Be sure to use anti-bacterial products for your phone, mouse, stapler and any other product you touch on a regular basis. It’s important to take this opportunity to do a thorough scrub. You may likely never get the chance again, so let’s take the bull by the horns. When flu season comes around, you’ll be thankful!
How To Improve Your Workspace
3. Assess the mess.
Take account of what you have on the floor. Throw everything into two piles: “keep” and “throw-away/recycle”. This is where you get to throw away all the trash and useless paper you’ve accumulated over the years. Toss out your collection of rogue sticky notes and recycle your old yellow legal pads. This isn’t just for paper items, the same goes for old furniture, the medicine ball that you never used, and that clock you keep meaning to get fixed but never have. Get all the trash out of the way so that just the important things that you want to keep in your office remain.
This will help you visualize what things will have to be put back in place.
4. Find the trash bin.
Before you do anything else, throw away/recycle your trash pile. Get rid of it! This will decrease the impulse to root around there later on and start pulling things back out.
5. Sort out what you want to keep.
Now, you should be left with your “keep” pile. But before you starting putting things back in place, we have to set an organizational plan in motion.
Getting Organized
6. Take account of what you have left in that “keep” pile.
![Workspaces 1 5 2 – organize your working Workspaces 1 5 2 – organize your working](https://cdn.lifehack.org/wp-content/uploads/2012/09/organizing-tips.jpeg)
First, take out all of your remaining loose paper, notes and memos. Make two piles: a “to-do” pile and a “file” pile. Put the papers that represent something that you have not gotten around to in the “to-do” pile. Take that pile, grab your calendar or to-do list and jot down a new and improved success list. Once you have the papers all transcribed, take that “success” pile and put it in a special spot near where you sit. That pile and your calendar will serve as visual reminders to get going on the tasks you have avoided.
7. Tackle your “file” pile.
Organize your papers with hanging folders and color coordinated tabs. Grab a label maker and make labels so you know where everything is without having to rummage through drawers. Label folders, bins, drawers and binders. Scan important documents so you have a digital copy of them.
This will help you put aside some of the most important “keep” items.
8. Find some prime real estate.
Now that you’ve taken care of your paper mess, let’s talk about the essential real estate on your desk. Follow the Law of Close Proximity, which says that we should position the equipment and supplies that we use most close to us.
This step requires an idea of what you actually use on a day to day basis. If you use a stapler once a month, it doesn’t belong next to your mouse. It belongs in the drawer. The dozen, random pens hanging around your workspace belong in a cup of some sort. Don’t shove them back in a pen holder if you never use the pen holder, put them back in the office supply room. Keep everything to a minimum. A cup of coffee, a picture of your family, a phone, a pen and some sticky notes should suffice for most people. Pro-tip, put the things you use most on your dominant side. That means if you hold your coffee cup with your left hand, it better be on the left side—you don’t want to be spilling hot coffee across your keyboard! Check out a handy desk map below.
Credit: Sofia Ordonez, CNN
9. Re-assembly required.
Next, put your computer, laptop or any other relevant electronics back on your desk. Do so in a way that the chords can be placed out of view. Corral your cables! Visible chords just add clutter and messiness to your desk.
10. Your computer, though.
Take this time to make sure your computer is working for your unique needs. Lisa Zaslow, a professional organizer has some tips. She says that your computer monitor should be below eye-level. Ideally, your eyes should be horizontal to the top of your monitor.
“The key thing here is to be looking down at your work,” she says. “The center of the screen should be located 15-20 degrees below horizontal eye level.” You should position your computer 17-30 inches away from you. That’s more or less arm’s distance. This distance ensures that your keyboard rests at such a place where your arms can stay at a 90 degree angle as you type.
11. That other stuff on the floor.
Once your desk is all set up, attack the remaining items on the floor. You’ll have to categorize and organize whatever is left in a way that makes sense to how you do work. If you’re the type who needs access to their binders of research all the time, put them in a convenient place that will make it easy for you to access. If you have file a lot of papers quickly, get a rolling file cabinet and put it near where you sit.
The goal is to have the things you need near you and the things you don’t need somewhere else entirely.
12. Find storage solutions.
Cubes are getting smaller. It’s an inconvenient truth, but it is what it is. If you don’t have enough storage in your office or at your cubicle, don’t fret. There are solutions out there. Consider getting baskets or desk stacking items to increase your organizational surface area. Ask your office manager for extra shelving or a file-cabinet on wheels.
Organizing Your Digital Space
13. Your desktop—no, the other one.
Unfortunately, we live in a time where most of us work at two desktops, one physical and the other digital. Now that your physical desk is set up. Set aside time to conduct some digital organization.
Does your desktop background look like a teenage boy’s bedroom floor? Clean it up! Organize your jpegs and pdfs into folders. While you are at it, take the time to set up those email inbox tags that you’ve always meant to add. It’s painless up front and will help you a ton in the long run.
If you’re worried about losing track of something, try adding hashtags to your documents so they’re easier to search for. This blog does a great job on showing you how to do that whether you have a PC or a Mac.
14. Don’t go blind.
We stare at our monitor all day long, so it’s important to make sure it isn’t hurting our vision. When we sit in front of a screen all day, we get something called eye strain. According to this site, eye strain symptoms arise in 50% to 90% of all screen users.
One way to prevent against eye strain is to make sure there is no glare on your computer screen. When glare occurs, it reduces our ability to discern what is on the screen leading us to squint. Try positioning your screen so there is no reflection from windows, lamps, or overhead lights.
Axiom verge 1 0 download free. Adjust the brightness on your computer and make sure to choose larger text sizes when reading.
Another great way to do prevent against eye strain is to download f.lux. F.lux is an application that adds yellow-tint to your screen to save your eyes from harmful blue light. “In general, the yellower the light, the less straining it is on your eyes.”
If you are still experiencing pain, remember to take breaks from your screen. Be sure to look away from your screen at least once every half an hour and take longer breaks every hour and half. Get up, stretch, look out a window—anything to take your eyes off the screen for a while.
15. Find some natural beauty.
Another productivity hack comes from research by psychologists Rachel and Stephen Kaplan. The duo found that when subjects glimpsed natural settings, they claimed to have “higher levels of satisfaction with their home, their career, and their life overall.” But that doesn’t really solve the problems many of us face who work in cities without a view.
Scientists Deltcho Valtchanov and Ellard Colin discovered that the natural scenes don’t have to be real to reduce stress—they can be on a screen. The creators of the study had their participants “immerse” themselves in a virtual reality setting. One option was a nature setting, the second option was a downtown, city environment and the third was “a Tron-like metaphysical space, consisting of geometric shapes.” The scientists found that even though it was just a simulation, the subjects that were immersed in the natural environment “reported significantly lower stress—and increased cognitive ability. The other two subject groups did not.” So, when the real thing isn’t available, take a quick gander at a beautiful nature-scape on your screen.
Get Creative and Scientific
Make your space yours. When do, you will feel like you have more control over your day. This article entitled The Perfect Workspace (According to Science) outlines why.
The article introduces Craig Knight, director of a company that consults organizational psychologists. He studied the effects of having jurisdiction of your space. As demonstrated by his study, if workers are given the ability to decorate their office, they will be up to 32 percent more effective than those not given the freedom. He also found that employees with control identified with their company more and had a greater sense of commitment to their team. So, take control of your space and give your employees the same opportunity!
Color, Visuals and Furniture Design
Before you throw the baby out with the bath water, know that there are ways to color your space to help you keep you stay productive. Red, warm colors imbue you with passion and energy, muted browns and earth tones are for stability, greens are for health and growth, yellows are for a pop of happiness and white provides freshness.
There are pros and cons to each color, so do some research before you commit to painting your walls. In a previous blog post, we found that red stimulates your brain and your appetite, but it also may lower productivity. Blue, on the other hand, boosts productivity. A study at the University of Texas found that a blue-green room was a better motivator than a stark-white or red room. Green helps get people more relaxed at work and yellow induces collaboration amongst team members.
If you are looking to revamp the furniture or decorations in/around your work space, consider the following from a 2011 study. Scientists had participants look at images of rooms with rounded furniture and rooms with linear-shaped furniture. They rated the curved furniture as “more pleasing and inviting”. A subsequent study found that “people rated curvy, rounded environments as more beautiful than straight-edged rectilinear environments and that the rounded spaces triggered more activity in brain regions associated with reward and aesthetic appreciation”. So, when choosing a new flower vase, consider the fishbowl-shaped one over the rectangular one.
Maintaining Your Space
When it comes down to it, nobody enjoys maintenance. But if you don’t want to go through the process of an organizational overhaul again, then you might want to give it a shot.
Workspaces 1 5 2 – Organize Your Workbench
Julie Morgenstern is an internationally renowned organizing and time management expert. She believes maintenance doesn’t have to be hard.
“Entrepreneurs are often so overwhelmed, they have so much to do, and the last thing they want is to ‘waste’ their time on putting things away,” she says. “But if you can, build in fifteen minutes at the end of the day to put everything back where it belongs.”
If you can’t spare the time at the end of the day, then try to do it during your day when your energy is at its lowest. Speaking from experience, that’s usually sometime after lunch. Use your desk cleaning time as a break to get your eyes off your screen, reset your mind and get out of your head.
We love the idea of a “success” pile, but make sure you’re cycling those papers after you complete your tasks. When starting a project, create a file or folder for it. Put all the documents in there as the project progresses. That way, you will have everything right where it needs to be for quick reference and you can keep your pile short.
Moving forward, make sure you have a trashcan right next to or underneath your desk. We want to encourage you to throw away things rather than stockpiling them. Getting into the habit of tossing unnecessary items is freeing! Recycle and shred accordingly.
Keeping your workspace up to par requires us to put our thinking cap on put together models and systems that help us stay organized. If you have some trouble, check out our Kick Ass Guide to Accountability to help you get there.
Wrapping up the ABC’s of Organization
Workspaces 1 5 2 – Organize Your Workshop
This whole process might take a couple of hours, but the peace of mind it brings is so worth it. Cleanliness brings clarity, organization, and peace of mind—necessities for anyone who wants to get the most out of their day.
Workspaces 1 5 2 – Organize Your Working
The good news is, if you follow all our steps, you probably won’t have to do a big overhaul ever again. You will have set yourself up to maintain the cleanliness and organization of your space for years to come.
How To Organize A Small Workspace
If you want to continue on your path to a better life, check out our 66-Day Wellness Challenge. Have any tips for others trying to clean up their workspace? Reach out to us at our Facebook page and share.