Portfolio Site

Coming back to FCC means redoing the challenges and this time I’ve tried to push myself where I can.

This is my compulsory portfolio page: https://codepen.io/JammyPiece/pen/pwVrog

It’ll be nice to finally get some projects on it.

Next stop on the journey is basic javascript so here’s where I need to hunker down from the beginning to get a good grasp for the hard bits. Allons-y!

Advertisements

Update

I’m still here! Or rather, my computer is still here and I’ve been hiding in a corner not touching it for a long while- the depression having put a kabosh on any motivation I had. So, I’m about to relaunch into making my own private portfolio site. I’d started it but then abandoned it. I think I was trying to do too much too soon and burnt out. But that way, I’ll never succeed.

So, I’ve gone to Dev.to for some uplifting reads, watched some ChristheFreelancer videos on youtube and am minutes away from jumping back on the horse, if only I could remember which way round the horse should face…

Back to Basics

I’ve just returned to doing FCC- HOORAY! I missed you!

I found the Moroni book really helpful until 2 things really didn’t click and I found the book didn’t adequately explain them for me. The first was the DOM and ‘getElementByID’ element. Then there was the ‘navigator’ element. When we finally hit a bit on JQuery, I’m sorry but I had to bail as it wasn’t working anymore for me. I’d finished most of the book anyhow so I’ll use for reference as I progress with FCC.

I’d had a bit of a break for nearly a week for health reasons but the thought of giving up completely (creative writing was the next big idea) annoyed me- I do really want to learn to code. I think one weakness in my motivation comes from not yet really understanding what I CAN do when I have the skills. I don’t yet have the vocabulary to either understand or describe the possibilities. I’m illiterate. Harumph!

Anyhow. I’ll keep reading my reddit forums, dev.to round ups and your blog entries in a hope to pick up the lingo and open my eyes to what I’m actually learning to do.

Pacing Myself

When I started this blog, I set myself a 2 year deadline to get my full-stack cert from Free Code Camp. I’ve just come back from a 5 (!) month break and am basically having to start from scratch. This has led me to look at the estimated time scales and see how long it should take me at my new, slower pace.

I’m planing on doing 7 hours a week for the front-end cert which will take me at least a year. More if I use all the estimated times that FCC give you. Then it’ll be another year for the data visualisation and back end certs if I double my time to 14 hours a week. That’s still not that much and if my health improves, I’d be looking at 20 hours a week if my energy and brain function allows.

So, I’m now unlikely to hit my target of 2 years, as per my blog title. But the game is still on and I feel okay with that. I’d rather spend 3 years and achieve my goals than spend no time and never reach them.

What the heck happened?

5 bleedin’ months!? I had no idea I’d been away for so long…

I’d not abandoned my blog or goals but my long standing depression got in the way and has been causing me exhaustion when I do too much mentally and the amount of fcc work I was doing broke the camel’s back, so to speak.

Anyhow, I’m back and with a new approach. I’m going to have to limit myself, as much as possible, to 52 minutes a day- as per the research here on ideal study periods. I’d like to do a lesson a day but if that’s not feasible, I’m going to have to learn to let it go.

I’m also taking a step back from fcc for a month while I work through Julie Meloni’s ‘HTML. CSS and JavaScript’ (2015). It’s a really good textbook with quizzes and plenty of practical activities. What I like, and why I’m studying here first, is that it doesn’t shy away from the technical background stuff. I’m on chapter 1 and it addresses web domains, ftp and responsive web design. These are things that weren’t covered by fcc before you plunge in.

So, today, I set up my first ever web domain- lornaroberts.net. Tomorrow I ought to have a teensy, tiny bit of content- probably the notorious “hello world” My plan is to use this as my portfolio site/playpen. I just need to figure out directories first…

Diverted

I was meant to be doing more on JavaScript this evening- which I did for a bit- until I developed the irrational notion that I had to jazz up my clock project beyond the bit I copied  learned from the book. So, behold the wonderous borders. Be amazed at the use of a box shadow and blinded by central alignment of my text here. It took me 2 bloody hours of going round in circles losing my alignments and chasing the rectangles around. It won’t win any design awards but it’s as done as I can think to make it right now. I did also learn about wrappers/containers and how to overlap text on a shape so it was a good exercise in itself. However. No more excuses and back to DOMs tomorrow.

Hitting a brick wall

In going through the FCC challenges, there have been times I’ve given in to looking at a hint after a few hours of no progress but I’ve been able to figure out the working and I’ve been able to move on. I might be being somewhat over-dramatic but I think I’ve found my nemesis and it’s got me in a choke hold and is pummeling my face…Nesting for loops.

I was doing okay with iterating odd/even numbers as well as counting backwards. But pop an array in there and I’ve got a problem. The key thing I don’t understand which may, or may not, be the key to my problem is the [i] in the following:

var arr=(10,9,8,7,6)

for (var i=0; i <arr.length;i++) {

console.log(arr[i]);

}

I get that the variable is the top array. Then the loop initialises with the value 0. Then the condition is that it will continue cycling as for the length of the array as its maximum while adding 1 more  every loop. Now, it’s meant to output each part of said array but I don’t really understand the relation between the array and that final [i]. I definitely need to go back a couple of lessons and thrash it out. Nesting for loops?! I’m coming for you!!!!!! p.s if you can explain it to me, you have a friend for life!

Switching causing violent twitching!

The basic JavaScript section continues slowly. It started off with simple addition/subtraction etc. But now has gone into the logic side of things using ‘If’ ‘else’ statements. Now, that’s not too hard if you remember where to put your brackets and semi-colons. Then came a more involved task that involved using a switch statement to create a blackjack decision making tool. These are (slightly) simplified version of if/else which is less wordy but does the same job.  However, the task didn’t specifically say that you needed to use a switch statement. As you needed to go back through the unit to the more basic concepts (pre-switch) it didn’t occur to me that there’d be a problem doing it long-hand.

However, there seems to be a divide between those who successfully managed the job with switch and those who tried to do it otherwise and failed miserably, like myself. For reference/in case you’re interested, here’s the solution.  I tried to redo the task myself using Switch before I totally succumbed to the full answer and I wasn’t using the ++ or — operators. I had understood the task but not the ‘how to’ although the answer does make complete sense. I can only hope that this is a minor hiccup…

This is the answer:

function cc(card) switch(card){ case 2: case 3: case 4: case 5: case 6: count++; break; case 10: case “J”: case “Q”: case “K”: case “A”: count–; break; } if (count > 0){ return count + ” Bet”; } else { return count + ” Hold”; }

Look how tiny and pretty it is!