3 Tips To Write Clean Code (from an ex-Google software engineer)

Поделиться
HTML-код
  • Опубликовано: 23 окт 2020
  • Here are 3 tips to write clean, readable, and maintainable code. The examples that I show are written in JavaScript / TypeScript, but they apply to any programming language and to any part of the software development stack.
    AlgoExpert: www.algoexpert.io/clem
    SystemsExpert: www.systemsexpert.io/clem
    My LinkedIn: / clementmihailescu
    My Instagram: / clement_mihailescu
    My Twitter: / clemmihai
    Prepping for coding interviews or systems design interviews? Practice with hundreds of video explanations of popular interview questions and a full-fledged coding workspace on AlgoExpert - www.algoexpert.io - and use the promo code "clem" for a discount on the platform!
  • НаукаНаука

Комментарии • 508

  • @clem
    @clem  3 года назад +249

    So who's gonna join me in cleansing their code of its filth?

    • @Dot_UwU
      @Dot_UwU 3 года назад +2

      probably not me
      im too lazy :D

    • @ashishmadhu7829
      @ashishmadhu7829 3 года назад

      🙌

    • @NathanHedglin
      @NathanHedglin 3 года назад +11

      rm -r /my-code . Done it’s cleansed !

    • @FatherPhi
      @FatherPhi 3 года назад +1

      You always bring the value, the mvp

    • @jaredbowen827
      @jaredbowen827 3 года назад

      This should help.
      Simplify your code. Don't do, x=1+1+1, just do x=3. This saves on memory, time , and it's easier to read. In this very basic example you save about 57% of memory that you would have used.

  • @sangilyun234
    @sangilyun234 3 года назад +566

    1. Always name your properties or variables in such a way that leaves absolutely no room for confusion/misunderstanding/ambiguity
    2. Always capture a complicated piece of logic in a very descriptive, self-reading variable.
    3. Avoid double negative (`const isNotBlocked = false` --> `const isBlocked = true`)

    • @fanyinU
      @fanyinU 3 года назад +59

      Thank you for saving me 17 min of my life.

    • @FahmiEshaq
      @FahmiEshaq 3 года назад +22

      @@fanyinU Still worth watching the video. He provides thorough relatable examples

    • @rjose705
      @rjose705 3 года назад +4

      @@fanyinU u should watch still

    • @anarkafkas2588
      @anarkafkas2588 3 года назад +11

      ​@@rjose705 I don't think you should watch it actually. Those 3 points cover everything in the video, which is aimed at novice programmers IMO and accounts for less than 5% of what it actually takes to produce clean code.

    • @exceedaccel5019
      @exceedaccel5019 3 года назад +5

      Thanks your explanation is more short and clean rather than his spaghetti explanation

  • @himanshuraj1874
    @himanshuraj1874 3 года назад +265

    Clean code series idea: Would be really great if you'd do a video on how to use OOP concepts correctly or more efficiently.

  • @Raharth
    @Raharth Год назад +17

    Another principle I try to follow:
    Whenever you have a chunk of code that logically belongs together, make a function out of it, even if it is not used anywhere else. It makes it much easier to read code and find the section that might cause errors.

  • @aum6032
    @aum6032 3 года назад +30

    The tip I would like to add is
    "Don't get obsessed about premature abstractions, sometimes let there be two are more functions that look similar, dont generalize them into a single function"

    • @13TrafalgarLaw
      @13TrafalgarLaw 3 года назад +3

      do not split everything to tiny piece too.

    • @llothar68
      @llothar68 5 месяцев назад

      Amen. Especially don't add abstractions when the code is very easy and straightforward and would save you just a few hundert lines.

  • @adamsilber-gniady6326
    @adamsilber-gniady6326 3 года назад +2

    I have to say i am impressed by the simplicity of your explanation of this - most often - fuzzy seeming concept. I am feeling like the one thing i have to understand and to put a punchline in my head: make your code readable to a human that does not think like a programmer. That makes life easier for a programmer. Great stuff!

  • @brenowschneider
    @brenowschneider 2 года назад +14

    Very interesting approach on how to write clean code. I really believe that the main key to write clean code is to always think on other developers. The quicker your team mate understands your code, the better (or cleaner) it is.

  • @MaxxD17
    @MaxxD17 2 года назад +1

    this video single-handedly helped me SOOO much more than the hours of coding videos I have watched. Thank you.

  • @sunnyshang4350
    @sunnyshang4350 3 года назад +3

    I love these tips. Clement can catch things that is so true but rarely talked about. This is true in all of your videos, and this is why you are so awesome

  • @robertoa.tarazona2708
    @robertoa.tarazona2708 3 года назад +1

    I'm still new to coding and these tips make a lot of sense. Thanks a lot man for your help 👍

  • @prakarshparashar
    @prakarshparashar 3 года назад +3

    The way you described all the tips with examples was greatl Love your content!

  • @RideTheTeacups
    @RideTheTeacups 3 года назад +1

    Really enjoyed this one. Doing this caused a good discussion on one of my recent code reviews a month or two ago. Thanks!

  • @vaidhyanathansm7625
    @vaidhyanathansm7625 3 года назад +2

    Thanks for this amazing video Clem! We would definitely want a series on this !

  • @chunkaifu1284
    @chunkaifu1284 3 года назад +1

    Please make more these type of vids, it looks pure gold to me

  • @subz424
    @subz424 3 года назад +3

    I'd love more of these types of videos too 🙂. Code structure/organization, clean code.. best practices in general for the individual coder and for a coder on a team. One thing I actually don't ever see, though I'm yet to experience (yet hear is important), is knowing what sorts of issues come up in teams and how to best deal with them. Maybe disagreements on deadlines? Coding styles (if the company doesn't have an agreed style already)? I dunno.

  • @trashmoneyyt
    @trashmoneyyt 2 года назад +1

    I have taken this advice like four times and always revert back to complex code blocks because I want to save lines. This is so important. Just reading over my code from a few weeks ago it takes time for me to get back into my state of mind when I was writing it. Sometimes I look over my code and just trust that I knew what I was doing when I wrote it. I need to make a sign above my monitor telling me to write it cleaner. >.>

  • @petesteele5266
    @petesteele5266 3 года назад

    Make sense in all what you said. Hopefully more programmers will know this coding and evaluate their way of coding. Thanks for the vid!

  • @etipeti555
    @etipeti555 24 дня назад

    Thank you so much, I've started a degree in multimedia engineering and I've had trouble with the time I had to spend reading several times the code I've written the previous days so that I could continue coding. I know this will help me a lot to reduce that time spent

  • @phongtranquoc7557
    @phongtranquoc7557 Год назад +1

    This is so important even when you are new you still need to learn this i think this is important more than making your code works. Because if you understand your code you can actually figure out whats wrong with your code and fix it.

  • @JoxTraex
    @JoxTraex 3 года назад +2

    Such important pieces of advice that I advocate in my codebase as well :) , its not hard to write clean code, it just takes some clear thought on what exactly you are trying to say. Never allow ambiguity into the code or if its needed, then try to simplify it was best as you can. Putting comments everywhere. Also one thing that Clem should add is add comments, even oneline comments to explain things, It helps readability significantly! You should relegate LARGE code block comments when you have complex logic that needs specific calling out. Good variable names are a must in all codebases too, avoid that double negative.

  • @harispapadopoulos4295
    @harispapadopoulos4295 3 года назад +10

    17 min video from clement POG
    Edit: Hell yeah, we want more of these vids

  • @sunraiii
    @sunraiii Год назад

    Stumbled across your channel and I love the concise and descriptive way you explain things. I was also surprised to find out that, like me, you are of Romanian descent! Multumesc mult pentru ajutor :)

  • @whatsinaname8450
    @whatsinaname8450 3 года назад

    That's awesome. It would be definitely great, if we can witness some more of such instances of clean code. Thanks for putting this up

  • @hanac5586
    @hanac5586 2 года назад +1

    Great examples, clear explanation !
    I'm relieved using several variables are recommended (I wasn't sure about it before), that should come very intuitively.
    But I'm also laughing because "you wouldn't know what this means!" when you read a lot of messy beginner code in group projects you start to get used to it hahah

  • @codispatch6869
    @codispatch6869 3 года назад +1

    Hi @clement mihailescu, this video was good, thanks for sharing. One improvement on tip number 2 - it's good put showcancelmeetingbutton logic in seperate function and call it from main function, so that it can be unit tested and it looks more clean 😉

  • @dchroninger
    @dchroninger 3 года назад +1

    I just wanted to say I subscribed immediately after the "WTF does that mean?!?" part. lmfao. Great Content man. Can't wait to watch more.

  • @AmanzeStudios
    @AmanzeStudios 3 года назад +9

    For example 2, I would abstract the logic into a function. I really like the idea breaking the Boolean expression into parts and assigning those parts to descriptive variables

  • @explore-learn-share6937
    @explore-learn-share6937 2 года назад

    Simply outstanding. Understood every bit of the explanation. Really clean code is very important. Thank you for such informative videos

  • @leonardolombardi3968
    @leonardolombardi3968 3 года назад

    AMAZING video! You should definitely do a series on clean code!!! Not easy to find good quality content about this online

    • @leonardolombardi3968
      @leonardolombardi3968 3 года назад

      I'm currently reading Clean Code in Javascript. Tried to read Uncle Bob's books, but java made it a little bit hard to follow

  • @muneebkhan313313
    @muneebkhan313313 3 года назад

    great tips. now i am gonna apply these tips in my every projects. thank u mate.

  • @artemiocabrillosjr.244
    @artemiocabrillosjr.244 3 года назад

    Thank you Clem. Keep making these videos and educate more programmers. Ciao!

  • @revillsimon
    @revillsimon 3 года назад +1

    Thanks - really enjoyed this. I’ve seen that double negative stuff before and that made me laugh 😂. Here’s a tip I like. Use a declarative style. Instead of telling the computer exactly what to do, describe what you want as a result instead. A good example is to map over an array, instead of using a loop to iterate over it’s contents. The abstraction of the process makes the code easier to read and the meaning and intention of the code is much clearer to whoever reads it in future.

    • @dgameboy101b
      @dgameboy101b 2 года назад +1

      Yes! I love it when a framework will let me give it just an anonymous function which it applies to everything.

  • @sapi0ra
    @sapi0ra 3 года назад

    Helpful video! For me clean code is:
    1. Easy to read
    2. Easy to understand
    3. Less code - better code

  • @harshmathur9837
    @harshmathur9837 3 года назад +2

    Hello Clement, I love watching your videos and I am inspired by your story. I am Deaf and I am aspiring software engineer because I love coding. I am customer of your product - Algoexpert.io and I have learned some amazing things. It is tough for a Deaf software engineer to get job but I don't let my deafness limits my abilities. And other thing that I would like to ask is to add closed captions so it would be beneficial for me and other deaf people who could be watching your videos. Accessibility is valuable for me in order to gain the information.

    • @dlys6800
      @dlys6800 3 года назад +1

      the captions were recently removed by youtube unfortunately

  • @martinballa3059
    @martinballa3059 3 года назад +7

    nice! Can you make video about how to correctly name variables, constants, functions, classes, files... and what form should they have (capitals, underscores, what to avoid, ...). I know, that some of this things are different based on programming language that you use, but at least some general tips would be rly nice.

  • @mayank_upadhyay_19
    @mayank_upadhyay_19 3 года назад +1

    Please make it a series, it's amazing

  • @staypure7025
    @staypure7025 Год назад

    incredible insight, thank you so much Clément

  • @mrsingh5351
    @mrsingh5351 3 года назад

    Love the clean code videos!
    Please, keep them coming

  • @Pablo.Rodriguez
    @Pablo.Rodriguez 3 года назад

    Dude, that last one. I HAVE SEEN THAT THING HAPPEN SO OFTEN IT DOES NOT SEEM REAL. 10/10 great video.

  • @sanghvian
    @sanghvian 3 года назад

    Amazing video !! Would really like to receive more of these seasoned advice tips !!!

  • @alphacode5
    @alphacode5 3 года назад

    I love these videos with tips about correct use, I want more

  • @ApplicableProgramming
    @ApplicableProgramming 3 года назад +1

    Finaly someone talking about real life applicable tips in a video starting with "x tips to..." :)

  • @RichardBarnet
    @RichardBarnet 3 года назад

    Enjoyed this video immensely, would love to see 3 more! :)

  • @gatomas805
    @gatomas805 3 года назад

    Love this video. Especially 14:05! LOL I must said that many times at code reviews. I kept rewinding.

  • @dvlpr
    @dvlpr 3 года назад +12

    Anyone else check their slack at 10:57 when he got a notification or just me? 😂

    • @changoviejo9575
      @changoviejo9575 3 года назад

      For that moment I thought I still had my job and they were messaging me :-p

  • @geocarvalhont
    @geocarvalhont 2 года назад

    Would be nice to have it as a series, thanks.

  • @NightpireVideos
    @NightpireVideos 3 года назад

    That's really helpful for a beginner like me. Would appreciate more tips like this!

  • @ronnyparedes8582
    @ronnyparedes8582 3 года назад +1

    Loved this video! You could go through different github repos and make a video “Reacting and refactoring unclean code”

  • @rdalago
    @rdalago 2 года назад

    Excellent content! I've been learning a lot from your videos. Thank you so much!

  • @doomguy1496
    @doomguy1496 11 месяцев назад

    Man I did all of this, every single tip you mentioned, in a production code. I am that dumbass bastard. Cant believe I am so called "software engineer". I literally feel dumb and exposed now. Straight to the point man.

  • @matiasfic
    @matiasfic 3 года назад

    Minor tip, since Typescript 3.7 you can replace (!!meeting.permissions && meeting.permissions.canCancel) jwith just !!meeting.permissions?.canCancel. Much cleaner :) Great video!

  • @smashinbedrock4903
    @smashinbedrock4903 2 года назад

    this guy is literally every software engineer and it's beautiful

  • @zhoufang5753
    @zhoufang5753 3 года назад +1

    Great content! I'd love to see that sort of things on AlgoExpert as well. Given a problem, how would you design a solution/UML to solve it. It can really be an open discussion. Of course, this is easier said than done.

  • @josephwong2832
    @josephwong2832 3 года назад

    Great lessons here clem
    This topic always comes up on dev twitter all the time

  • @theshwingbatty
    @theshwingbatty 3 года назад

    Wow, this is fantastic! Thanks Clément!

  • @Brian-vz5et
    @Brian-vz5et 3 года назад

    Let's see more tips on cleaning up code! Great video!

  • @travisc9436
    @travisc9436 3 года назад

    Great video. I do slightly disagree with #3. I think it's "clean" to use isNotBlocked especially if it's used to drive your #2 point and used uniformly within a class or function. However, I think you're totally right that once that usage changes and you start needing to use both positive and negative forms, then it's better to go with isBlocked.

  • @sahil-rv7gc
    @sahil-rv7gc 3 года назад

    Thank you @Clement . This is by far the best video I have seen from you. Can you share books/links where we can learn about all the design patterns/ writing clean code?Thank you.

  • @hashiinngg
    @hashiinngg 3 года назад

    Wow ... Super Duper simple explanation. Loved it man

  • @minaroupolisvlogs6378
    @minaroupolisvlogs6378 3 года назад

    Yo the second tip was dope I am definitely gonna use it in my projects

  • @mohdrasid6737
    @mohdrasid6737 3 года назад

    last one was just amazing 😃.. enjoyed watching video ☺. we wanna more such videos . thank you for making such helpful videos .👍

  • @jonathanshitrit6344
    @jonathanshitrit6344 3 года назад

    Clement this is a great video! Please make more of these :)

  • @arnavsingh0
    @arnavsingh0 3 года назад

    Well, tip 3 was something I had struggled with in recent times while reading codebase.

  • @jordansumitomo2357
    @jordansumitomo2357 3 года назад +65

    How to write clean code ?
    Only one tip : watch uncle bob martin's
    Clean code series.

    • @XDTuber
      @XDTuber 3 года назад +1

      His Minecraft sword lol

    • @jamesevans2507
      @jamesevans2507 3 года назад

      He's too dogmatic. Lots of good stuff but also a lot of weird things like NEVER have a boolean parameter to a method, NEVER have your methods more than 4 lines long. Where I think "fkn relax man".

    • @norgarron3433
      @norgarron3433 3 года назад +2

      @@jamesevans2507 well, boolean as an argument to a function would contradict with his statement that functions should do one thing and one only - with boolean you kinda expect the function do 2 things based on its value. But I agree with you

  • @ganeshchowdhary3024
    @ganeshchowdhary3024 3 года назад

    This is awesome for a beginner Sde like me. Would love to hear more from you like a series. Could you suggest any online resource or book to become a better sde and write better and clean code.

  • @varunupadhyay3836
    @varunupadhyay3836 3 года назад

    Great video. Please do make a series on this.

  • @inaccessiblecardinal9352
    @inaccessiblecardinal9352 2 года назад

    Good stuff. Uncle Bob had a maxim that "a function should represent 1 level of abstraction" and I stress that one at work everyday. It's a little hard to be a purist about that with front end function components (because they are sometimes incapable of "doing only one thing"), but on the backend it's easier to be a purist about it.
    What you end up finding is a lot like example 2-- you find yourself building towers of logic? Break them up, move them to a place for just that logic. Are there conceptually different chunks of that logic? Do it again. Repeat until you can't anymore (without being silly). Write code this way and your towers and rightward-shifting pyramids go away. You get a bunch of little hemmingway sentences.

    • @llothar68
      @llothar68 5 месяцев назад

      Uncle Bob is an Anti-Pattern. I follow John Ousterhouse. Write long code and methods and then abstract them. If you can't handle a 500 line function then your life as programmer failed. The only thing that must be small and good designed is your API.

  • @IvanWooll
    @IvanWooll 3 года назад +1

    Another tip that's worth noting is to avoid things like `data.error.code != 3` (around 13:30). That 3 represents something human readable so put it in a enum, constant or something else that lets the reader know what it means.

  • @pavlg3944
    @pavlg3944 2 года назад

    Great tips, btw just a remark (as i have made this mistake before on a critical PR) :
    - new Date() < new Date(meeting.startTime) isn't the same as !(new Date() > new Date(meeting.startTime)
    - !(new Date() > new Date(meeting.startTime)) is the same as new Date()

  • @subhamshaw1726
    @subhamshaw1726 3 года назад

    amazing video and during example in tip 3, I was like Whaaaat!. Really useful video

  • @miguelconstantino-guzman7957
    @miguelconstantino-guzman7957 Год назад

    According to Clément,
    Good Naming practices
    - Boolean naming practices (isBlocked instead of isNotBlocked)
    - Condensing complex code into a well-defined variable name
    Good naming practices also avoid ambiguity - whether a variable is a string, integer, boolean, etc.

    • @llothar68
      @llothar68 5 месяцев назад

      Make your code as grepable as possible, there are times where your refactoring tools will not save you. Especially when you do C/C++ and have multiple platform parts where no semantic refactoring tools work on the whole code base.

  • @judedavis92
    @judedavis92 Год назад +1

    Great video. As they say, good code uses comments, great code is self-explanatory.

  • @frf20com
    @frf20com 9 месяцев назад

    This is amazing dude and crazy. Thank you so much. Keep up please!

  • @jimbob2629
    @jimbob2629 2 года назад

    I really like that you spent time on number three back on number two I was considering why wouldn't you just say meeting hasn't started instead of has meeting started for your variable and that would have been a double negative!!! Also for #1 I love having a readonly boolean set to if the current date is greater than the expiration so nothing could tamper with that subscription except the date that controls the expiration--love this video!

  • @Asteroid147
    @Asteroid147 3 года назад +1

    Definitely more videos like this! ...in the future maybe even CleanCodeExpert?... :D

  • @rapasebastian5678
    @rapasebastian5678 3 года назад

    Amazing content! Motivated me to have a more productive day!

  • @MichaelYoussry
    @MichaelYoussry 3 года назад

    The negative variable name thing is sometimes necessary in low-level languages like C, because in C it's very easy and efficient to initialize the entire data structure to zeros. So to have the variable's default value be false and yet have a sane meaning, the variable name sometimes needs to be negated. I'm not saying that this is the correct way to do things, especially for modern languages, but I think it's a valid argument.

  • @khalfounmohamedelmehdi4735
    @khalfounmohamedelmehdi4735 3 года назад +1

    I really appreciate the video , it will be great if you do a video about how to architecture your projects , and the steps to do before implementation ^^

  • @jubaidhasanchowdhury9942
    @jubaidhasanchowdhury9942 3 года назад

    Please make this a series. I am good at algorithms. But really suck at this type of things.

  • @jornejongsma
    @jornejongsma 3 года назад +3

    Great video! 2 questions, for maybe a next one: 1. I see you're using interfaces instead of type aliases for the Props of you React component. But I've seen already a few times that someone is saying that you should use a type (now) for that instead of an interface. Thing is that I did not found a good answer/reason for doing that... I just think that an 'interface' expresses the purpose of it better than 'type' does. What's your opinion, is there a clear good answer to this, type vs interface? 2. Again, I saw you're using an enum in this video where I thought a string literal union would have been more helpful?! I just can't find any use for enums, unless when you would need a list of constants that needs to have a strict unchangeable order.

  • @binukumar6270
    @binukumar6270 3 года назад

    it's awesome. please make more clean code tips videos.

  • @Devillman90
    @Devillman90 2 года назад

    I'm so glad i'm doing that without even knowing that is a good practice(it just seems easy to myself) but in your tip 3, I am the same I have a code base that does that alot and every time i'm scratching my head and and saying to myself WTF is that what do they mean and it takes couple of cycles and going up and down though the whole code to understand what is going on. Anyways thanks for sharing that with us! :)

  • @hello.4693
    @hello.4693 8 месяцев назад

    Thank you for the Video, do many Variables slow down the performances?

  • @bryanurizar
    @bryanurizar 3 года назад

    I really loved this. Please do more!

  • @dfhwze
    @dfhwze 3 года назад

    A good default value for any boolean is False, and a good way of avoiding negations in variable names is to use a synonym. Taking these guidelines into consideration, I would prefer either "IsAllowed" (= False) or "IsBlocked" (= False), instead of "IsNotBlocked".

  • @ninjapanda1018
    @ninjapanda1018 Год назад

    I really liked the video, thanks for making this, it helped a lot

  • @B00Mnation
    @B00Mnation 3 года назад

    Make it a Series! The whole world benefits from cleaner code 🙂

  • @salarkazazi7584
    @salarkazazi7584 2 года назад

    Thank you so much, great explaining skill !

  • @otmanm4095
    @otmanm4095 3 года назад

    I really like all your content, thank you to share it!

  • @harcoptoluwap3998
    @harcoptoluwap3998 3 года назад

    Really enjoyed this... thanks Uncle Bob jnr☺️

  • @crystal14w
    @crystal14w 3 года назад +1

    Not to be dramatic but you are a hero 👏 I really like this series! Maybe something with CTE statements 😄

  • @iinnfff
    @iinnfff 9 месяцев назад

    The isBlocked better than isNotBlocked suggestion is debatable IMO. It depends on what your code is doing, and that's because the "!" negation could be easily overlooked and add cognitive overhead especially when the if statement has multple conditions. I totally agree with you that if (!isNotBlocked) is not good all. However, if (isNotBlocked) is a lot easier to read than if(!isBlocked). But that's just my opinion. Great stuff. Keep it up!

  • @SuperWillAC
    @SuperWillAC 3 года назад

    Great content! I would recommend making your videos more dynamic, maybe add some music and/or effects. I think this might help you reach more people

  • @FahmiEshaq
    @FahmiEshaq 3 года назад

    GREAT VIDEO...Valuable lessons... We need part 2 ... Anyone wants part 2 as well? Like

  • @karthikvadlamudi8370
    @karthikvadlamudi8370 3 года назад

    Hey Clem!, can you make a video on how to find the best resources based on the problem statement you're working on. I am new to software development and have only been doing competitive coding so far. It has been really difficult for me to find the proper resources - for integrating Twilio programmable video into a flutter/react native app, for example.

  • @hamadawaled11
    @hamadawaled11 2 года назад

    want more videos like this I love your explanation way and topics❤❤❤❤❤❤

  • @robsonsaito59
    @robsonsaito59 3 года назад

    Great explanation!!! And the funniest part was !isNotBlocked, is blocked or not?!

  • @doaaismael215
    @doaaismael215 8 месяцев назад

    These tips are not picky at all! It is really really important

  • @TheMrFelin
    @TheMrFelin 2 года назад

    Thanks for the good advices, I would like to watch another video like this one. Ps: I hate it when there is a lot of nesting and when people instead of saying if isNull throw and then the rest of the code, they do if !null do stuff else throw and nest it in the same way. In my job I saw a code like this for 700+ lines with more than 50 ifs and in the middle I couldn't even see the code anymore because the nesting moved everything so right that was out of the screen.

  • @koleen3799
    @koleen3799 2 года назад

    You got me on 14:05 Cool video. Hope to see more like this.