Sunday, August 31, 2014

I ate something, I tried to hang out and get my mind off of coding. I kept slipping up and forcing myself to not think about it, which made me more irritable.

I came home, did about 20 minutes of guided meditation (which I'd been slacking on badly) instead of the usual 10 and my headache finally started to subside. Then after listening to some audiobook I got back in front of the computer again.

I got the code working as far as comparing two words to see if they match up. That's something. I had forgotten about splitting a string up by character and sticking it in an array. It's not something I'd used much in the past couple of months. All the exercises I've done had been with math. Note to self: do more string manipulation  exercises so this torture doesn't happen again.

Baby steps, dammit.

Saturday, August 30, 2014

I started planning out this anagram code and after I got my tests to pass, I rewrote the code. Over two hours later I'm back at square one because it doesn't grab all the matches.

I wish this would quit happening, my inability to think through a problem in a decent amount of time. I don't know how long I should be taking on these things, but it seems like it's too long. I'm either making things hard on myself for something else is wrong.

I don't know which it is. Maybe I didn't eat enough and it's causing the headache I have. I really don't know.

I thought I was making good progress at the start, too, with the tests coming out okay. I thought I just had to refactor around the two basic concepts, the length of two words and the letters contained in those two words all matching. But it went horribly wrong.

I think I need to get out of pain and come back when I feel better. The thing I worry about is that a company doesn't care how you feel and just wants the work done. I need to do this stuff like breathing if I expect to get work, don't I?

I don't know. I just don't know.

Friday, August 29, 2014

The site Creative Bloq had a couple of interesting articles up that I wanted to look at later.

5 ways to be a better frontend web developer

This article listed some useful sites and things to keep in mind. I looked at the Bourbon site and it made me interested in learning more about SASS. The Refills look really handy. 

Plus I love their icons. I'm such a shallow person for being impressed by looks!


I have not studied mobile-specific development yet, but I know it's going to be a thing if I want to do this for a living. I mention this article because it mentions things I want to know how to implement, like making a phone widget that lets you use the app that way instead of launching from an icon.

Taking a chill pill tonight.

Got my homework done for the week and now I'm trying to learn some new CSS and solidify what I already know.

I reviewed some selectors I haven't used very often, like descendant, adjacent and first-child, so that was a nice refresher. I've only used those once in my web page class, but that stylesheet was insanely busy, mostly because I was doing it from scratch, going back and throwing in another class or id when I needed it.

It's going to be a quiet night. There's the anagram coding assignment I could be working on, but I think my head needs a little break. I need to get all 3 of the web development foundations down, and this is a chance to level up an area I've been neglecting. And one that I really like. I really want to be able to style a page from scratch and mostly memory before I start on LESS or SASS.

So everything doesn't look Bootstrap-fabulous.

Plus with that knowledge maybe I can tweak Bootstrap or whatever framework I get into more.


Thursday, August 28, 2014

I got my Title Case generator to work, passing all the tests i could think of. Looking back on it, it was easy, but I was too tired to process the solution for a couple of days after I found it.

I found the answer Sunday night or Monday morning, don't remember. Emailed it to myself just to be safe.

Had it sitting in front of me and my brain went "NO! I'm not trying to wrap my head around this right now! I want a rest!"

This is probably the second time I found something on Stack Overflow I could use (the first time was what BootStrap CSS rules to edit when customizing the buttons, which I copy/pasted with glee).

I thought I was going to have to find the right reference that told me what each property did in detail, probably Javascript the Definitive Guide or something similar, and I was going to have to toy with the code till it worked. I figured it was the shift method I was using, but wasn't sure how I fix the issue. I got lucky and worded my search just right and got my answer:

Just decrement the counter variable in the body of your for loop.

Really? I thought I was going to have to write the loop backwards, but no, just add i-=1 after what needs doing. And it works. The shift method was my problem.

I felt so good after that, you don't understand. Once that was done I handled the mixed case and call caps test in the blink of an eye (toLowerCase, bitches) and the resetting of the form field after each use (because it wasn't and I wanted it to).

I had a fever yesterday so I haven't messed with code since Tuesday. I will pick it up tonight, after I read up about these web servers and such.

I can also say I use +=/-= because "Crockford does it" and mean it. I saw it in a presentation of his. I'll miss you, ++ and --. I wish all bad habits were so easy to break.

Tuesday, August 26, 2014

Off to a good start! *crazy laugh*

Working on the Title Case project, and one day I got the first test to pass, then the next day the second test broke the first test. I messed with it for two days. I started over with a clean slate and my loop only went through part of the sentence.

I found out that the length of the array I stuck the sentence into was changing every time I got to the top of the loop. So, I need to confirm which methods change the length and which don't, then code accordingly.

After a day of trying to start over with this, again, I finally got a single word going to title case again. This time without converting to an array. So I will use that for the first part of a conditional branch, so I'm not doing anything I don't have to, like switching to an array and back to a string for one word.

Hopefully that works. I was late on a homework assignment for database class because this weekend was sleeping and javascript, and they had me sitting around waiting for my online course access login until the day before the junk was due. I'm not sure why they can't put the stuff up the week before class starts, so you can at least look at the stuff. Otherwise I'd be ahead or just where I need to be. It does look like it's an SQL course, so that's good.

Whatever. I'm going to school tomorrow and will try to do as much of the next assignment as I can. Hopefully I get it done and work on other things. I'll have something to do this time, unlike last week where it was trying to find stuff on Blackboard (I don't remember Bb being so..unorganized) and doing my own thing.

Start this semester right!

Sunday, August 24, 2014

Testing Stress, Come On!

I started on the next BDD problem, the queen attack, and got stuck. I found the math I needed for the problem, but my tests only passed with weird examples.It always expects false, so if you write a true statement you have to put a false example in to get it to pass. Or something. I'm writing from memory here.

It ended up working, but not in the way I wanted it to work. I wanted to specify the type of attack, but it wasn't letting me. I probably just needed to hide some text and show it to get what I want, but I was exasperated and tired by the time I got to the actual web page. I'll try it again at some other point.

I'm not sure what I'm doing wrong. The example given had a lot of true statements in it and ran fine. I need find find some reference material to help me, I think.

I decided to put that aside and did the triangle problem. Put in three lengths and see what you get. This one only worked right if you put the oddball case as the first conditional. A triangle is not viable if one side is longer than the length of the other two sides combined. I had this at the end and it wasn't catching it (it was marking them as isosceles for some reason), so I made it the first if instead of the last. It works fine now.

Testing, amirite?

I do see where it helps, but when you do something non intuitive to get the test to pass like I mentioned above, it makes me feel uneasy. I don't know if I'm taking advantage of some bug in the framework or if that's what's really supposed to happen. It could be a syntax thing. It wasn't explained in the tutorial, so I might find just what I need in the documentation. I found some testing articles to drill through, preferably with a tasty cup of coffee.

The blog title was inspired by this video. No, they are not being serious. Yes it has English subtitles. It's parody for a TV show. Fake group, like Spinal Tap ultra lite:


Bless all the little boybands, bless them.

Friday, August 22, 2014

I decided to get some sleep. Well, my body did.

It turned out to be a good thing, because I just finished my first test driven development project!

I worked on the leap year calculator on Epicodus. I watched the video again, and wrote out the specs that were given. Then I had to add an extra condition and fix a display bug.

I chained together some jquery methods without looking at the documentation! I had it pulled up, but then I said "eh, let's try this" and it worked! The code still passes the tests after that as well.

Here's the code:

https://github.com/amyruth/leap-year

I'm adding more steps to my process, but I feel good about it. It's how the professionals get things done. Not code springing fully formed like Athena coming out of Zeus' skull, but bit by bit. I need to do more. And possibly read some documentation.

And do my class readings.

Yay!

Thursday, August 21, 2014

Inertia, scattered

It's 4:30 in the afternoon and I don't want to do computer things.

I probably should. I didn't get a lot done at school except for download a bunch of class materials to read later (I'm not wasting my stingy home bandwidth on it) and I found a tiny, extra simple code challenge to do. I read part of an article on best practices, and watched an Epicodus video on test driven development. I'm going to have to watch it again, I know, and learn how to run the testing software and write specs properly. It's the stuff I've had a hard time finding online in a form my baby brain can understand. And it's video. I'm glad I found the site when I did.

It's too hot to drive into town in my AC-less sealed up greehouse on wheels. I've been pretty scattered all day, despite having the best night's sleep I've had all summer last night. I'm not in school mode yet, I guess. I feel like I could drink a few energy drinks and still not have focus. I just want to space out on TV and listen to audio books. For a few months.

My brain tells me to just do something, but my body doesn't move. It's one of those damn days. Again.

Sunday, August 17, 2014

One of those damn coding days again

I was tired, but not that tired. I'm going through the sleep cycle reset thing before school starts, so I've been awake a little longer than I have been. Figured I would use the daylight wisely and working some jquery/js practice. I said "dammit, Imma gonna work some nested ifs into this and finally understand them today, dag nabbit!" (I only talk like Yosemite Sam when I haven't slept in a while, and then only in my head).

I sit down to do this branching decision thing from Epicodus. Of course crap doesn't work like I think it's going to, so I start over with clean files. I write down what I want to do, and in what order:

  1. Get the content on the page;
  2. Make it functional
  3. Make it look good ONLY after the page is functional
Since I'm the kind of person that will spend way too much time trying to get the layout to look right (which I did with the files I scrapped) I decided to leave that alone because it's not the most important thing. Even though I'm using Bootstrap still, there's a lot of classes I haven't memorized, and looking through the docs takes a decent chunk of time to make something look so obviously like Bootstrap. You know that look.

Anyhow, I thought I had the age comparison I was doing down. I've done it before and never had a problem:

  • age <= 20;
  • 21<=age<=40; (age is greater than  or equal to 21 but less than or equal to 40; 21-40 range)
  • age>=41
I'd done the age range thing before without a hitch, but it didn't work here. I never got to my third branch. Better than things not displaying at all, but still. I spent long time messing with this. I stuck alerts in to see where I got stuck (which was good debugging practice, but AAAAH!), I turned the operators around and they semi-worked, then broke again. I was getting that "I'm an idiot" record playing in my head again. I thought my cache doing something, but I cleared it and when the developer tools are up the cache is disabled. I was doing a lot of staring at computer, flopping on the bed to mull things over.

Finally, something in my head said "maybe if you split it with &&". So I typed:

(age >= 20 && age <=40)

And the damn thing worked. I don't know why, and if someone sees that they're going to ask me why I didn't write it the shorthand way, and I'm not going to be able to explain it. I have no clue what's wrong. I'm probably going to be scared to write these comparisons out the usual way ever again. 

People are going to think I'm dumb. This is the path my head likes to follow. I don't know if it's fatigue or just generally being in an iffy mood. But why can't things do what they're supposed to?

But somehow, through all this crap, I nested multiple if branches properly. I've been trying to figure out how people do that like it's nothing for months, and it happened just now. I'll probably completely forget all this in the morning (or whenever I wake up) but I did it. 

It went three deep, which seems like it could be too much, but I've seen a couple of tutorials do this code version of nesting dolls and it's always been hard to follow. I've tried to explain it to myself through comments and I always struggle when I get back to it. But I did one!

I wish I could share my joy with someone, but thems the breaks.

Time to rest. The hard part of that project is done.


Well, school starts Monday. 

Yeah, about that...I need to find a new one. I'm sure I mentioned it before, but it needs to be high on the list of things to do the next four months or so.

I just read an upsetting story about how this place I go to suspended a student for saying something critical about them online. I knew the place was a dump but it's a sensitive dump too. Overly so. That plus budget cuts means I need to move on. I'm not going there out of the goodness of my heart. Read some other stories about another NC community college that made me sad, and this one was in the "big city".

Figures I'd be in a state that is one of the worst when it comes to paying teachers. This state doesn't seem conducive to learning unless you're rich. It's a black hole, a big, empty hole. Can't even find a decent library or bookstore in the general area (which means driving to multiple towns, because it's the country). The bookstore in town is full of old books. I love old books, but it's not suiting my needs right now.

I don't think I've mentioned the place by name yet. I did a search, nothing came up. If I did, screw it. It's not like it's a privilege to attend the place anyway. 

What I'm hoping is that I can find another place to take online classes from, and if it's a state CC, see if I can use the school computer lab in town when I need better internet service through some sort of inter-school agreement. They're both state schools right?

I bet I'll ask about that and the staff will scratch their heads like no one's ever, ever mentioned the idea before. Just like taking English composition and literature didn't count as English composition, and the web dev instructor had no idea of any web dev opportunities in the area. 

I'M LOVING IT!!!

The sun's coming up, I'm awake, so I'm going to go and get something to eat. I found a ten in my wallet that I've been carting around for months. It's begging to be broken. 

Much like my will.


Friday, August 15, 2014

Just enough jquery to be dangerous

The past couple of weeks, Bootstrap and jquery have been my life. My computer life, anyway.

While going through the Epicodus lessons I have gotten the jquery refresher I needed. The lessons have been really practical, which I am appreciating. I don't want to do anything fancy, just add interactivity.

I was inspired to go back to my idea of a task list web page that's been getting dusty because I hadn't learned any basic DOM manipulation yet. I got that little bit of jquery and ran with it. I opened the files up yesterday and stared at them for a bit and then started revamping the thing. I replaced the stylesheet with Bootstrap, which gave me the basic look I wanted a lot faster. I was looking at my old .css file and thinking "Look at all this!" It seems so long and unnecessarily fiddly now. Not that the bootstrap css isn't, but I only had to pull a few class names out of it to get things the way I wanted it AND it's responsive. I did some style overrides in my own stylesheet to get the colors I wanted. That's all I'm going to do for now. I wanted to work on the functionality.

It took me two nights, tonight included to get the input from the form into the list area. I have the input saved as a variable, I needed to figure out that I could concatenate the html tag I was adding with the variable so the text actually shows up. So instead of:

.append('<tag>inputVariable</tag>');

I type:

.append('<tag>' + inputVariable + '</tag>');

I feel pretty good about it.

I forgot how to use GitHub because I had nothing worth pushing. But I jogged my memory with this handy site:

git - the simple guide

That's all I'm going to do on that project for now. I need to soak up some more lessons. Stuff is starting to click now bit by bit. My days in The Dip are numbered, I hope.

ETA: Shortly after writing this I learned yet ANOTHER handy method and even figured out a functionality problem on my own! On fiyah I am! It's about as happy as I can get right now.

Friday, August 8, 2014

I worked out a lot today

I think I did about an hour of exercise today. I did a 25 minute belly dance video that I found on youtube, and at the end I was feeling pretty warm and limber. I thought, "I could do some more. Oh yeah, gotta do my resistance training." so I did this lovely FitnessBlender 16 minute bicep and tricep workout:

Bicep & Tricep Super Set Workout - Resistance Band Exercises


I slacked on this (I think I missed two days in a row for no good reason) so I was feeling it. Finally I did some low impact cardio until I thought I was getting ready to wear out. Then I did some stretches and that was it.

I haven't worked out that long since I wanted to learn a kpop dance a couple of years ago, when I first moved to NC. I lost a lot of weight that month because it was fun and I was determined (and literally didn't have anything else to do). That was in the creepy old house with the snake in it. I was looking for a new dance to learn but never found one. Instead I learned bits and pieces of choreo.

Since then, I've lived in places with less and less floor space and privacy. I'm not the kind of person to learn a dance in front of people, especially judgy family members. That and I'm not that comfortable jumping, because I feel like a lead weight. I used to do that stuff often, and I want to get back to not being so damned self-conscious.

I was working out because I could not concentrate on computer stuff. I decided at some point if I can't concentrate on one thing I need to switch it up and do something else to use my time effectively. When I first moved to NC, I thought that I could use the isolation to go convent style and structure my day with studying. But I was too depressed.

These days, I'm still out of it but I think "Well, fuck, I don't have anything else to do. I can't sleep 24 hours a day. I need to use this time to better myself like I promised!" So bit by bit, I think I'm doing it. I just hope some bombshell doesn't fall out of the sky to interrupt me just when I'm getting in the habit. It's happened before and I've lost a good bit of precious time.

Just so you don't think it was something petty, the first big interruption was my dad's cancer diagnosis. I had been working out for about a month and feeling better, even though I wasn't seeing any changes, but that sucked the life out of me. Moving here was another. There's a few more, but I've shared enough, I think.

I need to put an hour in at Gym Bedroom regularly.

I am afraid I'm going to be screaming in pain when I get up, but eh. I need fitness, darnit.


Currently messing with Bootstrap again. I got an email that my free hosting needed to be renewed, and I thought that I would download my school project site and redo with Bootstrap. I'm watching a Youtube video to try to get some shortcuts on the classes I need to get things looking the way I want. It's a two column layout with a header, and so far I have rearranged the nav bar, the header is a jumbotron and I have the two columns, but it's still mad ugly. I skipped the col-xs on the page because on a phone that's just going to be too teeny, and the stackup doesn't look bad in that case.

I'm watching/listening to the video in the hopes of getting some of the info I need a little quicker. I've gotten some good tips already. Later on, it's back to JS and all the fun it contains.

Saturday, August 2, 2014

Remodeling a page

I've been looking over an old HTML file I wrote for practice sometime last year.

It had a serious case of divitis, so I was taking those out. The old style sheet was really busy, too, so I'm starting over. It's not centered or anything yet, but it looks nice.

I'm writing my own stylesheet first, then I'm going to apply Bootstrap to it and play around with that.

It's nice to be able to revisit something and not be completely bored out of your mind with it.

Get money.

I looked at my bank account and cried a little bit this week. I'm trying to think of ways to get more cash to fund my Get Out of Dodge (G.O.D) operation.

Because writing on mturk ain't cutting it and the stuff I see on Textbroker makes me scratch my head, meaning the directions are convoluted. It must be people trying to game the SEO system still. I was hoping there would be less bs there than on mturk, but it doesn't look like it. I'll dig into again soon. Maybe I'm not searching the right way.

Back to the subject.

I'd read somewhere that doing PSD to HTML conversion is a good way to make side money. I'm thinking if I can get my CSS skills up to snuff I can try to do that as freelance work. Then I can afford new equipment and educational resources, as well as not making buying a sandwich at the grocery store a monumental decision and making country living a smidge more bearable comfortable.

I've forgotten what treating myself is like. I buy a sugary beverage (read: large soda or occasional coffee drink) and I agonize over it. Because I have to do mturk tasks for chump change, a LOT of them, to cover it. I want to be able to buy new clothes when I need them. Hell, I want to be able to buy gas. I see people on Twitter talking about all the retail therapy they're doing and I want to tear my hair out. They're stuck in a damn rut, too, but at least they have money.

I want to maybe save up enough to buy out this shitty Exede internet contract and get some non-sucky internet service in this house. Or at least buy an extra (overpriced as hell) gig of bandwidth if I'm in a bind. And a laptop stand and an external keyboard. Maybe even a MECHANICAL keyboard! Maybe get a donut with my freakin' coffee. A donut.

My idea of luxury is so low level. I want to jump off of something some days. Many days.

But that seems to be something to aim for. Learn how to accurately slice images, make a command cheatsheet, and rebuild everything on the browser. It would also be work experience. I don't know how much it's going to take to get my CSS skills past amateur level, so I don't have to look everything up, but I'm hoping by the end of the year I can find a gig.

And go from there.


Resources, so many resources!

I discovered a new website for placeholder images.

http://lorempixel.com/

I didn't know this existed, but it will come in handy when I work up some mock websites or do homework. You even have a choice of subject matter, so if you're doing a cooking site you can pick food pictures, for example. You can either generate a single placeholder image or use it like a cdn (it gives you a link to paste into your code). The linked images change whenever the page is reloaded.

I can use this with my incredibly childish Cupcake Ipsum text to make pages full of unicorns and pastel colors.

Cupcake Ipsum is fun.

I also started going through the free online Epicodus dev bootcamp course at learnhowtoprogram.com. I had this site bookmarked on my phone for maybe a month now(?) but hadn't gone into it too much because I wasn't sure about it. I had not read much about the site, and had no idea it was linked to a bootcamp at all.

The other day Joshua Kemp, the blacksmith turned developer guy mentioned it and said that he had it from good authority that Epicodus is one of the best bootcamps out there and that he was going to go through the whole thing. So I said "Hey, why the heck not? It's not like I'm going to get a chance at dev bootcamp any time soon."

I am also starting from the beginning. This is the HTML and CSS part, which I'm familiar with, but I'm typing things up anyway and watching the videos for useful tips. Tonight I was watching the videos about layout and how to make columns and the instructor made it really easy. I hope the rest of the course gives me the same feeling of hope, especially when it gets into unfamiliar territory. The course goes into databases and Ruby on Rails, very full stack-like. The in-person class is 4 months long going full tilt at 40 hours of classes a week, coding all day. I don't think I can get through it that quickly, but I'll do my best. Must be a sign to keep going that this came up when I'm in the dumps, right?

It's everything but the teacher and the camaraderie. Sigh, the story of my life lately.

Also..

I also saw that Treehouse has discounts for college students if you email them the appropriate documentation. That makes is a lot cheaper than before. It would help with the lack of relevant classes being offered in my area. If I decide to start that I can get some instructor guidance, which would be nice.

I haven't been working on the javascript MVC example code tonight. I needed a break from it. The way the book is going through just doesn't seem...orderly? I need to get cracking on it this weekend, if just to finish it and maybe stare at it until I figure out how it works.

ETA: I just saw that I'm almost done with the HTML/CSS portion of the course, so I'll be right back into javascript land pretty soon!