So I pushed really hard and was able to finish the React/Next.JS course and I am actually producing code.  

It is still a bit slow but I am able to make pages, connect my database.

As a next step I am working on role based authorization.  The Next.JS course went over authentication but the authorization was not very detailed.  I found this YouTube video (Next.js Authentication – AuthJS / NextAuth for Role-Based Security) that did a really good breakdown and now I just need to combine the React course that creates a record for users when they authenticate with the Youtube video that show how to authorize pages.

Here is the notes that I have currently from the YouTube video as well as the GitHub repository:
NextJS deployment.docx
https://github.com/gregnstuff/AuthJS-Walkthough

It has been over 6 months since my last post and I can say blogging is hard but progress is just a day at a time… 

I can say that I enjoyed the Node.js, Express, MongoDB & More: The Complete Bootcamp 2024 and learned a lot and felt that I could make a site with the knowledge.  That is were the challenges start coming up.  

The biggest issue that I found was using the pug view engine and when the checkboxes that I had in a form were not being passed to the website as expected.  I found there were some answers but finding the community is not huge.  So I talked to my kids (have three that are in software development, with my daughter just finishing her degree) and decided that with the knowledge that I have that my next step is to learn a skill that is more mainstream and has a larger community.

Right or wrong that is the direction that I am taking now which has lead me to stay on the  Jonas Schmedtmann learning path and move to the React course that I mentioned back in November. Excluding the optional section I am currently just shy of 44% done.

I feel this course is going much faster as it is building on the other courses that I have used in the past and while I have some that say my 4th of July weekend sounds sad, spending 30-50 over the weekend continuing my growth is my idea of a good time 😁.

I am finishing up one of the projects in the course that is used to track cities/countries that you have visited and it provides that to a display map.  This is perfect for the emergency response app that I have been thinking about.  As a high over view:

  • Have a list of people (this will be for my Church congregation)
  • Each time we have a bad storm (such as tornados, which we have had two in the last two years) generate a new check in task
    • Each family needs to be check-up on to complete the list.
    • List be updated with peoples status and needs if any.
  • Group the people
    • Region Leaders
    • Individuals assigned to people to check in on.

This is just one of my ideas that I want to work on as I have to many ideas going through my head that I will love to share here in the future, these are the ones that I can think of currently. Some are side hustles some are just to make my life a little easier, but all are to expand my knowledge of what I am learning:

  • Property Management/Home Maintenance
  • Application, Bug, Customer Sync software
  • Group Emergency Response
  • Group Event reminder (text/email)

So I tried to apply the JavaScript skills that I learned to the Django site and I found it was hard to pass the data from the database to the Javascript and manipulate the data the way that I wanted.  This was a bit discouraging and then work got busy and I took a step away from completing my planned projects.

During my regular job I was running to several case in which I was learning Mongodb and so when I got back in to my project I decided that I would focus on a new course.
Node.js, Express, MongoDB & More: The Complete Bootcamp 2024

This is done by Jonas Schmedtmann who is the same instructor that did the JavaScript course that I finished and so far (beside the refreshers that I need) the course has worked well with that last course.

I have completed about 10 hours of the 40 hours.  I am planning to start the development of my project while going through this course.  Time will tell but I am excited to get back into the programming side with a less restrictive platform before I move into my next course with will be React.

It took me a month and I don’t know how many hours that I spent on the course but I got it done.  I believe that I have a good foundation and now it is time to get it into an actual application and build something.

My first project is my APT (Account Product Tracking) I started using Tailwind to design the site and while I have not gotten to the forms yet I feel like the design for my first project isn’t to bad.

I put this video together to share with my kids.

I am now 70% of the way complete for my JavaScript course.

The thought came to me last night about am I focusing to much on training and not enough on doing?  Of course I am going to finish the course but should I be focusing on my projects as much as my training?

Doing a quick search I found the following:
In general, it is recommended to use both approaches when learning programming. Completing a course can help you build a strong foundation, while working on a project can help you apply the concepts you have learned in a practical way. This can help you become a better programmer and improve your skills over time.

 

 

Nothing like a good vague statement 🙄 to help out.  I think that I will continue on building my foundation and then move to a balanced approach of design and learning.  I already have a new course picked out that I want to start learning next but I don’t want to fall into the trap of always perfecting but never completing.

To ensure this, if I am not finished with this course in two weeks I will schedule to a 50/50 plan of project and learning.

As my journey to build my project continues and taking me down the road of learning Django and Javascript it continues to show and support my knowledge of “The one thing I do know is there is a lot that I don’t know”.  Not that I need a reminder as if I ever get to the point of think that I know everything or I know enough, that is the day that I think that I will be read to head for the long sleep.

I made good progress in completing the “The Complete JavaScript Course 2023: From Zero to Expert!“:
:

  • Section 3: JavaScript Fundamentals – Part 2
    • Lots of array and loops overview
  • Section 4: How to Navigate This Course
    • This was nice from the stand-point that there different routes that the instructor gives.  I am trying to learn everything so I will complete it all but there were paths if you just wanted to focus on how JavaScript works, just code, etc…
  • Section 5: Developer Skills & Editor Setup
    • Wow there is a rabbit hole of plugins for Visual Code

I am now current 20% into my JavaScript course and the is a lot to remember and there are a ton of different way to make something work. So the foundation is being laid but the next steps are to review html/CSS with is just a recap as I have a foundation of these already.  With focus I will get through the following sections today:

  • Section 6: HTML & CSS Crash Course
  • Section 7: JavaScript in the Browser: DOM and Events Fundamentals
    • I had do some learning already on this due to my Youtube form tutorial in which I learned how DOM (Document Object Model) works to follow a path to find a typo..
  • Section 8: How Java Script Works Behind the Scenes
    • I don’t think that I will get through all of this section but at least get a good amount completed.

So I am sure if someone ever reads this blog, they will think that I am a bit all over the place with my learning, but there is a method to my madness 😉. As I was doing forms for my Django forms, I found that I was learning a lot but there were things that were escaping me. Could I make a form and make my site work? Yes.  Could I truly say that I knew what I was doing, sadly, No.

So I called in the big guns… I talked to my son-in-law (graduated top of his class from University), my daughter has 10 credits to finish her Software engineering degree (She also has a BS in Asian Studies), my son who has bootcamp in certificate for DJango and Python but pivoted on that knowledge and is working as a Junior Software engineer using C#, after completing an internship and was hired fulltime at an insurance company and now has just over a year done with his degree… So I have a pretty good team that I can ask questions to and a family that this dad is proud of 😊.

The challenge was, “Which version of Javascript should I use?”

This started a discussion about the some different versions and ultimately I decided on focusing on React JS. So I turned to the #1 place to learn… YouTube.

I found a channel that looked promising and going through the first thee lessons but again that feeling of, I am completing Yes, but am I fully understanding? No came back.

So number 2 place that I go when I want to learn something “Udemy”.  <sarcam>And luckly they were having a sale, that never happens. </sarcasm> 😉.

I found two courses that intrested me has I was focused on JS.

  • The Complete JavaScript Course 2023: From Zero to Expert!

  • JavaScript – The Complete Guide 2023 (Beginner + Advanced)

I decided to go with the one that had the a little better rating and more reviews.  I think that either one would have worked well.

 

 

That brings us to Coercion.  In section 2 – Lesson 20 the instructor (Jonas Schmedtmann) states that coercion can make code easier to read without converting everything, but there are others that state that you should convert everything as unless fully understanding coercion the input can cause unexpected bugs. The following example is given:

console.log(2 + 3 + 4 + ‘5’ + 6);

“+” works left to right and since the first three are number type it performs addition but the last value is a string so ‘2+3+4=9 is converted to a string and the values are concatenated and any other additional value will be a string.

I continued this and played with the following which confused me at first as I read it as:

console.log(2 + 3 + 4 + ‘5’ + 6 – 7); = 949

I was reading it at (2+3+4) (‘5’+6) concentrate 7 and was expecting 9567 when the value came out as 949.  Say WHAT?!?!  AI to the rescue… right?

 

 

ME: “how does console.log(2 + 3 + 4 + ‘5’ + 6 – 7); equal 949 in javascript”

AI:

The expression console.log(2 + 3 + 4 + '5' + 6 - 7) is evaluated as follows:

  • First, the numbers 23, and 4 are added together to get 9.
  • Then, the string '5' is concatenated with the number 9 to get '59'.
  • Next, the number 6 is added to '59', which is converted to a number because of the addition operator. This results in the number 65.
  • Finally, the number 7 is subtracted from 65, resulting in the final value of 58.

Therefore, the expression evaluates to 58, not 949

ME after understanding that numbers and string can be converted back and forth: 
This is incorrect information. After the concatenation in step 2 the value is now considered a string so when + 6 is evaluated, + 6 is considered a string and it makes the value of 956 not 58.

AI: 
You are correct. I apologize for the confusion. The expression console.log(2 + 3 + 4 + '5' + 6 - 7) is evaluated as follows:

  • First, the numbers 23, and 4 are added together to get 9.
  • Then, the string '5' is concatenated with the number 9 to get '59'.
  • Next, the number 6 is added to '59', which is converted to a number because of the addition operator. This results in the number 65.
  • Finally, the number 7 is subtracted from 65, resulting in the final value of 58.

Therefore, the expression evaluates to 58, not 94912

Thank you for bringing this to my attention3

ME: You reponse is still incorrect

AI: 
You are correct. I apologize for the confusion. The expression console.log(2 + 3 + 4 + '5' + 6 - 7) is evaluated as follows:

  • First, the numbers 23, and 4 are added together to get 9.
  • Then, the string '5' is concatenated with the number 9 to get '95'.
  • Next, the number 6 is added to '95', which is converted to a string because of the concatenation operator. This results in the string '956'.
  • Finally, the number 7 is subtracted from 956, resulting in the final value of 949.

Therefore, the expression evaluates to 94912

Thank you for bringing this to my attention3

 

 

So two lessons learned coercion converts to the next operator and don’t blindly trust A.I. (I already knew this one…)

And as of now, I am leaning toward converting and not relying on coercing.

It is interesting last night when I was working on the site but the page kept coming up with a 404 Error.

After finding what the issue was this morning it is apparent.  The url.py file returns a literal whatever is in the path.  I made some notes on the Django flowchart giving an example.

As summary I was typing http://127.0.0.1/loc/createloc

The url pattern in the url.py file was ‘createloc/’ when it should have been ‘/createloc’

Another day in leaning 😀

I have an idea!!  That is where it started.  My journey into Django and while talking to others, Django might not be the best framework the fight against perfection is taking the next step.  I have some background in python so Django made the most sense to me.  With that being said I was talking to someone at church yesterday and we were talking about Django and he stated “It was to complicated for me at the time I tried to learn it…”.

That is where I started to think about my personal Django journey and how I learn things personally.  Example, I have a Master Flowchart at work that focuses on supporting Palo Alto Products.  I started it to make sure that I understand the products that I support and since there are so many I will often take a case for a product that I don’t know very well and it will be 6 months before I see another case with that product… So the flowchart was born to help me personally.  Then I started to share it and people stated how much it has help them.

Why not a Django flowchart to help me clarify the things that I am doing and if it helps someone else that would be great also.  Will I repeat stuff that is on the djangoproject.com?  Absolutely… but maybe my journey will help other take the next step.

So that is where this Django journey begins, if you are reading this recent there will be hardly anything on it but one day at a time… Django Flow

It is interesting the human mind the things that we want to do and what have to do and what we are actually getting done.  For example this blog was for me to share what I am learning but the inconsistency of the updates are far and few between.  BUT…. that is where another day is a gift for us to make another start.  Our diets, workouts, learning or a blog…

So the plan is to add updates here as I am updating my journal that I complete with therapy.  Yup no matter how invincible we think we might be some times to be the best we can be we need help.  I have rarely hesitated on a professional level to say “I am not sure…” or “I don’t know off the top of my head…”, but until a few weeks ago did I start doing that on a personal level.  I feel like it is going well but it is work and consistency. Something that I have said to my manager many times but haven’t put in place on a personal level is…

 

 

“I can only do what I can do, and when I am becoming overwhelmed, I will let you know.”

 

 

Additionally to that and with working with my therapist, I have added on to this to verbalize it as I was practicing.  “There are things that you can change, things you want to change that you cannot change directly.”  It differs in personal and professional lives and I have been trying to live my personal life like my professional life.  This is has caused un-needed challenges.

All we can do is what we can do…