If you can't find a senior developer, be one. Avoid any team or environment having zero consistency, lack of git skills, full of random ideas that drag you around wasteful meetings.
1. Set Meetings with a focus on late afternoon on a Friday 2. Use Copy paste off google/stack without checking the code 3. Instantly forward any email to the rest of the junior teams 4. ??? 5. Profit
Thank you so much. As I'm a beginner and self-taught programmer these tips and your videos are way more helpful than you think. Thank you so much from my bottom of my heart.
In general good content here! Great Job! Only tip 4 grinds my gears because of the naming. Stay consistent with the naming if the functions are similar. Better use the same parameter names with these similar functions. Or be more concise and name them in more detail. The same goes for the function names if they are that similar. Possible approaches: calculate_sum(a,b) calculate_product(a,b) OR sum_numbers(summand1, summand2) multiply_numbers(factor1, factor2) Like you told us: Stay consistent! ;-)
This has been great! I've actually been working on a python project creator that'll create the project folder, a batch script to pip install your modules, create batch scripts for virtual environments, and style checkers (pyflakes, pycodestyles, and pylint). I'll be using a few of these bits in its next iteration for sure. Thank you, Tim!
Tim, I really enjoy your content. You speak clearly. You explain things very well. You use examples which are easy to follow. I had a question about the "avoid nesting" section. I had heard/read somewhere that when making logical comparisons it can be better to use is over == because it can be easier to follow (and you are less likely to miss an =). Is this not the case? Is that another one of those "style" things you talk about later in the video?
Huh, I already do some of these things already... to some extent. I am fairly consistant with how I write code (I've started to put function parameters on newlines), and I unknowingly have been doing guard checks before the actual logic. Of course, one thing that is very consistant with me is, I always capitalize a class, but keep functions camelcase or snake case. Something that may be controversial, I use "this" instead of "self" in python. I just think "this" is easier to type. Oh, and I tend to try and keep my lines short, because I have my editor zoomed in (I have bad vision), and I think it can be hard horizontally scrolling while trying to read some kind of logic. Oh, and just a small thing I want to mention, I usually have my editor in light mode, while my mobile devices are in dark mode, and the my school computer has the editor in dark mode. I don't know why, but I prefer to have light mode on my computer.
Hi, can You make a video on how to read library documentation? What to learn first, how to practice etc? For example, pandas if you never worked in it before?
I came into writing HTML which is not a format specific language and when I was learning, I often arranged the code by distinguishable blocks and lined everything so the code could be read quickly and easily. And the internet absolutely roasted me because I didn't present my code exactly how everyone else does, that was the day I realised that none of these people actually know what they're doing. The way HTML is written now is so annoying, it takes forever to break down the code and find bugs, but with my presentation, you could fast scroll and instantly pick out the different sections, It's like people want to stay in the past.
generally code style is determined in an IDE, google code style in intellij is popular. Often companies decide on one code style and when you press for ex in intellij ctrl+alt+l it fixes the indents for you
Yeah...i work with guy that doesn't write comments, he's brilliant developer, i hate every single line of his code. It's not for you, no one has to deal with your technical dept, heck he doesn't even understand why he wrote the things that are in this project after 10 years on it. Not saying that there should be comments on every class, every method, but least on critical paths just so when someone else comes in, he doesn't need to spend 3 months to figure out what's going on. For example, i inherited a project written in ruby, there you can override a variable in between variables, names are not scoped so if you have two methods that reuse the same variable you can change the value. Well it's done there on several occasions, without comments, there is no way that even the best engineers in the world can figure it out or get the grasp of how it works.
idk if my perception of junior/senior dev is skewed or smth but id say that while the tips in general are good the code examples given are not that great, to me the junior lvl code looks like sbd who barely started coding and is not yet even on a junior lvl, and the senior examples are smth i'd see junior write
I'm aware that when it comes to choosing editors, everybody has his favorite, but as a newbie, I'd like to pick one, powerful and simple enough to stick for a long time. I've heard the best for Emacs, Vim and even for VSCode. I trip with the speed of serious developers in Emacs. Do you think that the learning curve is worth it? Thanks
Comments: My rule is the code tells you WHAT it is doing. Comments should tell you WHY and WHERE. The next guy needs to know WHERE you put error checking, hygiene, business rules in your design so they can make changes but not mess with the design.
I am looking for a remote job but getting rejected I have been working for 2 years but I am unable to land a remote job I think my main problem is I don't have any live projects I you guys have anything else to say please say it might help me
Thanks for the amazing tips! A couple of questions... On the Guard Clauses part, shouldn't the "1" in the returned value be "100"? Also, the second if clause is redundant, isn't it?
Python has such functions like in (city in ['New York', 'Los Angeles']. And this just one sample. At least, I think you showed difference between junior and strong junior, ok weak midle, but not senior.
I think all of these tips are still very basic. What really sets apart a senior dev is decoupling as much as possible. Most of the code I write could be improved by reducing coupling.
What are your thoughts on chat GPT regarding code optimization? Do you feel Junior developers can reach senior level code by merely dumping their code into chat gpt and providing instructions to have them optimized?
Comments are very important. Sure you can see what you are doing, but two years from now, when you need to update it, you will ask "Why did I do this?" . That's what you need to put in the comments.
I think you are both right Tim argues not to have comments saying what you are doing. You are saying to comment code to understand why you did something . Personally I think code should be self expressive enough to tell the reader what’s going on but the code will never be able to tell the reader why you are doing that. So that’s when you would introduce comments
@@TechWithTim what if I use docstring to explain what my function does is it not also applicable??. i have just started learning object oriented programming. I have been writing my comments like this. #!/usr/bin/python3 """ this module represents a class square """ class Square: """Represents a square class """ def __init__(self, size=0): """Initialize data""" if type(size) != int: raise TypeError("size must be an integer") elif size < 0: raise ValueError("size must be >= 0") else: self.__size = size def area(self): """ Returns the area of a square """ return (self.__size * self.__size)
U are not a senior because u use guard clause or something else. U become senior because u have years of experience... The profession of programmer is not just about code and how u write it... And read the book "clean code" should be the first step for a junior programmer
You should be writing comments on the blocks of code... anything functional IMO. Why read 5+ lines when you should be able to read 1 comment. I think you made every CS teacher cry bro.
All arbitrary and biased. I cringe when I hear “clean code” or “coding standards”, as it becomes like gospel. And often readability is a domain trade. If I am asked to maintain for example a fluid simulation system, I’m at a loss! Not matter “how clean” the code is because I don’t have that domain knowledge. Give me any embedded or system code, I will find my way around because I have that domain knowledge. Even if it’s not coded the way I do (and that’s perfectly fine, each has their own dialect and signature) I’ll find me way. Clean code and “coding standards “ Taylor to the lowest common denominator in a team. And often clean code with all its a abstraction is slow code - I guess whenever you use Python, JS or TS that performance and memory usage is not at the front of your mind, but it is for me. And when I can save 20% of cpu usage, like this morning in a rust project, by having to make it less nice looking. I’d happily do that!
Want to improve your programming? Check out programmingexpert.io where this is a LIMITED TIME SALE happening right now!
Please start a series on DevOps.
If you can't find a senior developer, be one. Avoid any team or environment having zero consistency, lack of git skills, full of random ideas that drag you around wasteful meetings.
Good job
1. Set Meetings with a focus on late afternoon on a Friday
2. Use Copy paste off google/stack without checking the code
3. Instantly forward any email to the rest of the junior teams
4. ???
5. Profit
Thank you so much. As I'm a beginner and self-taught programmer these tips and your videos are way more helpful than you think. Thank you so much from my bottom of my heart.
No problem! Best of luck on your journey
@@TechWithTim Thank you 😀
In general good content here! Great Job!
Only tip 4 grinds my gears because of the naming. Stay consistent with the naming if the functions are similar.
Better use the same parameter names with these similar functions. Or be more concise and name them in more detail.
The same goes for the function names if they are that similar. Possible approaches:
calculate_sum(a,b)
calculate_product(a,b)
OR
sum_numbers(summand1, summand2)
multiply_numbers(factor1, factor2)
Like you told us: Stay consistent! ;-)
good point!
I think both ways are valid. Problem with your approach imho: You need error handling in every single function, which will bloat the code.
This has been great! I've actually been working on a python project creator that'll create the project folder, a batch script to pip install your modules, create batch scripts for virtual environments, and style checkers (pyflakes, pycodestyles, and pylint). I'll be using a few of these bits in its next iteration for sure. Thank you, Tim!
Tim, I really enjoy your content. You speak clearly. You explain things very well. You use examples which are easy to follow. I had a question about the "avoid nesting" section. I had heard/read somewhere that when making logical comparisons it can be better to use is over == because it can be easier to follow (and you are less likely to miss an =). Is this not the case? Is that another one of those "style" things you talk about later in the video?
Huh, I already do some of these things already... to some extent. I am fairly consistant with how I write code (I've started to put function parameters on newlines), and I unknowingly have been doing guard checks before the actual logic. Of course, one thing that is very consistant with me is, I always capitalize a class, but keep functions camelcase or snake case. Something that may be controversial, I use "this" instead of "self" in python. I just think "this" is easier to type.
Oh, and I tend to try and keep my lines short, because I have my editor zoomed in (I have bad vision), and I think it can be hard horizontally scrolling while trying to read some kind of logic.
Oh, and just a small thing I want to mention, I usually have my editor in light mode, while my mobile devices are in dark mode, and the my school computer has the editor in dark mode. I don't know why, but I prefer to have light mode on my computer.
13:35 That’s a good one for me. Thanks. I often struggle to make my conditionals readable.
Hi, can You make a video on how to read library documentation? What to learn first, how to practice etc? For example, pandas if you never worked in it before?
I came into writing HTML which is not a format specific language and when I was learning, I often arranged the code by distinguishable blocks and lined everything so the code could be read quickly and easily. And the internet absolutely roasted me because I didn't present my code exactly how everyone else does, that was the day I realised that none of these people actually know what they're doing. The way HTML is written now is so annoying, it takes forever to break down the code and find bugs, but with my presentation, you could fast scroll and instantly pick out the different sections, It's like people want to stay in the past.
Do you have a github repo to how you wrote the html? I would like to see and learn
GitHub repo please, I want to learn
generally code style is determined in an IDE, google code style in intellij is popular. Often companies decide on one code style and when you press for ex in intellij ctrl+alt+l it fixes the indents for you
As an incoming junior dev I appreciate the advice!
def likeDesicion(**comment):
if likeSnakeCase > likeCamelCase:
return False
return True, comment
Yeah...i work with guy that doesn't write comments, he's brilliant developer, i hate every single line of his code. It's not for you, no one has to deal with your technical dept, heck he doesn't even understand why he wrote the things that are in this project after 10 years on it.
Not saying that there should be comments on every class, every method, but least on critical paths just so when someone else comes in, he doesn't need to spend 3 months to figure out what's going on.
For example, i inherited a project written in ruby, there you can override a variable in between variables, names are not scoped so if you have two methods that reuse the same variable you can change the value.
Well it's done there on several occasions, without comments, there is no way that even the best engineers in the world can figure it out or get the grasp of how it works.
Damn tim..love your success...
Been following you for over 4 years💚
WOW! Thanks so much for the continued support, appreciate you
idk if my perception of junior/senior dev is skewed or smth but id say that while the tips in general are good the code examples given are not that great, to me the junior lvl code looks like sbd who barely started coding and is not yet even on a junior lvl, and the senior examples are smth i'd see junior write
These tips are so simple, yet so effective. Thanks for sharing these!!
comments are needed to explain why (not what) your code is doing something.
You can argue that when You learn a new language it's actually good to put a lots of verbose comments.
I'm aware that when it comes to choosing editors, everybody has his favorite, but as a newbie, I'd like to pick one, powerful and simple enough to stick for a long time. I've heard the best for Emacs, Vim and even for VSCode. I trip with the speed of serious developers in Emacs. Do you think that the learning curve is worth it? Thanks
Comments: My rule is the code tells you WHAT it is doing. Comments should tell you WHY and WHERE. The next guy needs to know WHERE you put error checking, hygiene, business rules in your design so they can make changes but not mess with the design.
amazing !!! Thanks alot so thankful
Why def main, just do if __name__=="__main__", that clear enough
Great advice, thank you!
do you have a list of the extension you use with vscode? like what makes certain things in italics an other things.. color theme.. etc???
He's using prettier. Also, you can see some of the extensions along the bottom of his screen. Prettier being one of them. Hope that helps.
very useful, thanks for the info
I am looking for a remote job but getting rejected I have been working for 2 years but I am unable to land a remote job I think my main problem is I don't have any live projects I you guys have anything else to say please say it might help me
Really helpfull, thanks!
It's something Usefull
legend legend legend
Thanks for the amazing tips! A couple of questions... On the Guard Clauses part, shouldn't the "1" in the returned value be "100"? Also, the second if clause is redundant, isn't it?
The student thing can be just one lost comprehension, and I'm not even a junior
Python has such functions like in (city in ['New York', 'Los Angeles']. And this just one sample. At least, I think you showed difference between junior and strong junior, ok weak midle, but not senior.
I'm already a senior then !!
I do all these things & I'm still a junior ;-)
I think all of these tips are still very basic. What really sets apart a senior dev is decoupling as much as possible. Most of the code I write could be improved by reducing coupling.
What are your thoughts on chat GPT regarding code optimization? Do you feel Junior developers can reach senior level code by merely dumping their code into chat gpt and providing instructions to have them optimized?
Very helpful tips 🤘🏻
Glad you think so!
Make a video on clean code and good coding practices.
I have one already!
@Tech With Tim ok i will check it out
valuable content!
Comments are very important. Sure you can see what you are doing, but two years from now, when you need to update it, you will ask "Why did I do this?" . That's what you need to put in the comments.
I agree but often times you can avoid comments by writing self expressive code
@@TechWithTim I agree.
I think you are both right Tim argues not to have comments saying what you are doing. You are saying to comment code to understand why you did something .
Personally I think code should be self expressive enough to tell the reader what’s going on but the code will never be able to tell the reader why you are doing that. So that’s when you would introduce comments
@@TechWithTim what if I use docstring to explain what my function does is it not also applicable??. i have just started learning object oriented programming. I have been writing my comments like this.
#!/usr/bin/python3
""" this module represents a class square """
class Square:
"""Represents a square class """
def __init__(self, size=0):
"""Initialize data"""
if type(size) != int:
raise TypeError("size must be an integer")
elif size < 0:
raise ValueError("size must be >= 0")
else:
self.__size = size
def area(self):
""" Returns the area of a square """
return (self.__size * self.__size)
Tim has a beard. Now
wow this is super helpful.
Do we get such tips in ProgrammingExpert too?
Yep! It’s just built into the program to write clean code
@@TechWithTim that's quite a nice feature.
However, do we have money back guarantees, for like a month?
you will not beleive mate, one of the guy acting as lead he was like i want more verbose comments.
Hi am abdi from Africa bro I have an idea to application can you help me please 😢
do next video middle vs senior
Great idea!
U are not a senior because u use guard clause or something else.
U become senior because u have years of experience...
The profession of programmer is not just about code and how u write it...
And read the book "clean code" should be the first step for a junior programmer
Very helpful and informative THANKS😘
Is it safe to assume these tips apply to any language? I'm currently going through a coding bootcamp & we're starting to get into Javascript.
Pretty much, yes!
helpfull
Yay
Senior devs right-justify their IDEs
You should be writing comments on the blocks of code... anything functional IMO. Why read 5+ lines when you should be able to read 1 comment. I think you made every CS teacher cry bro.
All arbitrary and biased.
I cringe when I hear “clean code” or “coding standards”, as it becomes like gospel. And often readability is a domain trade. If I am asked to maintain for example a fluid simulation system, I’m at a loss! Not matter “how clean” the code is because I don’t have that domain knowledge. Give me any embedded or system code, I will find my way around because I have that domain knowledge. Even if it’s not coded the way I do (and that’s perfectly fine, each has their own dialect and signature) I’ll find me way.
Clean code and “coding standards “ Taylor to the lowest common denominator in a team.
And often clean code with all its a abstraction is slow code - I guess whenever you use Python, JS or TS that performance and memory usage is not at the front of your mind, but it is for me.
And when I can save 20% of cpu usage, like this morning in a rust project, by having to make it less nice looking. I’d happily do that!
13:40 blew my mind. Thanks for great video
Thanks for the great comment! ;)