Monday, December 28, 2015

Social Media My Ass

Fuck Twitter.

For the time being.


With all of my childhood insecurities still lingering inside me, I don't need a website to make me feel bad about how I'm doing. It's less of a place to talk than a bulletin board to announce whatever fun/hip/rad thing you did on that day. It seems to be less about interacting and more about bookmarking your life. I know a lot of it is people sculpting their image, but it still makes me feel shitty.

I tried to throw in. I retweet articles I find interesting. Don't get a peep. Tweet my opinions on current issues, crickets. I mention something then hours later the rest of the timeline blows up about it and I don't get a callback or anything. It makes me feel left out of whatever the fun that Twitter is supposed to be.

So I'm stepping back. I'm not going to eagerly wait for people to reply that don't care about me or what I think. It's not like we're tight. They're not taking any of this personal, so I won't either.

I wish i could make friends like I used to, but I have to come to terms with the fact that things probably won't go back to the way they used to be. Even people younger than me are incredibly set in their ways. I'm not going to fight it anymore. Have a nice life, you mooks.

When I do get back to Twitter, I'll just read articles people post. If I forget myself and respond to something, I have to remember not to expect a damn thing in return. It's not like they're getting paid to be civil.

Until then it's big old nope.

Friday, December 25, 2015

Learning Angular isn't as fun as advertised.

Yep, it's after midnight on Christmas day. I don't really care what day it is. I'm up, I felt very unproductive, and it's been raining all week to the point where there were flash flood warnings in the area. It's been a funky run to the big holiday.

Anyways, I though since I was stuck in the house and all the grocery stores closed at 6, which is way different from last year (I wanted to buy snacks and watch movies but nope) I decided I would try to get through some Angular learning materials.

It happens every time. Even though the videos are maybe 5-7 minutes each and the books I'm looking at aren't that hard to read, I get to some point where I'm stuck on some stupid problem and it takes all night to figure out what the hell happened.

I started this around a little after 10. It's a little after 1 now. There were 5 videos to watch.

First. I start up the server but the page won't load on localhost. Since it's been about 3 bloody hours, I forgot what made it do that, but I got the damn thing to finally load. Then the {{}} were showing up instead of my info. Another 20 30 minutes down. I stopped to scrape up something to eat and collect myself.

Then there was a short time of things doing what they're supposed to. Then my ng-repeat doesn't repeat to the screen. No console error. That's where the bulk of my time went. I kept starting at the code on the screen which was just tiny enough to make it hard to read and make my eyes sore. Then I get the the {{}} again but not the data. Then I stop and wonder why this has to be so hard. I get something to drink, come back, and for some reason I missed what the guy was typing on the video. It was something that took me forever to find on my own by searching. Since I have have a laptop and no dual screen, trying to fit all this stuff where I can see it at the same time isn't easy. I'm listening to what the guy is saying but he doesn't mention what the hell he was typing.

Finally, I'm in the home stretch and another damn typo stops me dead for a few minutes. Now it's over, and I'm really, really, really pissed off with myself.

I wonder if I'm cut out for this. I wonder why this has to be so fucking difficult when others seem to get along fine. I can't concentrate on learning and internalizing the knowledge if I'm stopping every few minutes to bang on things until they start to work again. I hate myself so much right now.

I don't know if I can remember anything that I was supposed to learn here. I'm going to have to watch everything again so I can make notes. Maybe I'm not at the right level to mess with Angular yet.

It seemed pretty simple before. I wanted to make codepens and fiddles and try out the things I learned tonight. My head aches and I'm getting tired now.

I wish someone could help me along. I just want to get a better job and feel like I know something about something. Maybe I'm not smart enough for this. I just don't know.

Saturday, December 5, 2015

My grind continues

Tonight I tried to do a CSS layout totally from scratch. I mimicked the Treehouse project, but I wanted to learn how to do it without the base styles to start me off and get a similar result, just the full width part this time.

I used normalize.css as my base and typed the rest out with filler text. I didn't use images just to save time. Used massively ugly colors to mark the boundaries of each section of the page.

Centering major sections was pretty easy. I got stuck on the title and the nav lining up on the header. Yes, again! This time beating the nav ul down with padding-top got things to line up.

Then the columns started giving me issues when I tried to give them gutters. If I gave them right padding, the third column fell down below the other two, leaving a big gap. This time I added padding to the actual paragraph instead of the column divs and it looks more readable. Gutterless gutters?

I know that people say every project is different but wow, that was different. It might have taken longer if I had went mobile first. I'm kind of glad I didn't because it's pretty late.

I had big plans for the night (a little JS, a little CSS to mix things up) but I don't know if that's going to happen tonight. It's good to know, though, I guess. Exposing myself to more situations will help me get to the solution faster in the future.

Wednesday, December 2, 2015

The CSS Grind

The past couple of weeks I've been working on my CSS skills. It's been a good experience so far.

I started the TreeHouse course for CSS Layout Basics, since this always stymies me. It's a short course that gives you what you need to do basic layouts. It's sort of a cookbook style course. It assumes you know the basics, which I do (in a roundabout way) but it starts applying them in way that makes sense. 

I started to understand why I was doing what I was doing, instead of copying things from the internet. There was even a page layout challenge at the end. That was the best part, I think. I had to figure out how to do things and what order to do them in. I did it in two waves. At first, I was fixing things but my process seemed to get bog down towards the end. My stylesheet seemed cluttered and there was a lot of time spent trying to figure out where to put a rule. So I started fresh.

For some reason the second time through was a lot more orderly and I felt that I was working more efficiently. I got everything looking good except the header. The title and the navigation links weren't lined up. One was always a little higher than the other. After trying to figure it out myself I just went to the solution videos. The instructor went about things in a slightly different way than I did, which is fine because there's more than one way to get a result in CSS, but he finally got to styling the header and I found out what the issue was. It was padding. I think the situation was that I was setting padding in the media queries and not the global/general styles section. 

That's another thing: Those media queries. I've never been sure how to use them properly and now I have a better understanding. Not perfect, but better. Making sure that you put whatever styles you want to be constant in the general section of the stylesheet, only overriding those in the media query when necessary. Also, the challenge was good practice in taking out rules that were redundant or didn't have an effect. 

I started using the Chrome inspector like crazy, checking and unchecking properties to see if anything moved. If they didn't change anything, they came out of the stylesheet. I was giving the tool a real workout during this course and I enjoyed it. I also took a lot of notes to refer back to later.

I'm going to work on some more courses and get things solidified. I really want to be able to do this vanilla CSS well so I can be more sparing with CSS frameworks, and before I try Sass. There's some mini workshops to go through and frankly, a little javascript break is what the doctor ordered right now. The frontend really is more complex than before, beyond just having a good design sense.

Saturday, November 7, 2015

Front End track complete...what next?

I finished the Front End Development track on Treehouse last night. I felt kind of strange. It just ended and put me back at my home page. It took...just shy of a year. I might have finished up a bit sooner if school wasn't sucking the life out of me, but I can't change that now.

I'm happy about it but I know I need to learn more. A lot more.

I want to get the basics of CSS layout down, and move up to SASS. I want to learn more about node.js and maybe a build system like Grunt, and of course more Angular.

I want to go over some of the Javascript courses again, because a couple of them were a bit on the confusing side. I'm hoping now more things will make sense on the second viewing.

There's other things I want to try out, different languages and platforms. I'd like to get some basic design principles under my belt so everything doesn't look like Bootstrap. Just to keep things a exciting. Other than that, it's about finding projects to tackle and getting used to the experience.

I'm glad for the opportunity. I think about trying to learn this stuff on my own, in silence without my online teachers helping me along, and I'm not sure where I would be. I don't understand everything perfectly, but things aren't so scary. 

Wednesday, November 4, 2015

The Angular tutorials are going well. I learn a new little trick with each video. Problem is I'm looking at two of them right now, trying to decide which I like better. One on youtube and the free intro Angular course on Codeschool. Then there's a book. I need to narrow it down so I can keep things straight. The CodeSchool one isn't as great as I thought it would be. I got turned around on that one something feirce and have to backtrack now. I'm not even sure how I got confused because I didn't take a long break from it but forgot anyway. It glosses over some things, which makes it move quickly but I'm still asking "why" afterwards. There was no link to the resources I'd need for the project either. At least not on the front page. There's images I needed but after some googling I found the github repo with the files.

It might be better to go with the book, but it's part of the FCC map. This is something where I have to use outside sources to finish the section. Which I'm good with. As long as I find a good source.

The book should give me the in-depth explanation I need. Follow along with the Youtube series as long as it helps, then comeback to the CodeSchool bit later. No use in wearing myself out with two courses when this is supposed to be sidework. After tonight's confusion I long for vanilla JS and a sprinkle of jQuery now.

Brief explanation of MVC (Model-View-Controller) architecture

I wanted to write this definition out in my own words so I could understand it a bit better. The books I've seen MVC in explain it so badly that I had to turn to YouTube to get some plain English.

MVC (Model View Controller)

View - The HTML page that presents information to the user; the user interface or presentation layer.

Model - The data, either given by the user or otherwise, stored in javascript ojbects. Accesses database if needed.

Controller - The code that processes the data and updates the view and the model. It controls what happens in the application.

Useful videos that explain the concept:

Saturday, October 31, 2015

Those self-study dips, tho.

This past week hasn't been all that great. I've been coding a little, but not much. Mostly watching tutorials in an attempt to keep my motivation to learn new things up.

I'll admit, getting stuck on this timer project hasn't been the best for me. I started looking for examples to see what I'm missing, and every one I found did it in Angular. Fucking Angular. So it looked like a busy pile of something that resembled javascript.

Maybe that's the only way they got it to work or they were copying the example page down to the last detail, who knows. But money and life took priority for a bit and I had to get that under control. 

I started looking for Angular tutorials to see if I could learn enough to read the samples I found. It's not going to be that easy, I don't think. But Angular does seem interesting. From the little bit I've seen it might help make this type of thing easier (once you know how to use it).

I could go to the chat room and ask but at this point in my project I feel like I'm just asking "How do I do it?" The last time I worked on it I thought I might have to completely erase the JS and rethink things. I got the timer to  stop at zero most of the time, but switching to the break timer wouldn't do what it was supposed to. I was setting the session to one minute so I wouldn't have to wait that long (I waited that 60 seconds so many damn times...) but if I stored the break variable at the same time I stored the work session turned the timer into 5:59 instead of :59 followed by 5:00. They have different names, I have no idea why it wants to combine them like that.

I'm considering doing other things on FCC map until the logic for this timer makes sense. I'm missing a skill somewhere. I hope it doesn't take long to find.

Sigh. I've got a headache that won't go away. It's almost November. Sigh.

Sunday, October 18, 2015

Pomodoro: Started the Start button

I didn't do a lot of coding today. I still feel bad from the day before. And money is on my mind.

Instead, I worked through more of my Git Basics course, and I started on giving the Start button some functionality. So far it changes the timer to a minutes and seconds format, with a colon. 

The rest of the time was spent writing out pseudo code for this button, writing out my steps in plain English. I wrote down the questions that came up, such as "Do I update the entire countdown area or break it up into minutes and seconds sections and update them separately?" This came up because I wondered if redrawing the whole thing every second, going from 25:00 to 24:59 for example, might actually throw off the time...I don't think it would but it seems a waste to reprint the minutes section to the screen every second when you could do it every 60 seconds. So I thought I might have to add more HTML areas that can be written to separately:

<span id="minutes">25</span><span>:</span><span id="seconds">00</span>

If things go the way I think they will I'll have to try both. The project looks less daunting now that my mind has been working on it. I just need the parts to put it together. I need to read the details on setInterval and whatever else I'll need. The rest seems to be basic calculations: check a condition, decrement a number, show it on the screen. It's GOT to be that simple. I'm amazed that a couple of days ago the problem seemed too much for me. The level doesn't seem quite as high this session.

Other details popped into my mind, like making sure the numbers 1-9 have a leading zero on them, how much this will be broken down into functions versus just throwing it all into the event, and if my code will start over with the same time if the user chooses to repeat. I did spend some time wondering if I need to add more variables, but I didn't spent too much time on that part because it's late. 

I'm glad I did that much tonight. I could have blown the whole day off and threw off my momentum, but I kept going. Write code every day.

Saturday, October 17, 2015

Small Pomodoro gains today: Real Life strikes again

It was a rough day. This place makes me sad.

All I did on the timer code was revise the Bootstrap a little (I think the centering is okay now; I hope I didn't jinx it), added a reset button and wrote the code for the reset button. Click Reset and you get the default 25 minute session with a 5 minute break. Oh, and the thing that formats the timer to MM:ss format.

I just realized I need to add Break and Session labels to the page. Hopefully that won't take all day to position properly.

In other web dev learning news I tried to configure ESlint to throw up a few less errors. It's still nitpicking me even though I changed some things (after reading some of that mind-numbing documentation), but it took 10 errors out of my sight. I wanted it to skip the double/single quotes and what it thinks are the right amount of indents. It still counts the damn indents and I'm not going through each line if it's not affecting the operation.  I had a curse laden paragraph here, but I erased it and put this here instead.

That's all I've done. I just want to recover.

Friday, October 16, 2015

Pomodoro Clock, Scope, and knowing it's not just you

I've made some progress the past couple of days. The page itself doesn't look that hot, but it's giving me something to test my javascript code on.

I coded the click events for the increase and decrease buttons. I wanted to get those number values to use later in the script, but I couldn't get it because you can't return a value from a click handler (not in the normal way, anyway). I googled a while trying to find the answer, but the results didn't apply to my situation.

Eventually, I thought maybe I didn't declare my variables in the right place, because I was thinking "if they're in the global scope the values should update, right? Heey, wait a minute.." 

Ends up the variables weren't global but inside the jQuery function. I guess this was a scope/hoisting problem. 

I put them outside of the main jQuery function and bam, I can get my numbers back. Grr.

I (thought) learned this lesson a while ago, and also forgot it since I was out of the habit of hacking away at projects like this. Basic Intro to Programming taught me declare your variables and functions first and the the program instructions go after that. This might not be the hard and fast rule anymore but it's what my program needed. So I did it!

During daylight hours I got to go into the Free Code Camp chat room and after a while some people showed up that were working on the same project, so I got some hints on what direction to go into. I also had a short chat on Twitter with a follower (ugh, that sounds so pretentious) about the learning process. She said she felt better knowing that other people have that "I SHOULD KNOW THIS BY NOW" moments when they're working on stuff and that people's ability to work through a problem seems to ebb and flow. Some days you're hot, some days you're not. I wondered, because most of the people I see online portray it as this smooth, steady climb up instead of a series of hills and valleys. Which I hate because I feel like I'm not doing enough. Maybe they're telling the truth, but if that's the case everyone on Instagram has a charmed life full of adventures.

Good times.

Wednesday, October 14, 2015

Free Code Camp Pomodoro Clock

On to the next project. It might be a doozy.

FCC changed the lesson plan again so the weather app got moved on to a more advanced stage. I might end up doing it anyway after this, but considering I was a little flustered on starting that, I'm glad to have the change in focus to a timer. Not necessarily better but different.

The past couple of nights I was thinking about where to start. I'd opened up a bunch of articles about JavaScript dates and build a timer tutorials but didn't know what to look at first. My cold was still going pretty strong and I fell asleep trying to get the foundation laid in my mind. Which was a good thing because I woke up feeling better.

You get put out for a week and feels like an eternity when you try to get back into things. But tonight I talked through some of it out loud and the problem started to become more simple. Breaking things down to pseudocode in my head. Basic things like "I have to convert the minutes to seconds", "I have to display those seconds on the screen...some sort of function that will decrement the number then write to the screen in real time, yeah?" Things like that. Getting to the heart of the matter instead of being overwhelmed by the fancy looking finished page I have to reverse engineer. 

I typed out what I need to do, possible functions, variable names. I got over some small hills and that felt good. Then I started laying out a simple form and that got hairy. I worked up something that looks like it will be functional for now in that divtastic Bootstrap way. It took a while, as usual but the cosmetics will come at the end.

I'm giving it a rest for now so I can end on an up note. I have something in print, which is better than having nothing. I hope to start the Javascript next session.

Sunday, October 11, 2015

Colds suck. Plus a list of random home remedies.

Last week, I caught my mom's cold. And that's after avoiding her plague like the plague and listening to her cough and hack for a week. Still got that telltale tickle in the back of my throat that wouldn't go away. I hadn't been sick for about 5 years. This year just stomped all over that legacy. And now it's back for more.

This past spring my workout regimen was disrupted by a six week long coughing fit. I was afraid it would happen again. I hoped for the best and started drinking hot liquids and bottles of water in bulk. Lots of tea, including good old ginger and lemon infusions. Honey for the throat, bought cayenne pepper and put on it on everything I could think of (my appetite is pretty low, so sometimes...I mixed it with the honey and shot it down) to keep the gunk level low. Neti pot twice a day. Bundling up and sweating. Good old sweating. No fever, just sweating.

I also bought some cold meds, hoping that they would work this time. I bought some generic Theraflu, the powder that you mix with hot water. It seemed to work in the past. I look forward to them almost. They're not as strong as they were when I was a kid, but it still does something. 

I'm still coughing, but it's not keeping me awake and things seem to be turning around. I slept in for about three days, not because I really wanted to (I was going to watch tutorials if I couldn't sit in the chair to code but I only got a couple in before I drifted off the first day) but rest is part of the equation. Sometimes you're  forced to stop and take a break. 

It's been about six days since that first itchy throat and I feel better. Trying to catch up on my learning and keeping things quiet. I may have nipped this thing in the bud. Hopefully this coming week I wake up with that suddenly normal feeling again. Mom's still hacking up her lungs from time to time, but I'm glad I'm fighting whatever this is off. 

Walking Dead season premiere is tonight and that's probably all I have to look forward to, besides more waking up and not knowing what time it is.

Wednesday, September 30, 2015

Random Quote Generator Notes, Part 2: First time working with an API!

I messed with this a long time. There were breaks in between, but still a long, annoying time.

This time I used the forismatic API to generate random quotes. At first, I didn't know what jQuery method to use, .ajax or .getJSON. If I had not seen the notes in the chat room, I wouldn't have gotten done tonight, I don't think. I ended up using .getJSON for this.

Then I couldn't get a good response back. I typed in what I thought was supposed to go in the url and it wasn't working. Then I saw I was copy and pasting too much and it caused typos in the url. I corrected it and it still didn't work. After retyping it a few times it finally worked and I could get a console message with the quote data.

Then I had to get it on the screen. That wasn't working. Then I got close with my div showing the word 'undefined'. I rearranged my code and it finally showed up. Trying to get the JSON in a separate function wasn't the way to go. Even if I ran the function in the click event I couldn't access the data, hence the 'undefined' happening. 

Once I actually started seeing quotes on my page I had to figure out the best HTML element to create for the author attribution and change the CSS a bit to make things presentable. I took away the giant quote marks and reformatted the text.

I still haven't turned it in because I want to try to implement the Tweet button, but I'm mentally exhausted right now. 

It was my first time working with an API and it didn't spoon feed me a damn thing. It will just make me stronger.

Tuesday, September 29, 2015

Notes taken while working on Free Code Camp's Randome Quote Generator Project

So far, so good. I have the quote generator working with just an array. I still have to find out how to use the API example given. Not much code, besides the long array of quotes. Currently working on finding a nice way to style the blockquote.

Update: The array version is done. I've just been messing with colors and little things that nag me that I don't have much control over, like the button outline color. It puts a thin blue outline around the button when it's clicked, and I looked up how to take that away, but that would also mean messing with accessibility and/or keyboard navigation. Tried to change the color but couldn't get it to work. No biggie.Not sure if that's a Bootstrap thing or a browser thing. I saw both while searching for answers. It's there to help people, so meh.


I chose the argyle background the color of old mustard to make it look as stodgy as possible. It's working. I tried brighter colors but it was just too much. 

Update after the fact: I got some hints and ideas on learning how to use the API from the chat room, so the game is still afoot. But later when I get a little rest.

Saturday, September 26, 2015

A Slight Twist of the Melon: Javascript FunctionCeption

In my codenewbiehood, I haven't had many opportunities to do any functionception, that is, running the same function inside of itself. Like the Inception movie, a dream within a dream. You've seen it, I'm sure.

Until now.

I hopped on CodeWars earlier tonight and clicked to get the next kata. You know how you do. I get the List to Array exercise. I work on it for a bit, and get the bulk of the thing correct.

Except when there's an object inside of the object. Fail. Boo.

I grind on this. Do I make another function? Do I do an "if the value is another object, do this?" Yes I do, but how? It was going to be a long night. I went and got something to eat and let things marinate. As you do. This was supposed to be a fitting in some coding before dinner type of thing, dangit!

Then I said "This isn't a contest. Let's look at the other answers." 

First I see all the clever one liners. I'm skipping those and looking for something written in longhand that I can understand a bit better. Found one.

What it boiled down to was this bit of pseudocode: If the value is an object, call the function again, right here. Pull out the values and continue iterating the rest of the properties."

Got it.

This is what I retyped, roughly:

function getprops1(obj){
    //set up array to store values
    var arr = [];
    //iterate the object and pull out the values
    for(key in obj){
        var value = obj[key];

        if(typeof value !== 'object'){
        }else if(value){ 
//if the value is an object, run the function inside itself on that object value
            arr = arr.concat(getprops1(value));
    return  arr;


This little test was where my abstract thinking skills failed me. I can understand calling a different function inside another function, but my brain stopped at calling another copy of the current function inside itself.  I don't know how to explain it. I was being too real life and concrete for some reason. I'm pretty comfortable with reassigning variables to themselves (string = string.split(" ") or something like that) but moving that up to variables was hard tonight. I had difficulty following the path of the thread in the knot that is code.

And I'm good at unpicking knots. I work with yarn and thread fun fun so it happens all the time.

If I'd kept going and tried to reinvent the wheel, I probably would have put an anonymous function that was the exact some code in an if condition, then refactored days later and whittled it down to what the existing solution is. It would have been more painful, but I think I could have gotten there.

I see where this could be used in the real world. Maybe a user account is stored as on object and one of the keys is another object that holds a bunch of information that needs to stay together. A customer bank account maybe (it's the best thing I can think of right now so bear with me). 

user = {
    name: "Joe Schmoe",
    address: "1234 Main St",
    checking: {
        acctNumber: 2342342342,
        balance: 2000.20,
        pendingTransactions: {
    savings: {...}

When you get the feeling that what you're stuck isn't something new or revolutionary, just look it up. No one will fault you for it.

Thursday, September 24, 2015


How or why I did this, I'll never know.

Some of the sections on my reverse engineering project were rows that didn't have containers. Container classes is how Bootstrap does it's thing a lot of the time. I added the container divs. Now the stuff looks like I wanted it to. Three days ago.

Yay...? I wasn't even going on it that hard, because I'd just done a bunch of surveys for pay and my mind was numb.

The video I watched to get the knowledge in me faster had the guy adding Bootstrap classes directly to the rows, so I might have gotten that bright idea from that. This wasn't the situation for it, I don't think.

It must be this working when I'm tired/distracted/whatever that's doing this.

Bootstrap used to be easy, now it's making me question myself.

There's a couple of things left to do. I have to make sure the user stories are followed, tidy up my CSS and make sure I'm using everything in the stylesheet and I'll see if someone can go over it with me.


Tuesday, September 22, 2015

FCC First Zipline: Build a Portfolio Page Part 2

Just out of my second session with this project. I think it was fairly productive.

I rearranged some of the HTML to give the footer section a similar look and feel to the example. I had to put it outside the main container, just like I did with the top nav so it used the full width of the screen. I added padding between the sections to space them out. I tried to group some styles together to keep things concise, but I'm sure more can be done. Tried to make sure if a CSS experiment didn't work or was redundant that I deleted it right away. Lots of typing and backspacing. Between that and trying to look stuff up that sucked up most of the time. 

The biggest event of the night was adding Font Awesome to the pen and adding little social icons to the buttons.

The centering of the About section still needs to be worked out, but the columns aren't stacking until the display shrinks significantly, so I'm happy with that for now.

Next time, I plan on adding placeholder images to the portfolio section, hopefully getting things to center. The contact section layout needs more tweaking, and I need to figure out how to make it so I have enough material to scroll. Right now it's one mouse wheel turn and that's it. I might just add more text or something and see if the text and the image align. In the Twitch stream I watched the guy had problems with that. I have to look up what he did so I can try it.

That's it for now. I need to put this away and attempt to pursue other interests. All work and no play, blah blah. I worked right through a live stream I wanted to watch so I'm a little pissed. It's probably for the best. 

Monday, September 21, 2015

FCC First Zipline: Build a Portfolio Page Part 1

I hit my first FreeCodeCamp zipline project this weekend. It involves reverse engineering a sample portfolio page. No peeking, if you're honest.

I started on it Saturday and kinda got lost. I was having a hard time going through the Bootstrap documentation to find what I needed. I mean, it's all there, but at this point the examples aren't answering my questions. I was going back and forth between that and typing in CodePen and just making a mess. 

So I cleared it out and started from scratch. I structured the HTML with the elements  thought I would need. Then I got the fixed navigation at the top looking presentable. From here on I'm just working downward, one section at a time. It shouldn't be that hard, but that's what I thought a day or two ago and I mucked it up. All the divs you use when implementing Bootstrap start to run together.

Right now I'm struggling with making sure things center the way I want them to. Because the CodePen windows are sort of small, even when you make them wider, I might just type in a text editor and paste. I can keep things lined up easier and be more gentle with myself, not having to wonder if I deleted the wrong closing tag or not.

Once the layout is done I'll worry about the background and the cosmetic stuff. This is good practice for coding a page the way someone else wants it. Whether I like it or not.

I also looked up some video tutorials to watch while I was still feeling lethargic from the monthly deluge. Seeing someone do it and taking notes is quicker than reading, and right now I just want to get stuff done. From this I discovered that you can put the <nav> element outside of your main container div to make it stretch across the page, which is how the example is laid out. 

I was messing with way too long tonight and had to force myself to put it away. I like getting in the flow of things but most of the time I was trying to skim text to find the solution to my problems and it was just making me impatient, so I might have skipped something useful. I found a lot of almost but not quite material that didn't work out. CSS is not my strong point. I just need to be functional.

It's just another dip in the road to jump over.

Thursday, September 10, 2015

FreeCodeCamp Title Case Challenge

I just finished the Title Case Challenge from FreeCodeCamp. I opened up an old title case code exercise I did before to see what I did.

I used some new string methods and kept looking for ways to shorten the code while still making sense. Mostly by chaining stuff together that I would normally do line by line to keep it clear to myself, logging the whole way to make sure the results of those chains were what I expected. I know some folks hate console.log but I love it to pieces right now. 

I looked for ways to get the operation done without adding another variable to the mix. I even saved an element to a variable that I knew was going to be used over and over so I didn't have to type it out again further down. Instinctively! I was DRY like a comedian (with a dry sense of humor).

The old code was 33 lines minus the comments at the top. The code I just wrote was 12, 11 if I didn't have a space in there to keep it neat.

Things are improving.

Monday, September 7, 2015

It can't be THAT hard, can it? Part infinity

Oh my god this weekend in coding.

I was working on the FCC palindrome challenge and thought I could get through it with all my old basic skills.


First, I recycled an old remove the punctuation code snippet that I wrote a long time ago. It worked until I had to add one more condition to it. It should have, but something in my computer does not not like it.

I went to the FCC help room and they thought it ought to work too. I started messing around again and got some more tests to pass, finally getting down to trying to remove a question mark.


I tried to add that to my old for loop find it/splice it code, and I wouldn't not go there. Tried making a brand new if statement for it, no dice.  Someone says try some regex if you're comfortable with it. Regex, the stuff that's been hyped as over complicated and used to scare people for ages.

I'd learned a few choice elements of it through the site, I just needed to expand it. They got me to, and I started typing. It didn't like the damn question mark either, except for once. I tried a different expression, It wouldn't let me escape ? with \\ for whatever reason, but I tried it in the browser anyway since all things pointed to me doing it correctly and I got the last test to pass.

Rewrote the exercise code and finally got the damn Submit button. Saved a bunch of lines of code in the process. I feel better. And no one was evil to me.

That's only the fourth challenge in that section. Oh man.

Thursday, September 3, 2015

Tonight was learning about .match() and regular expressions. Maybe it was because the lessons only went over a few basic but useful ones, but it was easy to absorb. It might not be that way when I have to make one up but for now I feel like I got some good experience points there. It's a mini language that needs to be learned.

I was also thinking about how to refactor some of the code I wrote last week. For now it's getting some sleep. I'm beat.

Saturday, August 29, 2015

getComputedStyle(), where have you been all my life?

I learned about a new DOM method tonight: window.getComputedStyle().MDN Link

From what I read, you can use this to get the style of an element that is set by an existing stylesheet.

Why did I learn this?

I was trying to cement the things I've learned about JavaScript Events and the new HTML audio/video things in the TreeHouse course I'm currently on. I actually thought of a little project to apply this knowledge to. A simple page with two buttons. When you click the video button, a div with a music video embedded in it pops up. Click the audio button, you get an audio player. I wanted them to toggle, but first things first, get the content to appear when I click the buttons. 

At first I used display: none to hide everything, but then I switched to visibility: hidden instead. Another new thing I found. I liked the space it left better.

I expected to do this for about 20, 30 minutes tops. Nope. It was a good hour or so. Of Googling.

I got to this point where it was working, with a hitch:

videoButton.addEventListener("click", function(){
  = 'visible';
}, false);

That worked. The hitch was that I couldn't get a toggle to work. This is without jQuery mind you, because the classes I'm taking are all doing the vanilla stuff right now, and I wanted to try it the hard way. jQuery would have got me in bed sooner, but I wasn't having it!

If I tried to set up a toggle, I had to click twice to show the video and it wouldn't hide again. The stylesheet was right, everything was there, but earlier I had gotten null errors and general unresponsiveness if I tried a 'if hidden make it visible else make it hidden' deal. Almost said screw this I'm getting a snack.

The problem was that I was using .style.visibility when I was trying to check if the div was hidden. I guess .style checks for dynamically placed styles. It's all a blur now, but it seemed like clicking was removing the hidden value, adding back on then switching it to visible, hence the two clicks. My style declarations weren't being taken into account. This wasn't Git-worthy so I wasn't doing version control on it (I know, I'm sorry).

After a bunch of searching I found window.getComputedStyle(). This checks the styles that exist in the document on load, meaning the .css file attached to the page. So I was able to do this:

(I grabbed the button and saved it to the variable videoButton to save some keystrokes)
videoButton.addEventListener("click", function(){
   var musicVideo = document.getElementById('musicvideo');
   if(window.getComputedStyle(musicvideo).visibility === 'hidden'){ = 'visible';
   }else{ = 'hidden';
}, false);

I click the button, it checks for visibility: hidden, then makes the musicvideo div visible. If not, it hides it again. Same things goes for the audio section.

It was a long slog trying to get those search queries right and weeding out the "just use jQuery" answers, but I found something. Something that's not being given to me in a tutorial. I feel good about it.

(I just looked at my todo note and I wrote 'use jquery to toggle'. I like making things difficult, don't I? But it was educational)

Now I'm going to watch some youtube videos guilt-free.

Thursday, August 27, 2015

I added some comments to an old piece of Epicodus code I wrote about a year ago. Someone in the fcc help channel mentioned the reverse a string thing, and I thought, "I did that before".

As usual, the standard split/reverse/join on MDN didn't want to work in my console. I might have skipped a conversion or something.

Plus I don't remember what's an array method and what's a string method. I tried to memorize them in the past, but it never sticks.

So it took a minute to look over my code and see why it's longer than that one line.

For the sake of quickness, here's the main function:

var reverseInPlace = function(string){
  //turn the string into an array of words
  var splitstring = string.split(" ");
  //array for the words as they're being reversed
  var reverseArray = [];
  for(var i =0; i < splitstring.length; i+=1){
    //removes 1st word from array
    var word = splitstring.splice(0,1);
    //turn it into a string, then splits into array of letters
    //reverse array and rejoins as string
    word = word.join().split("").reverse().join("");
    i-= 1;
  var reverseString = reverseArray.join(" ");
  return reverseString;

I wasn't terrible. At least I went above and beyond turning a single word around.

I'm at the jQuery part of Free Code Camp now, so I should be back to thinking like a programmer soon.  The chat room thing went okay today. The local chat rooms closest to me are dead whenever I check them, so I stayed global. Hopefully it keeps going well.

Social media woes.

I don't know how to make friends online. I suck at it. It seems the more I talk, the quieter it gets.

Maybe it's the moderate depression shining through. I don't know. It's not something I can hide under a fake smile. That wouldn't be honest. Besides, it's not like it's something I talk about. Much. I mean to say I don't get deep into it in public.

Seeing people I talked to a few times listed as "not following you" kind of stung. I don't tweet much because I don't want to discuss my sorrows; I keep up that illusion of "things are semi fine to great" that most people swear by. I have talked about family emergencies. Maybe that's too real? I try to talk about programming but I'm so rank beginner it feels shameful.

I was tempted to ask one person why but I don't want to feel worse. I'm stopping at telling myself it was probably nothing personal. And not conflate it to something worse.

I do feel like I'm a pile of bad luck. I wonder if I can find some newbies to talk with. They're probably all at their local meetups, that I have no access to.

See? My thinking snowballs when I'm sad.

I try to keep a happy face on. But when personal stuff weighs you down and it looks like you're the only one that feels that way, it's difficult.

Sunday, August 9, 2015

I'm on TreeHouse trying to work through some tutorials and doing a bad job of it. To take a break because my concentration sucks, I went to the unanswered question section in the forum.

The question was already answered but it was a "Take a look at my code" thing. It was for the random number generator in the JS basics course. I tried to run it then start trying to fix it. It took a little longer than it should have because the guy had plenty of misspellings and extra parentheses that were making it weird.  I rewrote the meat of the code and it ran. Hurray.

That was kind of fun. Have to find more experiences like that.

Friday, August 7, 2015

Junk to do

I need to get back on Treehouse again. I tried watching videos on my phone but the connection decided to become unreliable. When it wasn't I was trying to work and make a few dollars. The tethering actually worked well when it wasn't 2G. It's limited though, not a new concept to me.

Now that I'm not worrying about bandwidth I've been doing the mturk thing and not a lot else. Because money unfortunately comes before the other stuff.

I have to look at some new job sources. Mturk actually picked up a bit, even though they raised requester rates. I can start automating things more, which might add a few cents per task, I hope. But I have to prepare for the worst.

I wish I could change bad habits in 10 days that easily. Criminy...

The long nightmare is finally over. Tell that to my mind, please.

I gots that cable internet now.

But two years of being ball and chained by Exede got me out of the habit of thinking "let me look that up real quick". Until Tuesday, my internet usage consisted of counting every byte and writing notes to myself for anything major to do in case I forgot when midnight rolled around, when the "free zone" happened that didn't count against the data cap.

I downloaded youtube videos to my hard drive so I could watch them during the day, grab podcasts and music and try to do coding tutorials all in that 5 hour period. I'm human, so it wasn't all work, which made it harder. And if it went out that night, tough shit! No rainchecks.

It made my already messed up sleep patterns worse and choked my motivation. I'm pretty sure I killed some brain cells. My myopic vision is more so. It's over but I still feel like I'm in jail. I'm still fucking with my phone when I can just use the computer and be done.

I wonder if I could have progressed further if it wasn't for that worse than dialup bullshit I had to work with. All those live coding vids I had to pass on, all the Japanese language streams I couldn't absorb new words from. The time lost.

Now I have to learn to be a spoiled, impulsive first world internet brat again. God help you all.

But I won't forget.

Sunday, August 2, 2015

No internet, no problems?

(Typing on this phone is bad even with the stylus. You go too fast and it puts spaces where they don't belong. Can't calibrate the damn thing either. LG must hate lefties. I've had to backspace so much for this tiny post.)

My only internet connection for the past week is through my phone. It's shaky, I can't work or watch a lot of tutorials because the connection isn't stable. When it is stable (It's happened twice) I work my ass off doing tasks until it drops out again.

No TV either, until mom begged directv to take her back. My set top box is on the other side of the room. I've liked the quiet. The only thing I've missed is being able to have news on in the background. Eventually I'll hook it back up. Law & Order SVU reruns aren't going anywhere.

Why all this 1990s living? Charter didn't test before they set up the install. The cable was cut so they said they would put a rush on the repair. No follow up call or anything else. I just happened to call to get dates. I see why Charter has a shitty reputation. But don't they all? It's the only option where I am so all the complaints in the world won't change them. Because they're still getting paid. I told them how inconsiderate it seemed and they didn't give a fuck.

The connection better be worth having to grovel like a dog for. People still steal cable and I can't judge.

I'm hoping Tuesday's the day I can get online like the cool kids again. In the meantime I'll sit here with my thoughts a bit longer. I won't have to stay up all night to watch a damn YouTube video. No ridiculous caps. I hope I can make up the non turking days with the speed alone.

I'll be able to watch the FreeCodeCamp stuff too. Since they rehauled it and community college in nc seems pretty fucked (or I'm catching every single person on their bad day) I need a way to at least build up a body of work. Things are pretty bleak right now.

Please let this actually happen. I don't want to be here the rest of my life.

Tuesday, July 14, 2015

This last project for the Treehouse OO Javascript course.

I was trying to write it myself but it was getting hairy, so I decided to work on it a while then look at the solution. I made an extra copy and typed the code from the video. It should work okay, right?


I've gotten it to the point where the everything but the question displaying works. The question shows undefined and I do not know why.

I checked against the solution text, it's the same. Maybe I've looked at it too many times and I'm skipping something. I really don't know. You can answer and get a score, but the damn questions won't show!

I'm going to sleep on it and try again tomorrow. I might try to rewrite the displayQuestion method. I just don't know. But it feels awful.

Wednesday, July 8, 2015

A little coding back and forth

Treehouse added a Javascript Objects course to their Front End track so I'm in the middle of it. It seems like every few weeks the course changes, which is good but it's taking me longer to get through it.

I'm glad for this particular course because I haven't found an explanation of prototypes that sticks with me until now. The coding is getting a little harder and I had to slow the video speed down tonight to get everything typed in and walk through it in my head. I'm probably going to have to look at it again at another time just to make sure I get everything he was doing.

I clicked on a question for that section then checked my list of followed questions. One of them went to the previous Javascript Loops class, where the last project was making a searchable student database. People wanted to add a 'Search Not Found' message if the name wasn't found. I dug up my code and found that I had a note to add the same thing. Well, tonight was the night.

I read the forum solution and the guy used a flag to mark if the student existed or not. Initially set to false, it switches to true if there's information to retrieve. My code was way different from his (he used while and do while loops for everything), so I had to figure out where to use this flag without rewriting the whole thing.

First, I made sure I got how his code worked, then looked at mine. I added a flag, studentExists, to the top of the file, then I had to find where to put it. I have a print function, a getStudentInfo function, and the while loop that brings up the prompt for name. I added studentExists = true to my getStudentInfo function, to keep the not found message from appearing incorrectly.

Next I added the condition if(studentExists === false && search !== '') to my While loop. In plain English, if the flag is false and there's a name typed in, "Student Not Found" should print to the screen. I had it after my quit condition (if you type quit it quits) and the getStudentInfo call. It worked there but I wasn't sure why. How do you know the person doesn't exist if you haven't searched yet? 

So I moved the condition into the getStudentInfo function. First the search is done. If it finds something, it formats the info and prints it. If it doesn't, then the Not Found message prints to the screen instead.  This placement made more sense to me.

It didn't take as long as I thought it would, maybe 15 minutes. I thanked the guy for his solution. Then I went back to my current course and took the quiz. I probably shouldn't have done that because it could have been a long, sidetracked night, but I'm glad I did. The fact that the code is a month old and it made sense after reading through it was amazing to me.

When I worked through Codecademy there was an address book script that I was trying to add more functionality to that had a similar problem. If I had the heart to dig it up I might try to implement the same thing. It's really old. I might be on Github? It might be good experience of trying to revise old code.

It was nice to be able to resolve an old issue.

Back to the night and some learning.

Saturday, June 13, 2015

So many lemons, so much salt, and not a damn bit of tequila to go with them.

Networking, networking. It still hasn't happened. Talking to people online hasn't worked out like I wanted it to. I'm too shy, and don't have enough to talk to anyone about.

I went into FreeCodeCamp with an open mind, wanting to learn from everyone and maybe teach someone something in return one day, but they kept revising their course, which is understandable. They're new. the process I fell in the cracks. I can't be on all day to catch people since I have tortoise internet a good part of the month. I can't watch the coding streams they have on Twitch, and when I do go to the chat room most of the people seem way ahead of this and I'm not always sure why they're there, except to get experience...but they mostly live in big cities where they can do meetups and stuff like that.

It reminds me of when I was taking online Japanese lessons and most of the students were living in Japan teaching English. I just sort of go "Really people?" The funny part was their Japanese was worse than mine, landlocked never been off the continent me.

They switched up the discussion board too and that threw things off. I had gotten a short thread going about people in Western NC, but it looked like not a lot of people in the area were studying this stuff, so it died before the board even changed. I checked maybe a month ago and didn't see much new activity. That's why I feel like this place is so depressing. Still in the last century. I don't know what I'll do if I can't get an internship somewhere. Asheville meetups are mostly Wordpress and small. But there's supposed to be some tech stuff going on there...I just can't find it. There's just not a lot of cities around here.

I've wanted to get at least a part time job or something flexible enough that I can keep going to school. I know I need money. But when I was working full time post college, I didn't think I could handle school at all. I went for years wondering if I could do it and then not trying because of the price and everything else. I'm scared if I get into an 8 hour a day thing I won't try to code ever again, and I'll die in this wasteland. I've already let things slip once, I can't do it again. I don't have time.

My hope is to find a job in Asheville, a store job or something part time. That will shut mom up and justify me driving there. Go to the CC there and pray that they're better connected than the school in Hickory. Get work study experience, build portfolio/personal site, hopefully find my way into some business that needs a front end coder. When I get more experience, move the hell away from here. If I can get some agency experience as a junior, maybe I'll start doing freelance things on the side, but right now I know I have no selling skills to develop a client base.

Alternately, when the damn Exede contract runs out in August, we can get regular old cable broadband and I can do stuff during the day again, including more work at home stuff. I think about what I could make if I didn't have to wait so long between clicks and I get angry. While I'm waiting for a page to load, jobs are getting snatched up. That slow connection screws you in so many ways that spill over into your real world life. And everyone assumes you can hop on and off as you please. I'd like to see what they say after a month of the crap I've been dealing with for two years. My grandparents have Charter, and there's a box over there. Hopefully this house isn't too far away from it to extend a line. The house has had it before according to the woman I talked to at the cable office a lifetime ago, so it shouldn't be a problem.

I can only hope. That's the sad state of my life at the moment. I should try to do something productive now. My open bandwidth time is almost over.

Learning to create a dropdown menu with jQuery: Post lesson breakdown

Late night working on Treehouse things. This is more for myself than public consumption, so it might be insanely confusing, since I'm not showing all of the code.

Tonight I was finishing up the mobile dropdown menu project. I learned some new jQuery methods, and I understand it, but my mind tries to figure out some of the in between things that it probably shouldn't concentrate on.

I sprinkled a generous amount of comments on the code as I worked through it, but I wanted to hash it out in prose form too, hence this post.

The page was already made, so the HTML and CSS were mostly done. Some things are added to the CSS to style the HTML elements adds via jQuery.

First, the HTML elements are added dynamically with jQuery. The original HTML page isn't touched at all. For example, I add a select element and assign it to a variable in the js file using:

    var select = $("<select></select>");

That way I don't mess with the original structure. It makes this added feature more portable as well. That's how I'm seeing it, anyway. Otherwise each page in the site would have to be edited, and that only leads to bad things.

Second, the script runs through the tabbed navigation links and adds them to the select element as separate options. This is done with the .each() method and an anonymous function. It's a for loop that runs on each link in the menu.

The function grabs the link and creates an HTML <option> element. In the original HTML, the menu option for that page had a class called .selected added to it. This highlighted the tab at the top of the page. Since we want a drop down menu now, the selected page has to show in the little window. To do that, we check if the link on the page has the .selected class. if so, the selected property of the <option> element is set to true. This will maek it show in the window. The check is done with the hasClass() method.

        if (anchor.parent().hasClass("selected")){
            option.prop("selected", true);

The function then it makes the option text whatever text was in the original link. So if the link was named Home, Home would become the option in the dropdown list.

    <a href='index.HTML'>Home</a> --> <option>Home</option>

Then the <option> is added to the <select> element with .append().

The option's value attribute (property?) is set to the address of the page with .val(). This is found by getting the href attribute of the link. Using it as a setter instead of just a getter.


In the HTML it looks like this:

<option value="contact.HTML">Contact</option>

Finally, a listener is added to the select menu, so that when an option is picked the page changes, no Go button needed. That is done with .change() and another function that changes window.location to select.val(). The value of <select> is the value of the chosen <option>.

It was a little confusing when I was going through it using the same names and having to use those names to describe the behavior, but in a way it's good real life experience, since I might not be the one coding the HTML each time and picking class names and such. Plus it's probably hard to give meaningful names to everything while keeping the names fairly short without repeating a bit. "Select the <select>" is freaking painful to say.

The CSS is changed to add media queries, since the drop down is only used with small screens. The regular menu and the mobile menu are both present at all times, but display: none kicks in depending on the screen width. Nifty.

So that's done. I know it's something I need to be able to do. I need to brush up on CSS a little more, since I wasn't always clear on the whys of the thing. The CSS course seems like it was ages ago, and it was, because I was plodding through it during school.

I really want to get my energy back for this so I can finish this track and do another one by the fall. The resources aren't there for some reason. I think it's because I have to do it at night so much. This limited internet is really cramping my style. Before an imaginary someone says "Go to a hotspot, duh": I live in the country. There isn't a hotspot worth lugging the computer to. There are hotspots for a lot of stores, but they have them locked and don't share, or you have McDonalds and the grocery store where the speeds or so slow you can't check your email. Streaming video would be as bad as it is here when it rains.

Friday, April 17, 2015

Where the heck have I been?

I'll tell you.

In the doldrums, that's where.

It's not that I haven't been working and studying. It's just that things have gotten dead and dull and there wasn't a lot to actually share. I feel like I'm treading water. School is just a damn chore right now, and doing the Treehouse thing, but I've just felt like a zombie the past few months.

I'm also dealing with my weight loss plan. I've discovered these past few months that Amy doesn't lose weight gradually week by week. She has two and a half month plateaus where she's doing everything she's supposed to but the scale doesn't move. Then one day, out of the blue it does. Then it stops again, probably for another few months. It doesn't help that I had a really bad cold and cough for a month and couldn't work out without having a coughing fit. Luckily my appetite disappeared too, so I sort of balanced it out. But it it got me out of the habit of moving, and it's been hard to get back on that wagon, along with just feeling bleah.

I feel like the world is against me right now. I'm not sure what to do. It feel like I'm walking on a treadmill. I haven't found what it is I need for things to come together. Networking doesn't seem to work very well around here, on or offline. Well, offline there's no one to work with. People don't return my emails, conversation threads stop dead in their tracks. No support system for anything, health or education wise. I wish I could say fuck it and give up, but what do I have to fall back on? Nothing.

I just keep thinking about the day I live in a place that has dining options chain restaurants and bad Chinese buffet. I wonder how hick I'll look when I sink my teeth into Indian food again for the first time in X years. I wonder when I'll get to leave all of this behind.

I don't know. I keep going but I want to feel like I've moved forward. I'm not getting that right now. Maybe it will be like the weight loss, extremely slow but eventual progress. Except I don't really have time for that. I'm old (meaning over 35 because people are that shitty when it comes to age) and people like to not hire old people.

All this life I feel like I haven't lived yet, because of money. And I don't know if I'll ever get the chance.

Back to work for me, I guess.

Wednesday, January 21, 2015

January: It's a Hell of a Month

Just an update on how things are going.

I got two emails from people at codermatch that wanted to pair up. One of them mentioned Free Code Camp. I emailed them back, wanting to know a little more, but haven't gotten a response back yet. I was nervous, but I beat back my hermit nature and reached out.

Tangent: I don't want this to be another social dead end like most of my other social interactions with code learners have been. People don't want to be close and I don't know why. I feel bad about it because I imagine all of these people are city people that know all these people in the biz and are going to just ask some friends for a job when the time comes, and I'm not helpful to them because I'm in the sticks. It makes me feel invisible. I just want to talk some newbie shop. If they're not cool in the end I can break it off, but don't shut me out before it even starts!

Back to the action. This is what's been taking up a lot of my attention, because if I die I can't enjoy that sweet, sweet moolah that coders make.

I've been exercising and dieting in earnest. I've been keeping a food diary and exercising daily. I actually relaunced the food diary again in December, but this month has been more eventful. I overdid it Monday trying to find a yoga tutorial to do, and I took Tuesday off to let my stiff legs have a rest. It felt better somehow, some way and did a 30 minute workout after midnight. I've lost a little weight, so it's encouraging.

I've been trying to make it fun. The workout instructor chatter and music isn't my style, so I have my headphones in while I work out. I need to crochet a holder I can put around my neck, because the pants I wear don't have pockets. I stuck it in my waistband this last time, and I don't think my ipod wants to be sweated on. It's old, and I can't afford another one right now. I think about my future better looking self. I hope to the powers that be that it will help with my menstrual cycle. And I hope I become more energetic.

Besides losing weight, I'm hoping that my mood will change and my brain will work a little better. Exercise is supposed to help with depression, but it takes time. The test of this will be if I keep going after another soul-shattering event hits. It's not a matter of if, but when. It's not being a bummer, just realistic. The last time I started an exercise regimen, dad's cancer diagnosis fucked me up. I was doing yoga and cardio, and at about the month mark, bam. Mix that up with a shitty job that included some workplace bullying and Amy lost anything she may have gained. I put on the same yoga DVD and marvel and how stiff I've become.

Do I feel any change yet? A little. I wouldn't say my brain has been upgraded to an eight cylinder, but I feel a little less bad. I give myself peptalks more often. Walking from the far end of the parking lot isn't such a chore, so my stamina is increasing. Sleep seems to be a bit better. I was getting tired really early and wasn't able to watch my video lessons for a bit, but that seems to be getting better. When I do go to sleep it seems more fitful. I remember my dreams a bit more often.

When I can't focus, instead of clicking around a screen waiting for things to happen, I exercise. It doesn't get homework or tutorials done but at least I'm doing something. By doing this I get more than the usual 30 minutes in most days. Which gives me a calorie deficit, which is good. I can have cheat days if I want them.

Diet soda is my friend. Over the last year I'd always go out for a Coke and a think to get away from the toxic house, and it contributed to regaining the weight I'd lost two years before. Not drinking regular soda was actually the easy part of the endeavor. The hard part is not having any support. I hope my imagination and daydreams keep me going. I bought protein bars last night so things are getting serious. Still no blender. Money.

Tonight's Treehouse session was about arrays. I relearned some things I'd forgotten about, like assigning variables using an array method, like var thisArray = thatArray.pop() to assign and remove in one fell swoop. I think I did something like that before. I'm not sure anymore. And I'm rhyming again. I've got one more section in Javascript Foundations to go, then it's on to the next part.

Wednesday, January 14, 2015

Treehouse progress: Variable scope, shadowing and hoisting in JavaScript

I got some more detail on how variable shadowing and hoisting works tonight. I had to watch the videos a couple of times until it clicked, but that's completely okay!

Shadowing: What I took from the video was that two variables can have the same name if one is in the global scope and the other is inside a function. If a function variable is set without the var keyword, it could change the value of the global variable when that function is run.

For example:

var name = "Amy";

function myFunction(){
    name = "Nicole";


The result is that name is changed to "Nicole", because the function variable is pushed up into the global scope.

If you set the variable inside the function with var, however:

var name = "Amy";

function myFunction(){
     var name = "Nicole";


name remains "Amy" because the scope of the second name variable is restricted to inside the function.

Hoisting: Variables declared inside of a function are treated as is they were declared at the top of the function, then assigned on the line where they appear. So this:

function myFunction(){
     var name = "Nicole";


Works the the same as this:

function myFunction(){
  var name;
     name = "Nicole";


Best practice is to declare variables at the top of the function, anyway. That's what I've gleaned from my past learning experiences. That habit is (mostly) ingrained.

Gonna watch more videos and see what other insights I gain.

Sunday, January 11, 2015

How to Layer Background Values to Create a Blending Effect: Some CSS I put Into Practice.

I'm trying to do CSS layout on my own tonight. I'm not going for pretty as much as trying to reinforce what I learned. This page I'm working on now is prettier than the first one, but it's still not mind-blowing.

Instead of stripes of solid color marking off parts of the page, I decided to use try blending the header into the body to add an ethereal look. I learned this in the Treehouse course, but, of course, I didn't write down what they did.

Instead of going back to try find the video where it was mentioned, I looked at the code that I had saved to my hard drive while I was taking the class. I looked at the sample page that had the effect, and looked at the styles in dev tools to figure it out.

I layered the backgrounds properly: linear-gradient first, then the background image (I used a circuit board to be all "techy"), because the first value declared is the top layer. Still had a sharp line, but the problem was that the gradient color and the body background had to be the same. Changed that value.

Still didn't look right. Ah, I need to make the gradient start from the bottom of the header and go up so the same colors met at the transition point. Added 'to top' to my gradient rule. Reloaded and it looks the way I wanted! YAY!

I haven't had a good newbie a-ha moment in what seems like an eternity. I had a problem to solve, and I used the tools at hand to try to find the answer as efficiently as possible. I'm going to write it down in my notebook, just in case it slips my mind again.

Here's a little snapshot of it. I think it looks cool:

Now to get the rest of the page just as stylin'.

Sunday, January 4, 2015

Sh*t that people don't like to read about, aka "That escalated quickly", mild flavor

I've been learning a lot of good stuff in my CSS course. Tonight was a lot of fun, with lessons on shadows and gradients. I added these to my test page and it started to look like a website from the 90s. I was tickled by how easy it was to make something look exceptionally tacky.

I saw where manipulating gradients can produce patterns. I want to play with that a little, and maybe create a couple of interesting backgrounds. I set up a CodePen account just a few minutes ago. I want a little break from the type/save/refresh thing. I have a JSFiddle, but this one's more pretty and seems to be more popular. And they have a job board now. I have to put out all the feelers I can if i want to get some paid work this year.

If I keep cracking at it I'll be on to the programming part of the Front End track. Back to Javascript. It seems that in December I wasn't so active. I think it might just be burnout. I can't say I'm missing it that much. I did some online jQuery courses, but not the little project-based stuff I was doing before.

I want to try to work some regular code exercises into my daily routine. All the things I have to add to the schedule to make the new year a's overwhelming. I guess most people go through this every year, but it seems that not that many come out doing those things on the other end. It's so frustrating that sometimes I think fate is pulling numbers out of a hat to see who reaches their goals and who doesn't. I'm sitting around with the little pull tab all crumpled up in my hands.

Some years my number got close to being called, or called then sent to another line to wait in. Never that bomb-diggity, let me post all this awesome on Instagram and humblebrag until people hate me kind of success. I got through most of Heisig's Remembering the Kanji, I re-learned Intro to Programming and Logic. I learned a dance routine I saw in a video and lost some weight...but then i couldn't find another to learn, and the my fire seemed to go out even though I was still moving around every day. Things start and they suddenly dry up. It's aggravating, and I can't seem to break out of it. I haven't been able to tap into my old childhood "let's focus on this constantly" type of zeal. I'm not sure if  I can remember it, actually. I think I had it?

This is where people say go to your support system, but I don't have one. I need a solution for hermits. My parents' version of encouragement was "Sure, go ahead. We won't give you much emotional support, but we'll buy the stuff to get started (as long as it's not too expensive) and won't stop you." I look back on it and feel like the rat in a maze they watched for amusement. Dad's dead and I avoid talking to mom because a fight happens nearly every time. Damn I'm screwed up.

I don't know how "I want to do more with online code editors" turned into "wow I have no cheerleaders in my life at all" but that's how it turned out. It's not for lack of trying, either. I try to connect with people on Twitter and they just stop. Some of them are more fucked up than me, I dare say. I seem to attract people with avoidant personalities and trust issues. I say that because I share those problems myself, but I try to fight against them by trying to be friendly and open.

The part that hurts is that I seem them blabbing to other people nonstop and I wonder what makes me unsuitable. Am I not worth making a connection to?

Someone that used to be in Twitter list all of a sudden disappeared from it. She was kind of a broken record, but that wasn't that big of an issue. She dumped her twitter name or went private or something, I don't know, but I don't see her tweets anymore. I was hurt even though we never connected. I was still trying to figure out a way of breaking through her daily routine. It never worked. I took her off the list. I'm not following a regular person that doesn't follow me back.

I try, I really fucking do. Being on Twitter is like talking to myself most of the time. Occasionally I get a reply, but I've come to not expect it anymore. I've been tempted to ask a couple of people "Do you trust me at all?" and just be blunt, but I'm afraid it will get even more quiet if I do. Did I find some shit online and think I'm talking shit about them? I just don't know.

But yeah, I want do some CodePens, for sure.