menu

Education & Knowledge

If there is one thing worth committing to, it's your education. Whether it's doing well in school, reading a new book, or learning how a language, taking the time to sharpen your noodle is the wisest investment you can make.

27K
Members
88K
Successful Reports
By nature all people are alike, but by education become different
- Author Unknown

Community Journal: Education & Knowledge

  • mrbryantet63 Sep 22, 2018, 9:12 PM
    "Day 23: A beautiful day today for the start of Autumn (RIP Summer). Got a late start this morning and encountered two new challenges as I recorded my video. First, my late start had me contending with the glare of sunlight, which I normally don't deal with early in the morning (lots of shade is an advantage on a bright day, especially early). And second, I had a bit of a breeze to deal with. It wasn't a cold breeze but it did move the branches around a bit and that made the glare a bit unpredictable, as the sunlight kept shifting from minute to minute. One moment I was in shade and all was fine. The next thing I knew I had glare coming at me from the side and it made concentrating on my video a bit tougher. It was hard to focus, and I was concerned that my viewers wouldn't be able to see me very well. I had to do several "takes" to get it right, which actually worked to my advantage because I ended up rehearsing my material several times. By the time I did a decent recording I had a better handle on what I wanted to talk about; I didn't have any memory lapse in the midst of my talk which helped and there was more consistent shade. So everything actually worked out in the end, despite all the challenges. And best of all I was satisfied with things not being perfect. Maybe it is true that when you're not perfect you can relate better to others. I'll keep that lesson in my hip pocket moving forward. It won't stop me from seeking to improve but at least I won't beat myself up if things don't go exactly a certain way. Getting better and better."
    View my Commitment
  • reshreshus Sep 22, 2018, 8:26 PM
    "I don't play Overwatch before 5 pm tomorrow"
    View my Commitment
  • neiltigh Sep 22, 2018, 8:24 PM
    "Reporting success; without real world result. I will give £20 instead to charity."
    View my Commitment
  • joshmrallen Sep 22, 2018, 7:58 PM
    "Watching the solution video and comparing the solution file with mine. for centering, use Center(). In the TextOutput file, you only really need to use Text() with the return statement. But mine worked out too. In all, good first assignment! Continuing on with the next lecture. I'm a little lazy today so I might watch it straight through first, then watch it a second time, stopping at parts that weren't clear. I'll use the bookmark feature the first time through so I know which parts to stop at on the second watch. Now going through it a second time. This is my kind of lecture -- where I can control the lecturer. Going to move the button into its own widget and pass state from the product manager file to the button's widget. Ah, I see -- the setState call is in ProductControl -- we import ProductControl into ProductManager and call an instance of ProductControl inside the build method of ProductManager. I see now. We keep the one Widget stateful and give that Widget access to all the other widgets. "So the product manager is the connecting widget which reaches out to all these widgets that do change or need the state. The question now just is how can I pass the information that this button was pressed in the product control up to the product manager so that they can then set the state in the product manager?" Creating a new method in product_manager to solve this -- using void since we aren't returning anything and using an underscore since we don't want anyone to directly use this class (or import or access any of its methods and properties) except for product manager widget. Now we cut setState from Product Control and add it to the new method in Product Manager, since control widget can't access the state directly, but product manager, being a stateful widget, can. Now we want this new method that we added to product manger, addProduct, to execute whenever we press the button. But the button is in a different widget. What do we do? Ohhh, I see now. In ProductManager, we have addProduct. We call can instance of ProductControl() since we're importing the widget, and then pass addProduct for its argument. Then, I go back to the ProductControl widget and call the constructor, "ProductControl()", and pass a new argument that will receive the value of addProduct evertime the code is executed. We'll use final because we don't want it to be changed unless we recreate the instance again. We'll also use a type -- until now, we've used String mostly, now we're going to use Function, which tells us all that this value is a function. Whoops, almost forgot to use this.addProduct right here. THIS is one of the rare moments apparently in Dart that we get to 'this'. Now, in the onPressed method inside of the build() method of ProductControl, we call addProduct as if it were a function, because once the code runs, it will be a function which ProductManager defines and passes to the constructor and subsequently, the ProductControl widget. I passed a string to the addProducts function inside of the onPressed method in the ProductControl method. This is almost just like passing state between module/files in React/JSX. Awesome!! This is great and very exciting. The next video promises to be very enlightening and discusses the differences between const and final. "
    View my Commitment
Your feedback has been sent. Thank you!