Tuesday, September 30, 2014

Well that's odd...

I seem to be understanding databases better than I thought I would.

The basics, at least. We haven't gotten into any actual programming or creation yet, but I'm doing really well on my homework. I didn't think I was getting it that well, because sometimes the questions are vague and there's no answer key to check against. It seems like I'm guessing at times.

But I'm glad. Knowing how a database works will help me in the future if this web development dream of mine comes true. Maybe I should say when it comes true.

I just have a find a place to use the skill. That part I haven't figured out yet.

Back in Columbus, I thought about doing the DBA program so I could get a job, then learn web development on the side, since the program could be finished in about a year. That was when they were on the quarter system. Ohio switched to semesters recently, I think, and I'm not there anymore. Still, it's tempting. Except for taking the certification exam. And I'm a little worried it might suck up my time. It would be good experience for learning back end development, though. From some of the podcasts I've listened to, a lot of developers don't get databases that well. I guess since a lot of them are coming out of coding camps, they only get the basics and don't get enough time for it to sink in.

I think I might take the second course if I find things are going well. I might have to because the course offerings are so thin.

The web server class is a big ugh for me right now. I think it's one of those half a semester courses, too, which irks me because it's full price to read some stuff I could have read on my own for free. I thought there would be videos or a practice server to log into or something. I have a feeling I won't remember any of this. It's a MS web server class, too. North Carolina seems to be big on .NET stuff, which I've been allergic to since my traumatic Visual Basic class a few years ago.

But yep, database class is going well. May it continue that way.

Sunday, September 28, 2014

What I'm up to today/tonight: Productivity, tech talks and learning Javascript (by example)

I got used Pomodoro again to finish up my DBA homework. Finished in under 50 minutes, which was nice.

It's weird that even though I've known about the basics of the technique (work a while and take regular breaks), but it was always a longer period, like 50 minutes and a 10 minute break. I never thought of shortening the interval, I guess because it seemed like cheating. But with the way my brain seems to work lately, the short bursts seem to be much more effective. Time doesn't seem to drag as much as it usually does.

I think I'm going to be using this productivity technique for more things, including my mturk work, because that's so soul-crushingly tedious anyway. Any positive feedback in my life is always appreciated.

I watched Douglas Crockford's talk on Javascript: The Better Parts tonight. I commented on Twitter that even the topics that I'm not familiar with seem at least partially understandable when he explains them. I wish there were more teachers like that. If I had a dollar for every professor that knew the material so well he couldn't break it down for newbs...I would have spent that money on drinks a long time ago.

Now I'm reading through a Javascript text and typing the example code into the console. I learned something new: When you use a constructor with the new keyword, you get an object style format when you call the variable up to take a look at it. For example:

var fruited = new String('apple');
fruited; //String {0: "a", 1: "p", 2: "p", 3: "l", 4: "e", length: 5, [[PrimitiveValue]]: "apple"}

This didn't happen with new Array(); but the other types I tried gave me the curly braces and key:value pairs format like the code above. It drove the "Almost everything is an object in JavaScript" concept in a little deeper for me. Hope to work in a bit more before I get to sleepy to process any more info.

Saturday, September 27, 2014

WhooHoo! Word Counter is fork tender and done.

I finished up the Count Words code after a time of not wanting to touch it. 

The last part of it was sorting object pairs by value and outputting them. I chose to output to the console (I think I'll be able to change it if/when I want to put the code into a web page). 

I've been hemming and hawing over trying to use time efficiently lately, yet procrastinated on reading up on productivity techniques, until tonight. I read about the Pomodoro Technique. It's short, sweet, and, most importantly, free. I set the timer on my phone for 25 minutes and got to work. Made progress. Took a break, did another 25 minutes. Finished ahead of the timer going off. Made fist and said "Yessssssssss".

It really helped. It really, really helped. I've read about Get Things Done and other methods but could never get it started. 

Here's what I learned from this trial coding experience:

  1. When something doesn't work as it should, just throw stuff at it until it does. I found out my function to strip out the punctuation wasn't working when I tried a string with some !!! and ... in it. It would leave one mark behind. After staring at it for a while and bracing for another stoppage, I looked at the documentation for the splice method, and learned to use the extended parameters. It works a lot better. Sometimes I get seized up by the fear of being wrong again, which stops me from trying anything at all. I pushed that fear aside. It's not like anyone's looking. It's me sitting in a chair by myself in my bedroom. Fuck it.
  2. I learned how to sort an object. Since Javascript objects aren't guaranteed to iterate in the same order each time, I had to put each pair into an array. Then they needed to be sorted by the number value. This involved writing a comparison function to to get each word/number pair into ascending order. Then I reversed it so the highest counts were at the top. 
  3. More faith in my ability to work things out. I was panicking for a while there, but I worked my way out of it. I'm just hard-headed.
  4. Writing more modular code. Since I separated some of the processes into separate functions, I have some reusable code that might be useful later. A "remove punctuation" function and a "sort object by value" function. Separately I messed with making some random number functions. I'm going to stick them in a separate folder so I don't lose track of them.
I did break my rule about "When stuck, do something else for a while" in a roundabout way. Instead of jumping on another project on the learnhowtoprogram site, I started reading bits of books and listening to the Javascript Jabber podcast instead. Part of it was to expand my knowledge in the hopes that the answer would come from it, part of it was just wanting a break from staring at code and not knowing what to do next. I spent some of the time doiing mturk tasks for money (which I need) and exercising (which I also need). And part of it doing fun things and trying to talk to people online for brief periods, which I also need even though I felt a little guilty about not doing "real work". 

The countWords code is here if you would like to look at it. I will try to refactor it at some point, but right now I'm glad it's done.

Wednesday, September 24, 2014

Some real talk about life outside of learning to code (and how yucky it is)

I haven't posted in a good while. Regular life has been catching up to me a bit. Family rattling my nerves something fierce. Me just getting sick of it and wanting to hide under the covers. I've been exercising when I couldn't focus on the computer screen. It's fall and it's getting dark early and a little colder. I'm fully expecting a heat wave rebound in the near future. It never lets you off the hook, at least where I live.

I've been reading things, but not a lot of coding has been going on. That past couple of days have made me wish that my Javascript knowledge was at the level needed to demand some money. Meaning, I want away from here so badly.

I've been feeling down. I used up the last of my "worked through a coding problem" juice and I have to find some more. I've been thinking about life off screen more, and it's just depressing. Wondering when things will make sense and life will take a turn. Worrying about money, of course. There's always money to worry about, it seems.

Almost a year after I applied for insurance through healthcare.gov, I get a letter in the mail a week and half ago about an appeal. The way it was ran was sloppy at best and in the end, they make me do an application over the phone again. They did this before, and the same result came back as the first time: Tough shit, but you live in a red state that hasn't expanded Medicaid, so stay in that crack you've fallen into." You think they'd know this by looking at my address.

Now I wait for the judge to send a verdict in the mail. Not holding out for the golden letter that says "Hey, we're going to help you out." They can't because they didn't really make it the law of the land, they gave each state a choice, and some decided to not opt in. Granted, Ohio did the same thing and I'd be SOL there as well. I'm glad some people have been helped by the ACA, but I wish it had been applied evenly across the country. There's a lot of people that can't get help out there still. Unless I can find a job somewhere, I remain one of them.

I try to look for jobs that will let me go to school and make enough money to get my mom off my back, but I'm not having much luck. I've increased my mturk earnings somewhat, but I think I'm going to have to sink more hours into it to get what I need to make things a little smoother. But that requires energy and a steady internet connection, something I haven't had since I moved down here.

That plus a dysfunctional relationship with my mother (who I have the bad, bad luck to live with) and a lack of a support system make pursuing this goal of mine difficult. Zero support system except for the pep squad in my mind.  When I'm out of it, they can't cheer.

That's all I have for tonight. Maybe something better will come in the next post.

Wednesday, September 17, 2014

HP restored!

Sometimes it takes some outside intervention to make progress.

I went on my new Twitter account and asked for help with my word counting code. The first person that followed me, Cory, said I should step through the code bit by bit. I was trying to do that, but for whatever reason it wasn't working.

That was two days ago. Tonight I made some significant progress. I'm happy! I have a bug that needs to be worked through. I noticed that if I have some overzealous punctuation, like "???" or "...", the punctuation function doesn't strip all of the marks. With "???" it leaves one "?", and with "..." it leaves "..". I just happened to try this out when I was about ready to stick a fork in this thing, and boom. Fix one thing, find something else to fix.

Overall, I am crazy happy. I am also really happy to be almost done with it. No lingering love for this project. Except for the love of learning *cue thoughtful music*.

Learning moments!

Thursday, September 11, 2014

Chugging along, slowly.

Hitting the JavaScript books again, working my way around this low point. 

I'm going through examples in the book about DOM manipulation and it's in vanilla JavaScript. It feels really clunky, because my other lessons involve using JQuery for the page interaction bits and plain JS for the meat of the code.

It's going to be a long night.

Tuesday, September 9, 2014

Coding lest I forget.

I was planning on getting some homework out of the way Monday night (the internet is throttled again so I have to wait until midnight to upload anything, like homework), but I was really itching to code something. I was feeling a little better and had gotten some sleep, and without the burden of wasting an afternoon going to and from school, I wanted to do code something in spite of those two lingering programming problems I'm having.

Also, I had a scary thought run through my head as I was getting gas.

"You could just stop and forget all of this."

It just came out of the nowhere. I was thinking about when the pump was going to stop and looking forward to drinking my sugary beverage. About if I would be awake for my grandfather's birthday after being down the self-study rabbit hole all damn summer. If my cramps were going to come back tonight or not.

The coding hassles I've had recently were actually in the back of my mind for once. I don't know if saying I gave up on them is the right way to say it, but that it's "That's the way it is and I have to do something else in the meantime". Hitting the search engine only to bring up the same non-helpful stuff each time is not going to help this.

The inner voice thing upset me, to say the least. I don't like having to fight myself. Things have been low, but I don't want another incomplete task on my conscience. It also reminded me of some of the negative things my mom likes to drop on me semi-regularly. Damn, it's like she paid for advertising space inside my head.

On to the programming part.

I went looking for a coding challenge Sunday night and saved it for when I wasn't feeling so sick. It was from Reddit's Daily Programmer challenge, the Easy category, of course. The task was to write a program that would compare two strings and remove any characters that matched both strings. It took a little longer than I thought, because I tried using BDD while I wrote it, and the tests I was making kept failing. I was looking at Chai documentation trying to figure out what to change, but the help is on the sparse side. I'm missing something. I tried looking for a tutorial and they're all to do with Node.js.

I finally thought "forget it I'm just going to write it". After a long late night fangirl session on Twitter (which I needed; people are either not around or gathering into their cliques and I don't feel like I'm invited, so I haven't been trying to chat much lately) I got down to typing and got everything working well. The function works, I just need to throw together some HTML and jQuery for it (or not; I could post it to github as is).

Here's what I learned from it:

  1. Nested iterations. I've done some nested for loops before but it's been a while. It was nice to use it again and really get how it works. I'll be commenting the heck out of the code anyway just so I don't forget.
  2. That splitting a string into a character array counts the spaces and puncuation, too. I just needed to confirm that fact. It brings up another question, though: How to filter out punctuation if you need to. Do you have to loop through it more than once to remove what needs removing? Part of me thinks there's some ultra elegant and clever way to do this that I haven't found yet, but another part of me thinks "that's probably exactly what you have to do". Another coding challenge to take on...
  3. I really have to learn how to use testing frameworks better. Either figure Mocha/Chai out or switch to a different one. There's books on Jasmine so I was considering that.
It was nice to get a challenge done. I'm hoping the more I do, the more it will help me in figuring out the stuff I'm stuck on.

I started reading Javascript: The Good Parts but I took a break. It will be open again when I get up.

It was really fun chatting tonight. That's probably what I'm getting out of this late night study session most of all.

Thursday, September 4, 2014

Get my learning on, every day

I just finished some resistance band exercises, and suffered through a combination foot/ankle cramp. But now I can walk to the computer without wondering if I need to go to the hospital.

I found a nice list of JavaScript learning resources from Jennifer Mann, many of them free, many that have been on my list! It's about time I get to some of them, because I'm treading water so much lately:

I was writing out pseudocode for my latest JavaScript assignment, on paper. It did bring some things to light, and I thought about that Udacity course I took where you were supposed to build a search engine in Python. I think I can do the same thing without resorting to making an array, but I have to figure out how. Since I felt like I've brainstormed enough, I went searching for a similar problem, and found a lot of regular expression stuff and "search text for this particular word" type of thing, but not one that takes the search term out of the text itself. I'm also wondering how to filter out punctuation. But that can come at the end.

This also popped up in the above link in the comments section. I think this might be a listening and reading night instead of a coding night.  I had a crappy day and I need to absorb knowledge. Amy needs to grok like yesterday:

I'd also like to rot my brain on a movie or some television. I just want to be entertained.

Wednesday, September 3, 2014

Is the grass greener on the other side? How web developers look to a broke chick in the country.

There's one thing that I've noticed about web developers that has drawn me in and makes me keep working towards this goal.

They seem like a pretty happy bunch.

The guy that developed JQuery, his Twitter is full of everything but computers stuff. He talks about ukiyo-e (beautiful Japanese woodblock prints) and geeks out on all sorts of nifty stuff. Devs are talking about traveling and eating and drinking with friends. Work's not the only thing, and work's not getting them down.

In my life, I've never known anyone that really loves their jobs. The concept was(still is, really) a foreign one to me. I don't really know people that have a career; they just have a job. It keeps a roof over their head and food in the fridge. I have a college degree, which was supposed to be the way to a "good life", and still all I've had are jobs. I don't even think those four years even register with people when I put it on my resume. I call them "fuck this" jobs because that's what pops into your head eventually when you've been at one long enough. If you get fired or laid off it seems like a relief for a short while, until you realize you need money and the process starts again.

Even though the devs I see don't talk about their salaries, they seem to be comfortable. Their job frees them up to do the things they like. Many of them are eating right and staying in shape. They seem so well-rounded and complete. At the very least they're not worrying about work that much. They have the cash for dual monitors and macbooks and other shiny gadgets.

Some of it might be work hard, play hard and they're not airing the rough parts very much, but to me it seems like they're living a dream, or my favorite metaphor, I'm looking up at heaven from Purgatory and longing to be there.

The devs that work at an office are forever talking about beer in the fridge, and food being catered in. This might be because they work long hours and the incentives are so they don't leave, but wow. I've read other people's day in the life accounts and they start fairly late, with lots of mental health breaks, reading RSS feeds and email checking. They get to dress causally. There's telecommute options. Even if the hours are a little long, it seems a nice way to spend a day.

They're always getting job offers. It's like they're living on another planet. We're in a recession and these people are job hopping without anyone raising an eyebrow. Hell, they're expected to go for the gold. Even the freelancers seem to not lack for work. They're always hustling for it, but they seem to have plenty of clients to choose from.

I want to be like that. Happy, doing stimulating work, having money to support myself and have some fun, pursue my other interests and not dread going to work. That's what I want for myself. That is why I want to become a web developer.

Improvments and need for improvement

I found a really fun way to learn CSS selectors.

CSS Diner - Where we feast on CSS selectors!

The graphics are cute, the print is nice and large and it's fun. I went through it last night after a long night of trying to code and not getting very far. I think if I work through it multiple times the some of it will stick.

I'm trying to look back at myself and see if there has been any progress. I guess there is but I can't quantify it very well.

  1. I'm getting better at breaking down a problem into smaller, simpler parts that I can apply my limited skillset to. Not perfect, but it's getting better. 
  2. My "stuck" periods are getting a little shorter, but it's still painful. It could be dumb luck, but I've noticed it and hoping that it means I'm working a little more efficiently.
  3. I finally worked out the nested if statements. 
  4. I'm better at knowing where to stick a return statement in a function and why I need it.
  5. I can link a script to a web page better than before. It's mostly grabbing ID tags, but I'm doing it. 
  6. JQuery - I'm actually using it. 
  7. I stopped using ++ as an increment.
  8. I'm using CSS frameworks to speed the process up, even though it's a little boring. I'm event customizing Bootstrap a little bit.
  9. I'm getting better at looking through Stack Overflow without getting overwhelmed.
  10. My debugging skills are improving.
  11. Decrements when working with arrays are my new friends!
 There's some things that I want to work on in the short term, of course:

  • Memorize some JS/JQuery methods so I don't have to refer to a reference as much.
    • I want to learn the details of the string and array methods, esp which array methods change array length, because that trips me up and I have to read something and come back to my work.
    • I want to get string and array processing methods down.
  • Memorize some text editor shortcuts. I want to use the mouse less,but so far the only thing I can do by heart is comment out code.
  • Whiteboarding. When I write up HTML I tend to have to stick an ID somewhere after I think I'm done, or remove one that I thought I needed. I want to be able to plan out what I need ahead of time to reduce the back and forth and possible errors this could cause.
  • I want to use a while loop for something so I get used to it. The coin problem code I found used a while loop, and I realized I haven't used it for anything.
  • Write better pseudocode. When I was at CSCC, my teacher said you should write your pseudocode out before you even open your code editor. I've recently gotten back into the habit, but I want to be able to at least get some of my actual code from it.
  • Understand OOP and MVC. These night not happen for a while, but I know I need to grok these fully so I can make a living.
  • Be able to explain web dev concepts out loud. I will need this skill to get through interviews. I need to learn the lingo.
  • Get some projects up on my free hosting page. I've been working so hard on the projects that I haven't done the site to show them on yet! I was planning a redo of the class project I did, but I'm thinking total overhaul is the order of the day.
  • Make some connections online. I need all the help I can get.
That's my short list. They're about even, which makes me happy. 

Getting a taste of success from another plate, and school ain't what it used to be.

I've been in full "I suck" mode this past week or so, but I recognized it and knew I had to do something to break up my funk a little bit so I don't give up.

I decided to jump up to the next project in the list to see if I could code other things and let the problem code simmer in the back of my mind. I'm hoping by doing this I get a breakthrough at some point. Maybe I'll learn something I can take back to the previous problem. Also, I don't want to get stuck on one thing and stall, like the address book problem I had at the start of the summer.

Anagram checker works for comparing two words. I need to get it working for a string of words like the initial problem stated. I started the project this way, but it wasn't going well, so I've counted the two word problem as a success, even if it's a small one. I was trying to go to CodeWars to do something, but when I log in the challenges won't start up when I click on them.

I went to the coin change problem, making change with the fewest amount of coins. I'm still trying to figure out how to drop through the different coins. It's to the point where I have the code show a message "You have X cents left over" after it wears out the quarters. 

I found a very elegant solution to the problem online, but until I understand it, I want to try to solve this with my own beginner crappy coding powers that I CAN understand. I'm using quarters, dimes, nickels and pennies. No 50 cent pieces because they don't come up much any more. Stuck again, wanted to cry but didn't get a headache. Moving on.

I saw a code challenge that involved reversing a string with the words in place, so the sentence comes out with the same order but the words are backwards. I took a deep breath and started simple with one word, went to bed. Just finished it tonight. Finally, I got something to work!

What I learned from that project: when you push to an empty array, you don't have to reassign it again, just array.push(). It throws up a console error if you try myarray = myarray.push(). 

I didn't run tests on it though. I could've, I should've for practice, but at this point I just wanted a victory. I have to make a page and link the code to it, but it can be done later. I just want to bask in this a while.

And I have to do my homework for the week. I at least got a quiz done in my database class today, but I need to get my web server reading done and take the test for it. I want all of it done by the end of the week so I can code over the weekend without anything hanging over my head.

I want to work ahead but javascript is running my life a little too much. I freaking dreamt about the problem I was working on last night. It didn't give me a freaking answer but I sure as heck dreamt about it.

I don't know if that's good or if I should take a break.

I don't know if  I'll continue the twice weekly run to school thing. The computer lab is small and kind of  awful. The keyboard tray sets too low and I have to back up my chair to type. The networking room has nice PCs but the door is locked if there's not a class. It's not worth the fuel.

I've only seen one guy from my networking class, and he sat in the back and I never talked to him. It's not a friendly place at all. I think I'll take my chances at home.

I'll go Thursday and see how I feel after that. I'll have to structure my time and hope my internet cap isn't reached so I can upload my homework during the day, because one teacher wants the stuff in her inbox by 5pm, meaning I have to get stuff done the night before to be on the safe side.

But hey, I got the code to work. That's all I'm giving fucks about tonight.