Coding and Cooking - MPJ's Musings - Fun Fun Function

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • 💖 Support the show by becoming a Patreon
    / funfunfunction
    I love cooking and I like programming, and I often feel that cooking teaches me to be better programmer. And one thing that I’ve learned recently is the value of knowing how to use a chefs knife.
    🔗 Article about the Microsoft Excel team
    blog.codinghor...
    🔗 Worst 'Hello World' ever video
    • Worst 'Hello World' ev...
    🔗 Dependency injection video
    • Dependency Injection b...
    🔗 mpj on Twitter
    / mpjme
    🔗The camera I use
    amzn.to/2kwlpAD
    🔗 The microphone and sound recorder I use
    amzn.to/2kwli8e
    amzn.to/2lcVSfd
    🔗 The lights I use
    amzn.to/2ld8jrX

КОМЕНТАРІ • 110

  • @testowykana1763
    @testowykana1763 7 років тому +39

    Thanks for this episode. According to what you've said, there IS a limited space like in the kitchen, it's not the hardware though - it's our mental capacity, where we have to control and memorise an exponentially growing amount of elements when we introduce new tools/frameworks etc. to our project?

    • @funfunfunction
      @funfunfunction  7 років тому +9

      Great point that the upper limit is mental capacity!

    • @testowykana1763
      @testowykana1763 7 років тому +7

      Thanks for this show, this is my favourite programming channel.
      What makes it great is your insights on programming, some are personal, which make them more convincing and more interesting.
      You often show a different perspective on some problems by using "real life" analogies, which makes the topic you're talking about easier to understand.
      I also really like the balance of the Musings/typical programming tutorials.
      And on top of that, perfect amount of humour, which I also really appreciate, because - let's admit - typical programming tutorials can be a bit "dry", full of technical info, thus sometimes harder to follow without yawning :)
      Thanks again!

  • @immerification
    @immerification 7 років тому +2

    Great topic! Nowadays a lot of team's/individuals forget about this problem, introducing new DIs, the increase of the cost is the price for the software maintenance, e.g. if a new member comes to the project and he meets unorthodox programming/testing approach, which is good is just in the scope of the current team and the time frame but differ from the standards and not really valuable eventually. Selecting and discussing new dependencies should be like an interview for a new employee - totally transparent and considering pros and cons.

  • @gilmoretj
    @gilmoretj 7 років тому +3

    Your knife analogy has something in common with the economics of your paper signs. Being a simple tool it can be applied to a myriad of uses, not just chopping onions. This makes it a very cost effective tool, just like your signs go to inform many many viewers (pennies per viewer.) Learning the basic skills well is never wasted time.
    Also, another downside to the indiscriminate pulling in of dependencies is the multi-dependency issue. Pull in one and it pulls in a few more and before too long your banana has pulled in the gorilla and the rest of the jungle (to mix my metaphors.) The number of times I thought I was using a simple self-contained library only to find out it had pulled in yet another copy of jQuery I did not want.

  • @rickmedina4082
    @rickmedina4082 7 років тому +2

    "Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function." John Carmack

    • @GeorgeTsiros
      @GeorgeTsiros 5 років тому

      "the right function at the right place can make all the difference in the world" - not G-man

  • @rmaturi
    @rmaturi 7 років тому

    One of the most important costs for me is that sometimes those DIs need to be downloaded by our users. And that translates directly to money/time have to spend loading our app/site. In a lot of countries, each dependency is a huge investment for some.
    Great video MPJ! Loved the analogy. Thanks a lot.

  • @a12356ut
    @a12356ut 7 років тому

    To say that this channel has changed the way I programme is an understatement. love your work ! keep up with the great work. cheers from Sri Lanka.

  • @PowerUp2Sleep
    @PowerUp2Sleep 7 років тому

    I feel like this is a lesson more programmers need to know! Been on plenty of projects where any third party library that did the job even a small job was accepted instantly. It's foolish to say that a project should be devoid of dependencies, but (for example) bringing one in to make a 5 line function 2 lines is over kill.

  • @MaxPronko
    @MaxPronko 7 років тому +1

    Hi MPJ, thanks for this video, very valuable for me. It makes me think about libraries and dependencies i am using in my modules. For example, i have Magento 2 module where i have dependency ob Magento\Framework (this is must have dependency for all modules) and additionally i also have dependency on Psr\Logger library where in 3 or 4 places I use 1 line of code, most important it is also same line like logger->critical() to write exception trace into a file. Most interesting part here is Magento\Framework also depends and implements interface from Psr\Logger library. Time for me to have closet look inside my dependencies. Thanks for the video.

  • @shitijgupta29
    @shitijgupta29 7 років тому

    There are a few other hidden costs
    1. Performance penalty, bugs and leaks if dependency is poorly implemented.
    2. Version changes compat issues
    3. Inability to extend, customize and overwrite certain parts according to your need
    4. Debugging is relatively hard

  • @NVRMTmotion
    @NVRMTmotion 7 років тому +3

    You're an undersubscribed genius!

  • @christopherhumphrey
    @christopherhumphrey 7 років тому

    As a chef changing careers into OpenStack engineering. I have to say there's a LOT of parallels between programming and cooking..The coolest is that with programming you almost have no limit to resources. You can create new resources and tools. With cooking you are limited by resources that are available & limited by the tools in the kitchen.

  • @MichielHuygen
    @MichielHuygen 7 років тому

    I completely agree. "being sceptical of depedencies" is to me the equivalent of the decades old concept of low coupling, which i feel is still underappreciated

  • @sebastianscholten7304
    @sebastianscholten7304 7 років тому +12

    I already miss the plant

  • @joetheturtle
    @joetheturtle 7 років тому +1

    Just made my first filet mignon this weekend. Good to see other programmers also like cooking!

  • @iLoveTurtlesHaha
    @iLoveTurtlesHaha 7 років тому

    aww, as a chef I chuckled at you buying a knife on Kickstarter. I just use my cheap kiwi knife everyday because it's easy on my hand and that's all that matters.

  • @GodOfMacro
    @GodOfMacro 7 років тому

    Other cost of dependecies : You either have to read the whole code or trust it.
    When I read the code of a dependency, I often end up not using it.
    Not because it's bad but because I rarely use 100% of the features of a library and since i read the code I now know how I could easly re-implement just the ones I need.
    In case of javascript it also have a cost in the total weight of your application and our dead code elimination isn't that good in JS so some obscure features of a library might represent most of your total application, and you don't even use that part.
    I think spending all your time learning how to use library to avoid recoding anything yourself is also one of the big reasons behind JS fatigue.
    I recode most of my stuff and it's not a great solution either, but coding is always so much fun this way that I won't complain.

  • @ryanbach937
    @ryanbach937 7 років тому

    There's a really important lesson in this video for novice developers pertaining to learning the basics, rather than using dependencies because it's the easiest "solution" at that given moment.
    The web is flooded with Libraries and Frameworks sucking beginners into their syntax and architecture without them understanding what's going on under the hood. Those who fall victim will ultimately learn vanilla JS by debugging, rather than starting from the base. (which is an extremely inefficient way to learn a subject's fundamentals and slows down growth)

  • @Fawcs
    @Fawcs 7 років тому

    These last episodes have been great for me. I work with ABAP(A proprietary language used in SAP ERP) and there's a lot of struggle in our community with using OOP and even more with OOP concepts. People simply don't use it even if the syntax was introduced 16 years ago in ABAP.
    We also don't install "libraries" since a lot of the code is done directly on the application server, the consequence of this is we don't have a lot of open source projects and we don't have a lot of frameworks(except those provided by SAP itself) and right now i'm trying to write an IOC Container to see if it's worth it, but i'm struggling to see some use and thinking that maybe we should stick to poor man's DI in this language

  • @alengm
    @alengm 7 років тому

    I love your "I release these every Monday morning" accent.

  • @fernandocanizo8267
    @fernandocanizo8267 7 років тому

    Ah, you're so devious! Now your "Worst Hello World" video acquired a new meaning for me. I take back what I said there then.

  • @adiulici
    @adiulici 7 років тому

    One of the costs I had to deal with recently by using a dependency was code size, which in end turned into performance. Basically I was using a dependency which added a lot of code to my final bundle sent to the browser and a lot of it was not needed for my specific use case. I ended up rewriting the use cases I needed from the library and reduced the code a lot (I know, sometimes that's not possible, but it was in this case).

  • @thereactionary8115
    @thereactionary8115 7 років тому

    Great episode, I just completed writing a blog post last night which I'm going to be publishing next week which raises pretty close to all the exact same points as the ones raised in this video! Right down to the examples of jQuery and DI, I couldn't believe it. I'm glad to see that my mind and the mind of the great MPJ are so closely tuned :D

    • @PrinceOfDarkness0991
      @PrinceOfDarkness0991 7 років тому

      The Reactionary I'll just leave this comment here to get notified when you publish your blog post (please let me know when you do).

    • @thereactionary8115
      @thereactionary8115 7 років тому

      Whilst I'm glad I've piqued your interest, Mehdi, it wasn't my intent to advertising my work on someone else's channel and I'm kind of uncomfortable using this video as an alert for when my post goes live. If you get me on Twitter @reactionaryjs I can drop you a line there ;)

  • @fraklopez9521
    @fraklopez9521 7 років тому

    To add on to your point about having to get up to speed on a tool.
    What if you come into the kitchen and there are tools with overlapping functionality, which do you use? What if there are multiple people in the kitchen? Some will use one of the tools while others will use others.
    In the kitchen this matters less so, but in a code base, this is very much akin to not having a consistent style. When one dev is writing vanilla JS and another is using some tool etc within the same code base. It can be confusing.
    As always, great video!

  • @dem8568
    @dem8568 7 років тому

    Your show is really excellent. It does a thing better than making me learn something: it makes me want to learn more. Thanks for sharing. Just want to throw that out there.

  • @dariocopia
    @dariocopia 7 років тому +1

    Hi MPJ! I have been a chef for very long time. I love cook, I like programming and enjoy your videos tremendously. I do, as you mention, approach programming and cooking the same way. One example: in the kitchen I do not use nothing other than plain ingredients to produce everything I need to assemble my final dishes. In programming I do the same, in JS, for instance, my only tools are the language itself and a database. Im ridiculously skeptical about those culinary semi-finished products the same way I am with frameworks, libs and tools. Now... how wrong is that?
    Thank you very much for your videos

    • @iLoveTurtlesHaha
      @iLoveTurtlesHaha 7 років тому

      Dario Copia ... Shout out to another fellow chef and programmer. 🙌

  • @joel_ricci
    @joel_ricci 7 років тому +2

    Love these meta programming videos. Reminds me of your tech debt video which was also great.

  • @_-_-_-_
    @_-_-_-_ 7 років тому

    +funfunfunction You might like this French cooking term: Mise en place
    It's something I think about occasionally. Here's the wikipedia article link in case you want to read about it: en.wikipedia.org/wiki/Mise_en_place

  • @crysknife007
    @crysknife007 7 років тому

    Great video, really came across well to me since I love cooking too.

  • @damuz_yt
    @damuz_yt 7 років тому

    Damn you are good at generalizing programming ideas into everyday stuff

  • @Tapecutter59
    @Tapecutter59 7 років тому

    Moral of the story - A chef's knife is easier to keep clean than a cupboard full of gadgets.

  • @PapaLazarou19
    @PapaLazarou19 7 років тому

    I get what you're saying, but what do you think about this: sometimes I use an additional library and consider its complexity beneficial because it forces me to think/approach the issue in a previously-unknown-to-me systematic way. You often use these kind of libraries with faith that the author knows better about the domain issue. I feel that when you make something simple yourself it risks snowballing into something inconsistent, or you risk not doing a very good job. I guess when you know the ins and outs of a given library, you can make a deterministic decision about when to use it, at this point though, maybe this decision becomes trivial? I'm not sure.

  • @emirk22
    @emirk22 7 років тому

    Great! I didn't know about onion choppers or dependency injection frameworks. I would definitely try them both. I'm getting one onion chopper for white onions and another for the other kinds. I think they even have a model that comes with a free dependency injection framework Thanks for the tips! xD

  • @Jarmister
    @Jarmister 7 років тому +1

    I just cooked my best brekfest ever before your wideo waiting for I.T class on college

  • @clyde34
    @clyde34 7 років тому

    I'd disagree on the "would you spend $1000 on it" approach. The cost of a library depends on the language you use. I have a Rust library where I depend on a byteorder library: it literally consists of ~20 methods that are 5 lines long, all of them take your numeric data and read from/write to a stream in little/big endian. If that was C, or vanilla front end JS, I'd just copy/paste a code snippet, but great package management and a language with amazing library handling gave me the luxury of not caring.
    I think you need a knife rack :)

  • @yasaamoin4882
    @yasaamoin4882 7 років тому

    absolutely loved the way you ended this vlog .And yes thanks for the great information

  • @seannewell397
    @seannewell397 7 років тому

    I love this, and as I was thinking of my own programming practices, I feel like *lodash* (lodash.com/) is an interesting case. Sometimes I'm using a lot of performance-reliant front end (or back end w/ nodejs) code that needs to pump through arrays like a hot knife through butter.
    But other times... I just *feel* like I need a fast map/foreach function, and lodash is almost like a *comfort tool* - like the onion cutter. Rather than pulling in lodash, maybe a dumb implementation in a few lines with vanilla JS would be better (or the browser's default would suffice - at work we're using JScript, which is basically ECMAScript 3, so we don't have native map/reduce).
    In that JScript project at work we did just that, we just created our own ArrayExtensions file, and added what we needed instead of pulling in all of lodash.

  • @niclaflamme1106
    @niclaflamme1106 7 років тому +3

    So...
    Did you throw out the onion cutter ?

  • @tomasztucholski2191
    @tomasztucholski2191 7 років тому +1

    It looks like google didn't choose or insert anything like it usually does.
    Also why would you dye your hair? :P

  • @Jack-gu4fc
    @Jack-gu4fc 7 років тому +3

    There's a great video on Alton Brown hating on unitaskers like that onion chopper

    • @ociemitchell
      @ociemitchell 7 років тому +3

      Alton Brown + MPJ cooking video. That would be awesome.

  • @FeD135
    @FeD135 7 років тому

    Finally! A good programming analogy. Well done!

  • @NatsukosKitchen
    @NatsukosKitchen 7 років тому

    Thanks for these videos, watching from Tokyo, learning Javascript is a lot of fun with funfunfunction!! How's the new place?

  • @josslyn333
    @josslyn333 7 років тому

    New hair, new apartment. I'm having troubles coping.

  • @PoushyMDatta
    @PoushyMDatta 7 років тому

    Absolutely 100% agree...Thank u! I tried that onion cutter... mine did not work well ;)

  • @JamesDHarrington
    @JamesDHarrington 7 років тому

    Good as always! Give us a tour of the new place soon! XD

  • @zoxomonocovo
    @zoxomonocovo 7 років тому +3

    What's with the music? I feel like your suddenly going to burst out crying whilst talking about adding libraries to your project lol

    • @funfunfunction
      @funfunfunction  7 років тому +8

      +Thermo Link haha, yeah, I'm still learning about music editing, takes a lot of practice. Expect dumb crap for at least a few more months. ;)

  • @MaxArt2501
    @MaxArt2501 7 років тому

    Hey Mattias, what's your take on all those micro-packages that proliferated on npm? For example: www.npmjs.com/package/negative-zero

  • @MarcelRobitaille
    @MarcelRobitaille 7 років тому

    Does this apply to dependency we add ourselves? For example, is it bad to write a helper function if I have the same few lines of code a few times? Where do you draw the line?

  • @jasontenbrink6201
    @jasontenbrink6201 7 років тому

    Great video, as always. How would you classify lodash? A lot of what's in lodash you could write yourself with just a few lines of code.

  • @cheeseburger1884
    @cheeseburger1884 7 років тому

    I just realized your thumbnail for this video spells COOCKING

  • @rogerheathcote3062
    @rogerheathcote3062 7 років тому

    Hi MPJ, hope the unpacking is going well! Don't suppose you would consider losing the background sound beds? They don't add much and they really get on my wick (I like to practice my guitar while I watch coding videos!)

    • @rogerheathcote3062
      @rogerheathcote3062 7 років тому

      To clarify, I just mean the sound beds in the middle, the ones at the start and end are okay, gives me a minute to tune up!

  • @kesuskim6072
    @kesuskim6072 7 років тому

    Nice new room MPJ!

  • @omarchehab98
    @omarchehab98 7 років тому +1

    you should maintain your most starred repo :)

  • @user-fh4xo2pc2d
    @user-fh4xo2pc2d 7 років тому

    Thanks always! I want to know your views on web assembly:)

  • @impankratov
    @impankratov 7 років тому

    Definitely, on the frontend the space is limited. But on the backend it's not so limited. Still, the great idea in general.

    • @funfunfunction
      @funfunfunction  7 років тому +1

      +Иван Панкратов to clarify, in not at all referring to storage or bandwidth here - I'm referring to cognitive space. As in the wealth of things a new developer would need to learn in order to work in your project.

    • @impankratov
      @impankratov 7 років тому

      funfunfunction yep, that's why I ended it with "great in general". I'm probably need to wrote this in a more eloquent way. Anyway, thanks for a reply, that was totally unexpected.

  • @EstevanMaito
    @EstevanMaito 7 років тому

    Great content as always! And it could be greater if the music volume didn't distract me! Please, consider testing and reducing the background music volume to < 10. I did this in some of my recent videos (you can take a look at this one, which music starts around 0:10 ua-cam.com/video/mBXRTvw58Ho/v-deo.html) after realising that it was bothering even in the video editing (and people complained, too).

  • @muxahuk1214
    @muxahuk1214 7 років тому

    Hey, may be i missed something. In this video you where talking about "dependency injection frameworks", but on the video you rely on, you where talking only about "what is, how to use" no frameworks topic where raiced... Have i missed something or i understood it wrongly ?

    • @funfunfunction
      @funfunfunction  7 років тому

      +Михаил Семёнов yes, i do not use them in the dep injection video. I refer to two videos, the second one is a satire where I use it as a joke.

  • @azucenazhou
    @azucenazhou 7 років тому

    Thanks! I really liked this analogy :)

  • @RomualdoCosta
    @RomualdoCosta 7 років тому +2

    eu sold my onion slicer after this video.

  • @azertyQ
    @azertyQ 7 років тому

    bad metaphor... slap chop can do lots, e.g nuts
    :p
    otherwise, great advice as usual :D

  • @DavidWMiller
    @DavidWMiller 7 років тому

    "Cupboard" is generally pronounced with a silent p.

  • @parki5074
    @parki5074 7 років тому

    I am Gordon Ramsay and this is my masterclass.

  • @chairmanmeow4744
    @chairmanmeow4744 7 років тому

    What is the name of the marimba song?

  • @bloodninja192
    @bloodninja192 7 років тому

    Great episode cheers for making this excellent content

  • @HumanoidTyphoon91
    @HumanoidTyphoon91 7 років тому

    My key though that I'll take away: I need an onion cutter in my kitchen :D

  • @joemesserman4278
    @joemesserman4278 7 років тому

    is 'cooking' intentionally misspelled in the video thumbnail?

  • @huckcarignan820
    @huckcarignan820 7 років тому

    Did you get your knife from the KNASA kickstarter project?

    • @funfunfunction
      @funfunfunction  7 років тому

      +Huck Carignan no, it's a misen

    • @huckcarignan820
      @huckcarignan820 7 років тому

      If you could forward the link to the correct method for using a knife, this cook/developer would really appreciate it :)

  • @philippkovac9275
    @philippkovac9275 7 років тому

    hey can anybody tell me which episode mpj is talking about this dragon events with different values? he is trying to access the array wit a filter function and to add all values together.
    I even took a screenshot of the code but of course I forgot the episodes title. I really hope somebody can help me out here.

  • @bsops
    @bsops 7 років тому

    Heh, sometimes I see, that a task requires few single file of code, but it's faster to get mico library like github.com/sindresorhus/promise-fun#packages

  • @greob
    @greob 7 років тому

    Cool hair style!

  • @ViceSyndicate
    @ViceSyndicate 7 років тому

    Best Ending.

  • @OaxoaBlog
    @OaxoaBlog 7 років тому

    Best video ever. Thumbs up

  • @moistbrownypoints
    @moistbrownypoints 7 років тому

    There is no video at the end.

    • @funfunfunction
      @funfunfunction  7 років тому

      thanks, fixed! I keep forgetting :(

    • @moistbrownypoints
      @moistbrownypoints 7 років тому +2

      Here is an idea. Do a video on checklists. The medical industry created a surgical check list and they borrowed it from the airline industry. It was to avoid easily avoidable things.

  • @GeorgeTsiros
    @GeorgeTsiros 5 років тому

    i don't know you, i don't know how old you are, which languages you know, which ones you like, what experience you have, etc etc etc. The fact that you think this way lets me trust your coding skills

  • @s42s42s
    @s42s42s 7 років тому

    Nice knife!

  • @miguelperezpal
    @miguelperezpal 7 років тому

    Loved the vid ;D

  • @ymer92
    @ymer92 7 років тому

    0:50 I disagree, it's Slap Chop. enjoy ua-cam.com/video/b86SOHZ0nIA/v-deo.html

  • @ehza
    @ehza 7 років тому

    Simplicity is hard

  • @doit4941
    @doit4941 7 років тому

    :D good idea

  • @brisketbaron
    @brisketbaron 7 років тому

    That was some pretty covert click bait mate. Cheers : P

  • @DSSPOA
    @DSSPOA 7 років тому

    We should exchange some food recipes =)

  • @jmcaazura
    @jmcaazura 7 років тому +1

    1 like for the knife. :D

  • @Sarmadfarhankhan
    @Sarmadfarhankhan 7 років тому

    lol.... programming teaches me how to be a good cook

  • @gregg4
    @gregg4 7 років тому +2

    Your thumbnail says "coding and coocking". I know English is not your native language.
    I see you wrote it correctly in the title. I feel I need to point out that "cock" is a slang word for "penis". There is certainly potential to have your video misunderstood. Also, the facial expression you have in that thumbnail doesn't help. It might be a good idea to change the thumbnail too, just to be safe.
    Otherwise I enjoy your videos. You are like my Monday morning coffee!

  • @rickdtrick
    @rickdtrick 7 років тому

    yust!

    • @funfunfunction
      @funfunfunction  7 років тому +7

      yust do it

    • @rickdtrick
      @rickdtrick 7 років тому

      awesome vid as always! and yes, ill yust do it! :D

  • @jnfsmile
    @jnfsmile 7 років тому

    Google machine fail again :)