Love your videos as always! I had some arm pain after starting my desk job - mostly in the forearm, and a little tingling around the ring finger. My solution was to make sure my chair was high enough that my arms were 90 degrees with my keyboard, and get a stand for my laptop so I wasn't looking down at it. The source of the problem was actually tight muscles up around my shoulders and neck, which resulted in a nerve being pinched. A little ointment on my shoulder when I found it getting tight helped too. It took a couple months but did get back to normal.
First off of course... thanks so much for your great videos! I really enjoy them. Programmers are getting this now but historically this was a condition that pianists got. This has been topic of conversation for pianists for since the first piano was built. Some of the advice is to have your arm parallel to the floor and to keep your wrist straight (so as to not cut off blood or restrict the nerves) an d to let the weight of your arm or hand coming down (ie gravity) is what provides the force to hit the keys not forcing the arm down. Lots of books on piano technique out there that all programmers should look at.
Good stuff. Immutability is really key to taking advantages of higher level programming languages that can parallel process your code without explicitly defining how the parallel processing occurs. This is why functional programming languages such as Scala, Clojure, etc. are gaining traction. I've been using JavaScript for 20 years and several of your JavaScript-centric episodes teach me something new about how things work "under the hood". Thanks mpj.
@funfunfunction, Hi sir With all due respect I believe that var, let, and const all have a time and a place. To say that var is no longer used, let should take its place, and const should be everywhere I simply disagree. Yes let should be used for block scoping but I really have to say that const is being overused. If you want your object/code to not change, simply think a bit more about the outcome of your code ahead of time to prevent unforseen errors or even worse coding yourself into a corner. And also, as my professor says const should be something you know will never change, for example PI, gravitational acceleration, Euler's constant etc... In other words, use it when you know variables will never change, dont just assume its better than var. That is all, thank you~
@Midas / XIV what he said is not the actual thing happening at all. Your code will not be moved to top. This behavior is due to something called execution context. It has 2 stages, creation stage and execution stage. Since JS interpreter is single threaded, it needs to have a execution stack in order to keep track of what is being executed and a execution context is created for global and each function it executes. While in the creation stage, it will create global object, determine the value of "this" and also it will scan through the code and put variable declarations and functions to the memory. So when the execution stage comes, those declared variables (not their values) and functions are already available in the memory. Hence it feels like those declarations are moved to the top of the code.
That isn't true Rasmus. const will behave like so: if (true) const x = 5; console.log (x);//5 While let would behave differently: if (true) let x = 5; console.log (x)//Block-scoped declaration
Hey just wanted to say thanks. I am a 3 years into Java development, was trained in one of the software development bootcamps and learned ruby. As JavaScript is taking over the world my knowledge about it was very basic, and your tutorials makes me interested to apply more of these principles. I do find your videos very engaging, very informative, clear and concise. Thank you.
Just discovered you today and can't stop watching. Great content and humor! Concerning arm pain: I had this and it was due to clicking on mouse buttons. Makes sense that extending a finger and mashing a button hundreds of times a day would cause RSI. Problem went away quickly and has stayed away for years when I replaced the mouse with, first, a Wacom tablet and later a magic track pad with tap to click enabled.
Man, I am currently on 7:08 and have learned more than with hundreds of articles on the web. Thank you very much, seriously. JS looks crazy for square guys like me haha
Great video sir! in terms of ergonomics: i used to experience what you described on a daily basis previously. What fixed it for my was: Have a chair which has a good straight sit mode (not hanging back nor too forwards) and make sure that your chair has armrests where your elbow can rest at height of about 2/3cm lower than your desk height. Also what is essential is using a mouse that suits your hand. It would shock you to know how many people use too small mice. A nice long mouse ergonomics wise is the Razer Deathadder. Again thanks for making these awsome video's for new aspiring JS devs and i hope your arm is okay again by now!
impressive... very smart, no keyboard strok sound, no nasty backgroud sounds, theroy plus practical, deep knowledge so deep explaination ....amazing video !
I had bad wrist pains from long days at the computer. I cured it by adding dumbbell wrist curls and reverse wrist curls to my workouts. 4 sets of 12 reps with light weights, 3 times a week. I also use gel keyboard and mouse wrist rests to try to keep my wrists in the same plane as my forearm. I’ve been wrist pain free for several years. Now would be a good time to also add some preventive shoulder exercises because that is another very bad consequence of too much desk work.
Tip for the arm/hand pain: Do hand exercises! Do a RUclips search for 'gaming hand exercise' and you'll find what you need. Just do this every 30-60 minutes for a couple of minutes... you'll notice a world of difference! Thank you for the video. As always, great content!
I trained my left hand to be as efficient as my right hand using the mouse. It was annoying for the first week or two but you will appreciate being able too switch back and forth when one gets too painful. Its always good to have a backup. Thanks for the awesome vid's by the way!
Just found your videos. Are you still having arm pains? I was thiiiiis close to surgery before going all ergonomic setup. This included a ten-keyless keyboard (Kinesis Advantage 2 -- best keyboard I've ever owned), trackball, a keypad on the left side (Razer Orbweaver for shortcuts), etc. This COMPLETELY eliminated all arm pains, shooting electric shots up through the shoulder and spine, etc. Saved me tens of thousands in medical fees. Really enjoying the vids -- subscribed!
Nice video! That was a great little explanation on those concepts. I now credit you with convincing me to start using let until I am wise enough to know when to use const.
Another arm pain tip: In addition to posture and exercises, if you use a mouse, train your opposite hand so you can switch and give each hand/forearm a break. The first week of using the opposite hand was quite challenging for me. I became both physically and mentally tired quickly. But after the first week my accuracy and stamina was good enough for non-pixel perfect use.
For ergonomy - and this is something that has helped me immensely - you should look into compact mechanical keyboards. - Short distance between mouse and keyboard - Shortcuts for moving the cursors (stay in the home row) - Better typing feedback = less mistakes, more precision and less typing I'd recommend a Pok3r keyboard with brown switches or, for an endgame, comfortable keyboard, the Happy Hacking Keyboard Pro 2. Touchpad instead of mouse is pretty nice too, it helps in keeping the hand flatter instead of "claw-shaped" and avoids wrist movement.
Thanks a lot for your great effort. It is really fun to watch. I love the role plays with different characters to see all the different angles. I have noticed the way you express your self with words that stress the reserve words you are explaining. It sparks my neurons and keep me focus. Interestingly I have watched a lot of your videos about the most complex subjects and such a basic thing as the proper use of const will increase the robutness of my code. I have been leaking so much unnecessary state in my code!!!! So I will go to basic.
Man I was reading a book about es6 and it was sooooo boring I almost fell asleep without actually learning, but when I watched this, I feel like Im learning alot more in less time. Thanks man, huge help!
Hi MPJ Use your mouse with your left hand for a while. You get used to it after a bit. Also get a pad to lift up the base of your palm so your hand is parallel with your forearm, ie your wrist isn't bent backwards at all. Or have a high platform to use your mouse on which also stops your wrist getting bent. The only rear cure for RSI (repetitive strain injury) or Carpal Tunnel is rest. Turmeric is a good natural remedy for inflammation.
First, great video. Second, wrist pain. I don't get wrist pain for the same reason, but I think I have a solution. I tore my left TFCC (cartilage in the wrist). Ever since, I've had problems with pain. I bought a Goldtouch V2 Adjustable Keyboard and it literally solved all my issues. It looks incredibly weird (I've never met anyone that hasn't commented on it) and takes some getting used to, but it feels incredible. My first one lasted about 6 years (I think it broke in a box while moving, so I don't think it even gave out), and I just bought my second one a few months ago. I honestly swear by it. Writing this makes me think I should write a review lol.
I'm super late but if you are still feeling pain in your hands/arms from coding/typing all day, try to keep your wrist at an angle below your elbows. Also try to stretch out your wrist and shoulders occasionally. Also take some time to do stretches that bring your shoulders back and traps down. (i.e. grab your hands together on your low back and pull them back). Simple but effective. These videos are so helpful and great though so thank you so much!
finally a very in depth clarification of the differences between var, let and const! kudos for mentioning that const doesn't make object immutable, which at first is very counterintuitive. now you should do one about Object.freeze and deep-freeze 😋
I've probably watched 15:00 about a hundred times by now, and it still makes me laugh. It's been a lot of fun to watch your videos progress, man. Sharper editing, better tools, funny quips and breaks, more succinct language and visuals to help get the point across, etc. All very well done, and it just keeps getting better. Keep it up :)
Kyle Simpson has written a neat explanation about how hoisting actually works (compilation vs execution) in his series of books "You Don't Know JS". Those books are an absolute must read for anyone who works in JS, even seasoned programmers can benefit from it. For the record, he has as well excellent arguments for the use of semicolons where the JS engine would put them. My argument is that ultimately semicolons communicate your intentions just like "const" do. Said that, thanks for your endless stream of video. It's really nice to see so much love for JS. I love it too :)
Thanks man, fun video! I wish I found this 6 months ago when I was banging my head against the wall on this stuff!!! Love the format and I learned a few things :).
I am not a doctor, but I suspect that your hand/arm pain is most probably Repetitive Strain Injury (RSI). I think that it might be helpful when you get it in, say, your right hand/arm to try to use your left hand to operate your mouse, etc. You need to be able to rest your affected limb. Thanks mpj for the vids on "becoming a better programmer" FunFunFunctions is the best I've found for a wide variety of programming topics (... and the most entertaining). Keep up the good work. I always look forward to Monday mornings at 08:00 GMT for my next "fix".
const notes = { video: { ref: "Variable Types", src: "ruclips.net/video/sjyJBL5fkp8/видео.html", v: "Javascript ECM5 - check differenced to current ECM version (6)", content: { Scopes: { block: "if, for, etc", function: "within the function", global: "whole file [NEED TO CHECK]", exported: "entire project [NEED TO CHECK]" }, "variable types' scopes": { "no type": "automatically declared as global variable", var: "function scope", let: "block scope", "const": "block scope" }, hoisted: "variabls are 'hoisted' in JS. Declarations are automatically moved to the top of their respective scopes.", "use strict": "prevents undeclared variables to be promoted to global scope. Always use 'use scrict'", "mutable states": "VERY important to minimize this as this can be the source of applications stalling/hanging. Minimize it by using 'const' variable type every time you dont specifically need a type:let variable. If you dont need to redeclare it, use const. Important." }
I was also having arm pain a couple years back, and what greatly helped me was learning to use a Kinesis Advantage keyboard along with a trackball mouse. The Advantage has the keys in a columnar layout and shaped like a bowl so your fingers don't have to travel as much. It took me a good week before I felt comfortable using it but now I can't stand any keyboard that isn't columnar.
For the arm pain... I know people who said they had the same issue but switched keyboard styles to an alternative to qwerty and that fixed it for them. Also, I know you prefer very simple text editors, but a nice perk to vim is that your hands stay on home row during everything you do, so that you don't have to move your hands down to the arrow keys and Control keys as much
6:42 You’ll also have issues with lines starting with a bracket (e.g. an array destructuring assignment), a unary plus/minus operator (e.g. an expression that needs to be converted to a number but not stored for some reason?), though clearly the IIFE is the most common case. Basically, when you start a new line with a character that could also be part of the previous statement, start it with a semicolon instead because the JS engine will assume that you’re just breaking a single statement into several lines unless that really doesn’t make any sense. Also, here’s a pretty effective way to get your team to hate you: a ++ b
I had the same arm pains along with something akin to tennis elbow. I got a vertical mouse and had to do a series of weekly massages before everything went back to normal. I now stretch my arm muscles several times per day and try to exercise them in other ways to keep them feeling fresh.
I also have problems with this type of pain. What I started doing is switching the mouse hand from time to time. At first it is REALLY hard to use it with the other hand (but I had no choice, was finnishing my masters and had to keep writting my dissertation and coding). But nowadays I can use both hands with the same speed. I also noticed that puting my chair higher helped. Good luck!
An ergonomic mouse from Amazon is great and you can find them for around 20$, also you can give yourself a self-deep tissue massage by putting strong pressure on the places in your arm where you feel pain. If you feel a crunch, then try to breathe through the pain and work it out. If it's in your hand it's probably originating in the shoulder or even the chest or back. You don't want to hurt the other hand by over-exerting it on the pressure, so I push my body against the source of the pain on a chair arm, corner of a wall, or the pole of the subway car when I'm going to work.
Awesome channel! I really enjoy the mixture of coding and the more philosophical/psychological videos :) I think that the psychological aspects of programming are more important than coding itself in the grand scheme of things. What comes to ergonomics, the best thing (besides adjustable desks) I've encountered is a rollermouse with an arm support. Yes, that setup is expensive, but I would buy another set in a heart beat if I broke it somehow. Greetings from Finland! :)
MPJ! My recommendation is lift weights. You don't have to lift for Strongman or join a gym, however activity will get blood-flow where needed and assist recovery in minor injuries. Stretching, swimming, moving the body in general helps. Love the video!
On the subject of arm pain: Place the mouse on the left hand side of the keyboard - this works by 1) spreading the workload between the hands (only slightly, if you're a terminal-minded person like me, but still) and 2) decreasing the distance you move your hand to reach the mouse (since normal keyboards are asymmetrical and stick out further to your right - with arrow keys, and numerical part). Also, make sure you arms are supported by your desk (don't hold them up by muscle force), and that your wrists are not bent (usually this entails putting your keyboard flat on the desktop surface and not folding out those small legs most keyboards have).
From where you are pointing, it could be ulnar nerve entrapment - not a doctor but I have dealt with that before. Initial cause is slouching posture for long hours that happens as you get tired. To get rid of it, plan on doing some massage and some back-strengthening exercises for quite some time. I highly recommend this book "It's Not Carpal Tunnel Syndrome! - RSI Theory and Therapy for Computer Professionals" by Suparna Damany and Jack Bellis.
If anyone else is interested, this is the one I bought: www.amazon.de/Delux-M618-Scroll-Rad-PC-Maus-2-Wege/dp/B00AYXUIO6 It seems that this very model is sold unter a bunch of different names, seems to be the same mouse though.
you really don't need it though, at least not initally depending on your injury. most rsi comes over time (obviously.) so most is fixed by improving your wrists/arm/shoulder movements. powerball, stretches, nerve glide exercises. a vertical mouse aliviates the symptoms, it doesn't prevent them. :)
Now it would be cool that you show some techniques you use when programming. Like, mental steps you take before each problem you face. Or something (?) Great video!
Great video, as always! Re: desk height, the sweet spot is usually somewhere between the bend in your elbow and 5 cm below, depending on keyboard height. Another thing to double check is the height of your monitors. If they are too low, the strain on your neck can manifest into your arms and hands, and eventually into your back. Ideally, your posture should be similar to standing on a mountain enjoying the scenery, not hunched over like you're cooking dinner. It would be great to get more info about the ways that "use strict" comes into play - is it only useful for the situation you mentioned?
Wow you are good at this! Entertaining and informative! I would argue that you over simplified the example with the washing machine (in hardware cosmic rays can flip bits etc. and software developers can't do anything about it), but it got the point through.
Hand pain idea... I have found the old school Microsoft Natural Keyboards to be fantastic, and I own several now. Takes some time to adjust typing style, but has helped me a lot and acts as good security as nobody else will want to use your workstation as it will ruin their typing speed.
Hee! I found out that Yoga works a lot for me. While I'm studying computer sciences accuires to sit around a lot the body is out of balance.I hope this helps, thanks for the great videos, keep them coming!
I've been looking at ergonomics for a little while, and while I'm not an expert and definitely not a doctor (seriously, if you have any sort of regular pain; arm, wrist, legs, back, whatever; go see a doctor.) and lot of what's out there is speculation and hypothesis, but here's what I've learned. Step 1 is posture. I'm currently reading Deskbound (by Kelly Starrett) and the general theme is DON'T SIT! If possible, a standing desk with good posture should be more comfortable and better for you in the long run. If you need to sit, try an alternative to a chair such as a large ball (this will strengthen the core and align the spine naturally). REALLY need a chair? Make sure you're posture is tip-top, no slouching and no arching, and get up and move regularly (~every 15 mins). Desk height is also key, all the normal stuff. Keep the top of monitor at eye height, and the arms should be relaxed at 90 degrees, elbows just resting on the desk without lifting the shoulders. Don't use a wrist-rest! The weight of your forearm on your wrist, even padded, could exacerbate carpel tunnel issues more than help them! Weight should be spread as even as possible along the length of your arm. The mouse hand can pivot nicely from either the bony part of the wrist (pinkie side of the carpel tunnel) or the elbow. Speaking of mice, input devices! Vertical mice seem promising but I must say I'm not totally convinced (arms neutral, my palms rotate to point up, not inward or down). However, regular mice and touch-pads are known to be awful for wrist injuries. Everybody is different so if you know one mouse input gives you grief, try another (e.g. graphics tablets are a good option). One thing I've heard is to cycle through the input methods you have throughout the day. Keyboards are also an issue, for me in particular. A regular keyboard has my wrists in almost constant ulnar deviation (palms down, rotating outwards towards the pinkie) which gets very uncomfortable by the end of the day. A split/ergonomic keyboard should fix this (in theory) so I'm looking to get one asap. Hope this helps someone!
Posture is the part they call static load. The second is repetitive action. What +funfunfunction describes sounds more like something that happens from continuous typing, or usage of the mouse. As you've pointed out - doctors are best (they can give you sick leave etc...)
Exercising daily and taking breaks often is the only thing that works for me. It doesn't have to be anything special, just some 5 min of body-weight exercises. Don't forget to work on your core. Use handles for pushups if you're having wrist pain. And don't overdo it! It's better to do 5-8 pushups every morning and evening than to do 20 at once and then not be able to train at all the next day.
Hand / arm issues related to long hours smashing your keyboard can be relived with the help of stretches and tender loving care. 1. Stretch and do it often. Extend your arm straight out in front of you. Palm facing away from your chest and fingers pointed away from your feet. Take your other hand and apply pressure to your fingers so they are bend back toward your wrist. You can also reverse this by bending your hand and fingers downward. Do not over extend, listen to your body. 2. Place hand / arm in warm water for 3 -5 minutes. After massage the muscles with you opposite hand. 3. Take any anti inflammatory drug. (aspirin, ibuprofen) Not recommended for constant use. Haha get it, constant?... 4. Take time away from your computer and change your working set-up. I personally use thumb controlled mouses. The ones with the ball and all you do is move your thumb to move the mouse cursor around.. anyone else use em? Helps wonders.
About pain in your primary arm, use trackball. With trackball, you basically have to move only your thumb, thus helps a lot. Logitech M540 is my personal favorite.
I had carpal tunnel surgery in January. Your symptoms sound very similar to mine. I had arm pain, wrist and hand pain, numbness and loss of strength. You should visit an orthopedic surgeon. They have tests that can verify if it's carpal tunnel syndrome. Recovery wasn't fun but definitely worth it.
I have a degree in Sports Forearm issue: inflamed muscles &&|| tendons Reason: Pronation of the hand while using the mouse and typing Forearm pain: 1. Mouse: Try a larger(as in taller) one that permits a more claw like grip, this will make your hand rotate to a more neutral position => opposite of apple mouse, that's horrible 2. Self-massage 3. Stretching (try and find the angle where it hurts) 3.0 Steps (I think for starters twice a day will yield results, you will figure out for yourself if you need more or less) 3.1 Warm-up your forearm (movement with no pain) 3.2 Light stretch (some pain is allowed) 3.3 Gain mobility / Hard Stretch 3.4 Don't go crazy on it, after several minutes you shouldn't feel more acute pain than before 4+ There are some more techniques but the forearm being such a small muscle group they wouldn't help too much General muscle pain 1. Eat enough proteins 2. Try and not underdo too much the basics - Hydration - Sleep - Some vegetables in the diet Great vids btw
When he is making video 20 minutes length, you know you will watch it for one hour, not because of looking to understand problems and various situations, , but looking his facial expresions, movement, voices and shouts and constantly repeting them. Yes.
for your arm pain -- the Microsoft comfort sculpt keyboard is awesome. best ergonomic ever, and I've tried a lot. make sure you get the sculpt comfort, there are a few sculpt models. it's the cool looking one too...
You are the most friendly instructor in the world
+Web Application awwww thanks
funfunfunction Can you give me your name on facebook?
Love your videos as always!
I had some arm pain after starting my desk job - mostly in the forearm, and a little tingling around the ring finger. My solution was to make sure my chair was high enough that my arms were 90 degrees with my keyboard, and get a stand for my laptop so I wasn't looking down at it. The source of the problem was actually tight muscles up around my shoulders and neck, which resulted in a nerve being pinched. A little ointment on my shoulder when I found it getting tight helped too. It took a couple months but did get back to normal.
This worked for me too. Why are desks and chairs so misaligned? codepen.io/sheriffderek/pen/gppRbd
First off of course... thanks so much for your great videos! I really enjoy them. Programmers are getting this now but historically this was a condition that pianists got. This has been topic of conversation for pianists for since the first piano was built. Some of the advice is to have your arm parallel to the floor and to keep your wrist straight (so as to not cut off blood or restrict the nerves) an d to let the weight of your arm or hand coming down (ie gravity) is what provides the force to hit the keys not forcing the arm down. Lots of books on piano technique out there that all programmers should look at.
Good stuff. Immutability is really key to taking advantages of higher level programming languages that can parallel process your code without explicitly defining how the parallel processing occurs. This is why functional programming languages such as Scala, Clojure, etc. are gaining traction.
I've been using JavaScript for 20 years and several of your JavaScript-centric episodes teach me something new about how things work "under the hood". Thanks mpj.
Thank you so much for making these videos. I have learned so much and have been entertained with your jokes. Thank you Thank You Thank You.
thanks michael, that's exactly the kind of response I was aiming for! Thanks for following the channel!
@funfunfunction, Hi sir With all due respect I believe that var, let, and const all have a time and a place. To say that var is no longer used, let should take its place, and const should be everywhere I simply disagree.
Yes let should be used for block scoping but I really have to say that const is being overused. If you want your object/code to not change, simply think a bit more about the outcome of your code ahead of time to prevent unforseen errors or even worse coding yourself into a corner.
And also, as my professor says const should be something you know will never change, for example PI, gravitational acceleration, Euler's constant etc... In other words, use it when you know variables will never change, dont just assume its better than var. That is all, thank you~
I have to admit I failed to understand what is hoisted ... until now, many thanks for you. I really enjoyed your tutorial video. Thank you again!
Pls what is hoisted?
@Midas / XIV what he said is not the actual thing happening at all. Your code will not be moved to top. This behavior is due to something called execution context. It has 2 stages, creation stage and execution stage.
Since JS interpreter is single threaded, it needs to have a execution stack in order to keep track of what is being executed and a execution context is created for global and each function it executes.
While in the creation stage, it will create global object, determine the value of "this" and also it will scan through the code and put variable declarations and functions to the memory. So when the execution stage comes, those declared variables (not their values) and functions are already available in the memory. Hence it feels like those declarations are moved to the top of the code.
TIL: always use 'const'. If you *REALLY* need to change state, use 'let'. 'var' is dead.
Thanks! ;)
would 'let' still be useful because of the way it's scoped? ...regardless if you need to change it?
const has the same scoping as let
'const' is block scoped like 'let' :} awesome feature!
(function () {
const a = 3;
if (true) {
const a = 5; // no error, block scoped!
console.log(a); // outputs 5
}
console.log(a); // outputs 3
})();
That isn't true Rasmus.
const will behave like so:
if (true) const x = 5;
console.log (x);//5
While let would behave differently:
if (true) let x = 5;
console.log (x)//Block-scoped declaration
MDN says 'const' behave like 'let', Jordan. (developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const)
(function () {
var x = 'nope';
if (true) { // block-level
const x = 23;
console.log(x); // 23
}
console.log(x); // 'nope'
if (true) { // block-level
let x = 42;
console.log(x); // 42
}
console.log(x); // 'nope'
})();
Brilliant Video. The talk about mutable state will definately help me design my code better going forward.
glad to hear it!
Hey just wanted to say thanks. I am a 3 years into Java development, was trained in one of the software development bootcamps and learned ruby. As JavaScript is taking over the world my knowledge about it was very basic, and your tutorials makes me interested to apply more of these principles. I do find your videos very engaging, very informative, clear and concise. Thank you.
Thank you! I've been waited for next lesson about ES6 features and now I have it!
I love the scenography in your room :) Great videos, great job! You are very inspiring, thanks a lot!
Just discovered you today and can't stop watching. Great content and humor! Concerning arm pain: I had this and it was due to clicking on mouse buttons. Makes sense that extending a finger and mashing a button hundreds of times a day would cause RSI. Problem went away quickly and has stayed away for years when I replaced the mouse with, first, a Wacom tablet and later a magic track pad with tap to click enabled.
Man, I am currently on 7:08 and have learned more than with hundreds of articles on the web. Thank you very much, seriously. JS looks crazy for square guys like me haha
Great video sir! in terms of ergonomics: i used to experience what you described on a daily basis previously.
What fixed it for my was: Have a chair which has a good straight sit mode (not hanging back nor too forwards) and make sure that your chair has armrests where your elbow can rest at height of about 2/3cm lower than your desk height.
Also what is essential is using a mouse that suits your hand. It would shock you to know how many people use too small mice.
A nice long mouse ergonomics wise is the Razer Deathadder.
Again thanks for making these awsome video's for new aspiring JS devs and i hope your arm is okay again by now!
impressive... very smart, no keyboard strok sound, no nasty backgroud sounds, theroy plus practical, deep knowledge so deep explaination ....amazing video !
Thank youu
I had bad wrist pains from long days at the computer. I cured it by adding dumbbell wrist curls and reverse wrist curls to my workouts. 4 sets of 12 reps with light weights, 3 times a week. I also use gel keyboard and mouse wrist rests to try to keep my wrists in the same plane as my forearm. I’ve been wrist pain free for several years. Now would be a good time to also add some preventive shoulder exercises because that is another very bad consequence of too much desk work.
yeah, i had wrist issues (see above), that terminated (and relieved) just between the shoulder blades. definitely all connected
Tip for the arm/hand pain: Do hand exercises! Do a RUclips search for 'gaming hand exercise' and you'll find what you need. Just do this every 30-60 minutes for a couple of minutes... you'll notice a world of difference!
Thank you for the video. As always, great content!
That's Sort of what I do.
Foosball works great.
I'm not even a JS programmer, but your show is so well done I look forward to it and watch it every week! Thank you!
+Steven Wilson wow, thanks! That means a lot!
I trained my left hand to be as efficient as my right hand using the mouse. It was annoying for the first week or two but you will appreciate being able too switch back and forth when one gets too painful. Its always good to have a backup.
Thanks for the awesome vid's by the way!
Just found your videos. Are you still having arm pains? I was thiiiiis close to surgery before going all ergonomic setup. This included a ten-keyless keyboard (Kinesis Advantage 2 -- best keyboard I've ever owned), trackball, a keypad on the left side (Razer Orbweaver for shortcuts), etc. This COMPLETELY eliminated all arm pains, shooting electric shots up through the shoulder and spine, etc. Saved me tens of thousands in medical fees.
Really enjoying the vids -- subscribed!
Subscribed to your channel after coming across this video - super educational, super entertaining and supremely accessible - you the funkiest!
Nice video! That was a great little explanation on those concepts. I now credit you with convincing me to start using let until I am wise enough to know when to use const.
Thank you very much! You make clear things I've read about many times on my native language but couldn't understand.
Another arm pain tip: In addition to posture and exercises, if you use a mouse, train your opposite hand so you can switch and give each hand/forearm a break. The first week of using the opposite hand was quite challenging for me. I became both physically and mentally tired quickly. But after the first week my accuracy and stamina was good enough for non-pixel perfect use.
For ergonomy - and this is something that has helped me immensely - you should look into compact mechanical keyboards.
- Short distance between mouse and keyboard
- Shortcuts for moving the cursors (stay in the home row)
- Better typing feedback = less mistakes, more precision and less typing
I'd recommend a Pok3r keyboard with brown switches or, for an endgame, comfortable keyboard, the Happy Hacking Keyboard Pro 2.
Touchpad instead of mouse is pretty nice too, it helps in keeping the hand flatter instead of "claw-shaped" and avoids wrist movement.
You have a really fun channel. You make learning very digestible, thanks!
I have learned two universal principles so far: minimize scope and don't reassign a variable. Well done with this episode!
Thanks a lot for your great effort. It is really fun to watch. I love the role plays with different characters to see all the different angles. I have noticed the way you express your self with words that stress the reserve words you are explaining. It sparks my neurons and keep me focus. Interestingly I have watched a lot of your videos about the most complex subjects and such a basic thing as the proper use of const will increase the robutness of my code. I have been leaking so much unnecessary state in my code!!!! So I will go to basic.
this guy rly help me through my biggest problem love you keep it up i am you a new fun
Great explanation of 'let' and 'const'. I'm only a few months into JavaScript programming and this was a great tutorial on ES6
Excellent videos!
I followed you on twitter first where I knew about FunFunFunction and I'm McLoving it! Keep it up!
"It's so nice for something to be immutable." Great explanation. I loved the dishwasher analogy. Thank you!
Man I was reading a book about es6 and it was sooooo boring I almost fell asleep without actually learning, but when I watched this, I feel like Im learning alot more in less time. Thanks man, huge help!
Very very nice.. thanks for re-teaching me Javascript basics in the most fun way.
Hi MPJ
Use your mouse with your left hand for a while. You get used to it after a bit. Also get a pad to lift up the base of your palm so your hand is parallel with your forearm, ie your wrist isn't bent backwards at all. Or have a high platform to use your mouse on which also stops your wrist getting bent. The only rear cure for RSI (repetitive strain injury) or Carpal Tunnel is rest. Turmeric is a good natural remedy for inflammation.
First, great video. Second, wrist pain.
I don't get wrist pain for the same reason, but I think I have a solution. I tore my left TFCC (cartilage in the wrist). Ever since, I've had problems with pain. I bought a Goldtouch V2 Adjustable Keyboard and it literally solved all my issues. It looks incredibly weird (I've never met anyone that hasn't commented on it) and takes some getting used to, but it feels incredible. My first one lasted about 6 years (I think it broke in a box while moving, so I don't think it even gave out), and I just bought my second one a few months ago. I honestly swear by it. Writing this makes me think I should write a review lol.
Great explanation ! finally got my doubt cleared after watching this video , Thanks a lot.
hell yes. this is they type of instructing i am looking for. thank you
I'm super late but if you are still feeling pain in your hands/arms from coding/typing all day, try to keep your wrist at an angle below your elbows. Also try to stretch out your wrist and shoulders occasionally. Also take some time to do stretches that bring your shoulders back and traps down. (i.e. grab your hands together on your low back and pull them back). Simple but effective.
These videos are so helpful and great though so thank you so much!
finally a very in depth clarification of the differences between var, let and const! kudos for mentioning that const doesn't make object immutable, which at first is very counterintuitive.
now you should do one about Object.freeze and deep-freeze 😋
Just found your channel, you are such a great teacher. thank you for all your time!!!
I love the way you present your lectures. I'm like playing super mario on my switch at the same time learning. :D
Awesome video! You keep my full attention throughout all your videos with your energy and humor :)
I've been waiting for an explanation of this just like your's. Thank you!
The best sound effects! You should bring them back for the newer episodes.
I've probably watched 15:00 about a hundred times by now, and it still makes me laugh.
It's been a lot of fun to watch your videos progress, man. Sharper editing, better tools, funny quips and breaks, more succinct language and visuals to help get the point across, etc. All very well done, and it just keeps getting better. Keep it up :)
Kyle Simpson has written a neat explanation about how hoisting actually works (compilation vs execution) in his series of books "You Don't Know JS". Those books are an absolute must read for anyone who works in JS, even seasoned programmers can benefit from it.
For the record, he has as well excellent arguments for the use of semicolons where the JS engine would put them. My argument is that ultimately semicolons communicate your intentions just like "const" do.
Said that, thanks for your endless stream of video. It's really nice to see so much love for JS. I love it too :)
Thanks man, fun video! I wish I found this 6 months ago when I was banging my head against the wall on this stuff!!! Love the format and I learned a few things :).
I am not a doctor, but I suspect that your hand/arm pain is most probably Repetitive Strain Injury (RSI). I think that it might be helpful when you get it in, say, your right hand/arm to try to use your left hand to operate your mouse, etc. You need to be able to rest your affected limb.
Thanks mpj for the vids on "becoming a better programmer" FunFunFunctions is the best I've found for a wide variety of programming topics (... and the most entertaining). Keep up the good work. I always look forward to Monday mornings at 08:00 GMT for my next "fix".
I enjoy your teaching style.. added you to my short list of go to youtube teachers.
Glad to know I was using this correctly! Also great explanation of some of the internal JS scope behaviours. Crazy little language.
Thank you for clarifying this. You have gotten yourself a subscriber!
const notes = {
video: {
ref: "Variable Types",
src: "ruclips.net/video/sjyJBL5fkp8/видео.html",
v: "Javascript ECM5 - check differenced to current ECM version (6)",
content: {
Scopes: {
block: "if, for, etc",
function: "within the function",
global: "whole file [NEED TO CHECK]",
exported: "entire project [NEED TO CHECK]"
},
"variable types' scopes": {
"no type": "automatically declared as global variable",
var: "function scope",
let: "block scope",
"const": "block scope"
},
hoisted: "variabls are 'hoisted' in JS. Declarations are automatically moved to the top of their respective scopes.",
"use strict": "prevents undeclared variables to be promoted to global scope. Always use 'use scrict'",
"mutable states": "VERY important to minimize this as this can be the source of applications stalling/hanging. Minimize it by using 'const' variable type every time you dont specifically need a type:let variable. If you dont need to redeclare it, use const. Important."
}
}
}
Dude you are just awesome!!!! i love your videos, they are clear and make learning fun!! please keep them up!!
any video I see in this channel is very useful
thank you 💖
Am following your tutorials, your are fan and your presentation is even more awesome! Keep it up!
I was also having arm pain a couple years back, and what greatly helped me was learning to use a Kinesis Advantage keyboard along with a trackball mouse. The Advantage has the keys in a columnar layout and shaped like a bowl so your fingers don't have to travel as much. It took me a good week before I felt comfortable using it but now I can't stand any keyboard that isn't columnar.
Very well explained MPJ, you are the man!!
For the arm pain... I know people who said they had the same issue but switched keyboard styles to an alternative to qwerty and that fixed it for them. Also, I know you prefer very simple text editors, but a nice perk to vim is that your hands stay on home row during everything you do, so that you don't have to move your hands down to the arrow keys and Control keys as much
6:42 You’ll also have issues with lines starting with a bracket (e.g. an array destructuring assignment), a unary plus/minus operator (e.g. an expression that needs to be converted to a number but not stored for some reason?), though clearly the IIFE is the most common case. Basically, when you start a new line with a character that could also be part of the previous statement, start it with a semicolon instead because the JS engine will assume that you’re just breaking a single statement into several lines unless that really doesn’t make any sense. Also, here’s a pretty effective way to get your team to hate you:
a
++
b
Nice Stuff Bro...You have explained the things with simple examples.Thanks for u r valuable time.Keep Coding & Rocking
I had the same arm pains along with something akin to tennis elbow. I got a vertical mouse and had to do a series of weekly massages before everything went back to normal. I now stretch my arm muscles several times per day and try to exercise them in other ways to keep them feeling fresh.
I also have problems with this type of pain. What I started doing is switching the mouse hand from time to time. At first it is REALLY hard to use it with the other hand (but I had no choice, was finnishing my masters and had to keep writting my dissertation and coding). But nowadays I can use both hands
with the same speed.
I also noticed that puting my chair higher helped.
Good luck!
I was giving up on coding, but after I saw this, I think it might be just because of lack inner motivation... Thanks!
best explanation I've found so far on this.
thanks a lot, very clear and fun to learn with your video every Monday
I started using apple's magic mouse and it helped me a lot, it's height form factor did the trick for me
1:30 nice use of the cursor highlight/ focus! Your production qualities continue to improve!
An ergonomic mouse from Amazon is great and you can find them for around 20$, also you can give yourself a self-deep tissue massage by putting strong pressure on the places in your arm where you feel pain. If you feel a crunch, then try to breathe through the pain and work it out. If it's in your hand it's probably originating in the shoulder or even the chest or back. You don't want to hurt the other hand by over-exerting it on the pressure, so I push my body against the source of the pain on a chair arm, corner of a wall, or the pole of the subway car when I'm going to work.
Awesome channel! I really enjoy the mixture of coding and the more philosophical/psychological videos :) I think that the psychological aspects of programming are more important than coding itself in the grand scheme of things.
What comes to ergonomics, the best thing (besides adjustable desks) I've encountered is a rollermouse with an arm support. Yes, that setup is expensive, but I would buy another set in a heart beat if I broke it somehow.
Greetings from Finland! :)
Brilliant bro and Great Job Literally i was confused but now i'm excited
MPJ! My recommendation is lift weights. You don't have to lift for Strongman or join a gym, however activity will get blood-flow where needed and assist recovery in minor injuries. Stretching, swimming, moving the body in general helps. Love the video!
On the subject of arm pain: Place the mouse on the left hand side of the keyboard - this works by 1) spreading the workload between the hands (only slightly, if you're a terminal-minded person like me, but still) and 2) decreasing the distance you move your hand to reach the mouse (since normal keyboards are asymmetrical and stick out further to your right - with arrow keys, and numerical part).
Also, make sure you arms are supported by your desk (don't hold them up by muscle force), and that your wrists are not bent (usually this entails putting your keyboard flat on the desktop surface and not folding out those small legs most keyboards have).
So nicely explained. Good presentation. Loved it.
I had a similar problem with meta tarsals. Changed the mouse to use a trackball or a very small mouse and that helped so much that the pain went away.
you are the most fun teacher ever !! thank you
From where you are pointing, it could be ulnar nerve entrapment - not a doctor but I have dealt with that before. Initial cause is slouching posture for long hours that happens as you get tired. To get rid of it, plan on doing some massage and some back-strengthening exercises for quite some time. I highly recommend this book "It's Not Carpal Tunnel Syndrome! - RSI Theory and Therapy for Computer Professionals" by Suparna Damany and Jack Bellis.
Concerning your arm: I had something similar, bought a vertical mouse off amazon and Im very happy with it. No pain since then.
I had a developer friend that also advocates a mouse that is similar to an orig Atari joy stick.
If anyone else is interested, this is the one I bought: www.amazon.de/Delux-M618-Scroll-Rad-PC-Maus-2-Wege/dp/B00AYXUIO6
It seems that this very model is sold unter a bunch of different names, seems to be the same mouse though.
Had an issue too, got a vertical mouse and made a place to rest my elbows, no more pain for me.
Also consider a keyboard that allows tenting and splaying, it does the same thing as switching to a vertical. Combined, be pain free.
you really don't need it though, at least not initally depending on your injury. most rsi comes over time (obviously.) so most is fixed by improving your wrists/arm/shoulder movements. powerball, stretches, nerve glide exercises. a vertical mouse aliviates the symptoms, it doesn't prevent them. :)
fantastic state rant!
Thanks!
Now it would be cool that you show some techniques you use when programming. Like, mental steps you take before each problem you face. Or something (?)
Great video!
Great video, as always! Re: desk height, the sweet spot is usually somewhere between the bend in your elbow and 5 cm below, depending on keyboard height. Another thing to double check is the height of your monitors. If they are too low, the strain on your neck can manifest into your arms and hands, and eventually into your back. Ideally, your posture should be similar to standing on a mountain enjoying the scenery, not hunched over like you're cooking dinner.
It would be great to get more info about the ways that "use strict" comes into play - is it only useful for the situation you mentioned?
Wow you are good at this! Entertaining and informative! I would argue that you over simplified the example with the washing machine (in hardware cosmic rays can flip bits etc. and software developers can't do anything about it), but it got the point through.
Hand pain idea... I have found the old school Microsoft Natural Keyboards to be fantastic, and I own several now. Takes some time to adjust typing style, but has helped me a lot and acts as good security as nobody else will want to use your workstation as it will ruin their typing speed.
Hee!
I found out that Yoga works a lot for me. While I'm studying computer sciences accuires to sit around a lot the body is out of balance.I hope this helps, thanks for the great videos, keep them coming!
I've been looking at ergonomics for a little while, and while I'm not an expert and definitely not a doctor (seriously, if you have any sort of regular pain; arm, wrist, legs, back, whatever; go see a doctor.) and lot of what's out there is speculation and hypothesis, but here's what I've learned.
Step 1 is posture. I'm currently reading Deskbound (by Kelly Starrett) and the general theme is DON'T SIT! If possible, a standing desk with good posture should be more comfortable and better for you in the long run. If you need to sit, try an alternative to a chair such as a large ball (this will strengthen the core and align the spine naturally). REALLY need a chair? Make sure you're posture is tip-top, no slouching and no arching, and get up and move regularly (~every 15 mins).
Desk height is also key, all the normal stuff. Keep the top of monitor at eye height, and the arms should be relaxed at 90 degrees, elbows just resting on the desk without lifting the shoulders. Don't use a wrist-rest! The weight of your forearm on your wrist, even padded, could exacerbate carpel tunnel issues more than help them! Weight should be spread as even as possible along the length of your arm. The mouse hand can pivot nicely from either the bony part of the wrist (pinkie side of the carpel tunnel) or the elbow.
Speaking of mice, input devices! Vertical mice seem promising but I must say I'm not totally convinced (arms neutral, my palms rotate to point up, not inward or down). However, regular mice and touch-pads are known to be awful for wrist injuries. Everybody is different so if you know one mouse input gives you grief, try another (e.g. graphics tablets are a good option). One thing I've heard is to cycle through the input methods you have throughout the day. Keyboards are also an issue, for me in particular. A regular keyboard has my wrists in almost constant ulnar deviation (palms down, rotating outwards towards the pinkie) which gets very uncomfortable by the end of the day. A split/ergonomic keyboard should fix this (in theory) so I'm looking to get one asap.
Hope this helps someone!
Posture is the part they call static load. The second is repetitive action. What +funfunfunction describes sounds more like something that happens from continuous typing, or usage of the mouse. As you've pointed out - doctors are best (they can give you sick leave etc...)
Hey, Interesting comment. Does this book says something about stretching?
Exercising daily and taking breaks often is the only thing that works for me. It doesn't have to be anything special, just some 5 min of body-weight exercises. Don't forget to work on your core. Use handles for pushups if you're having wrist pain. And don't overdo it! It's better to do 5-8 pushups every morning and evening than to do 20 at once and then not be able to train at all the next day.
Hand / arm issues related to long hours smashing your keyboard can be relived with the help of stretches and tender loving care.
1. Stretch and do it often. Extend your arm straight out in front of you. Palm facing away from your chest and fingers pointed away from your feet. Take your other hand and apply pressure to your fingers so they are bend back toward your wrist. You can also reverse this by bending your hand and fingers downward. Do not over extend, listen to your body.
2. Place hand / arm in warm water for 3 -5 minutes. After massage the muscles with you opposite hand.
3. Take any anti inflammatory drug. (aspirin, ibuprofen) Not recommended for constant use. Haha get it, constant?...
4. Take time away from your computer and change your working set-up. I personally use thumb controlled mouses. The ones with the ball and all you do is move your thumb to move the mouse cursor around.. anyone else use em? Helps wonders.
Great as usual. It would be nice if one episode is about immutability, with real life examples of how bad is mutate objects.
About pain in your primary arm, use trackball. With trackball, you basically have to move only your thumb, thus helps a lot. Logitech M540 is my personal favorite.
thank you for all of your videos!
P.s: I really like your editing skills
Your videos are so clear it gives me that "Ah ha" moment that I need :)
I had carpal tunnel surgery in January. Your symptoms sound very similar to mine. I had arm pain, wrist and hand pain, numbness and loss of strength. You should visit an orthopedic surgeon. They have tests that can verify if it's carpal tunnel syndrome. Recovery wasn't fun but definitely worth it.
I find having an active lifestyle outside of work, lifting weights, swimming, climbing leave me with no pain from being at a desk all day.
I have a degree in Sports
Forearm issue: inflamed muscles &&|| tendons
Reason: Pronation of the hand while using the mouse and typing
Forearm pain:
1. Mouse: Try a larger(as in taller) one that permits a more claw like grip, this will make your hand rotate to a more neutral position => opposite of apple mouse, that's horrible
2. Self-massage
3. Stretching (try and find the angle where it hurts)
3.0 Steps (I think for starters twice a day will yield results, you will figure out for yourself if you need more or less)
3.1 Warm-up your forearm (movement with no pain)
3.2 Light stretch (some pain is allowed)
3.3 Gain mobility / Hard Stretch
3.4 Don't go crazy on it, after several minutes you shouldn't feel more acute pain than before
4+ There are some more techniques but the forearm being such a small muscle group they wouldn't help too much
General muscle pain
1. Eat enough proteins
2. Try and not underdo too much the basics
- Hydration
- Sleep
- Some vegetables in the diet
Great vids btw
Love your stuff man. Please please please keep it up!
I had the same problem Mattias! I just started swimming. The thing is some kind of pains on the wrists and the arms come from a bad sitting posture.
When he is making video 20 minutes length, you know you will watch it for one hour, not because of looking to understand problems and various situations, , but looking his facial expresions, movement, voices and shouts and constantly repeting them. Yes.
great info man.... I like the example of dish washer 😀
just wanted you to know you're a hit at our bootcamp.
for your arm pain -- the Microsoft comfort sculpt keyboard is awesome. best ergonomic ever, and I've tried a lot. make sure you get the sculpt comfort, there are a few sculpt models. it's the cool looking one too...
Great video on Let,Const and Var