Showing posts with label room area. Show all posts
Showing posts with label room area. Show all posts

Sunday, March 10, 2019

Exercises for Programmers: 57 Challenges to Develop Your Coding Skills - Chapter 3, Paint a Room - L-Shaped

Here it gets a bit more interesting...the goal is L-shaped.  I should have let people pick the kind of room and used one app.  That's not a difficult mashup.




This time the challenge was also to make it accessible via mobile.  The nature of Vue is that it works on mobile so I did.....nothing.  That's not entirely true, I added /embedded/result to the URL to make it show on the screen.

https://jsfiddle.net/NodToNothing/7jasm205/embedded/result

So here are three screens showing the fiddle working on my mobile phone.  Reactive changes working as expected.



And some code:

Exercises for Programmers: 57 Challenges to Develop Your Coding Skills - Chapter 3, Paint a Room - Circle

Variation #2....do a circular room.  I find that to be less about coding and more about reminding myself of basic geometry.  It's less code than the square room in some respects.

Fiddle: https://jsfiddle.net/NodToNothing/7buham4g/
All Fiddles: https://jsfiddle.net/user/NodToNothing/fiddles/


JS Fiddle Code:

Exercises for Programmers: 57 Challenges to Develop Your Coding Skills - Chapter 3, Paint a Room - Square

Room area....did I already do  a room area/paint calculator?  I did...I did that room calculator.  This one is for finding the amount of paint.  So it's a bit of a mash up of the last exercise (pizzas) with a Math.ceil() and the area calculator.  This first swipe took moments.


The Code:

Thursday, February 21, 2019

Exercises for Programmers: 57 Challenges to Develop Your Coding Skills - Chapter 3, Room Area

Chapter 3 be all about da math!

Exercise one (or 7, depending on where you start) is calculate the area of a room, with challenges related to using a UI, validating the numbers, and offering meters and feet.  I cheated and did both meters and feet as separate UI bits rather than a drop down because I'm lazy.  I get the drop down.

This does give me an interesting idea...something to ideate on myself.

Here's the Fiddle: https://jsfiddle.net/NodToNothing/uas3foex/23/

The output....


And the code...