Not only do regular expressions save you time, they also make the code more concise
You might not realize it but programming is a physical activity, not in the sense of a sports event but your overall health will impact your productivity, focus, and ultimately results.
- Unwind (stress reduction)
- Restore (sleep), and
- Optimize (challenge your brain)
Exercise: A regular (daily), intense (not counting walking around the office), and not too long (25 to 30 minutes) routine is best to stay in shape. There are plenty of awesome workouts to choose from, I tend to favor burpees and running. Remember, sitting is the new cancer.
Unwind: And while mindfulness meditation isn’t a magic cure to bad stress, Dr. Dean Sherzai says it can help you to feel calmer and more focused, which ultimately supports brain health. Whether it’s yoga or breathing exercises, find time to practice mindfulness and de-stress every day.
Restore: "The best spa you can have is a planned sleep environment, with no noise or light"
Try to avoid eating for one-and-a-half to two hours before bedtime—especially high-energy sugary or fatty foods. Avoid your phone, TV, and computers for 30 minutes to one hour before bedtime if possible, since blue light turns on the circadian part of brain that wakes you up. And try this hack if you can’t fall or stay asleep: Write your worries on a sheet of paper by your bed as they come to you. “After a couple of months, your brain disassociates worry from sleep” says
Optimize: Be social and challenge your brain
Learning is possibly the most important strategy to battle cognitive decline, but “when people retire, they’re less mentally active,” says Dr. Dean Sherzai. Try to keep your mind challenged at a high level—learn a new language, pick up a hobby like chess, or play a musical instrument. Set a specific, measurable, time-bound goals, like learning to learn to play “Hey Jude” on the guitar in the next month. Your brain will thank you for it.
Be Customer focused
We often forget that programs are made to solve real world problems, not find the most elegant solution to a theoretical question. We work for people who need our code to solve a specific problem. So instead of refactoring, optimizing and reviewing code, ship a A minimum viable product (MVP) version, with just enough features to be usable by early customers who can then provide feedback for future enhancements.
Remember, you can always enhance a bad product, you cannot enhance a non existing product
Avoid hacks and workarounds
In the hurry to make code work, we sometimes rely on 'hacks' or 'workarounds'. While these can be short term solutions, they often stop to work after updating a gem, a library or the Ruby version. So as hard as this can be at the moment, use only 'clean code' practices, your future self will thank you.
Performance and Speed
DHH once said that "Performance is a feature". He is absolutely right: A fast loading page makes the app easier to debug, reload, reset and test for the developer. For the end user, a fast loading page (< 200ms) give a good user experience, makes it easier to undo actions and correct input errors. While it's easy to fall for the "early optimization" trap, a fast page is a must. No need to be fancy with the metrics here, keep all pages under a second of load page, write less code, limit the calls to the database and do as much processing on the browser as possible
The modern freelancer has a lot of plates to spin on a daily basis in order to succeed – and there never seems to be enough hours in the day. Those that use their limited time most efficiently will blow past the competition and make an impact in their chosen market. . Read More