Friday, June 28, 2013

Achievement Unlocked: You da you da best!

GUYS I DID IT. I finally finished that stupid problem. It took me like a few hours of kindof working on it at work, but with the help of PythonFiddle and a nice little notepad I've been scribbling on, everything is now so simple.

Things got SUPER EASY when I decided to make a dictionary corresponding to the days in every month when it was a leap year, and the days in every month when it was not a leap year:


yeardic = {"1True":31, "2True":29, "3True":31, "4True":30, "5True":31, "6True":30, "7True":31, "8True":31, "9True":30, "10True":31, "11True":30, "12True":31,"1False":31, "2False":28, "3False":31, "4False":30, "5False":31, "6False":30, "7False":31, "8False":31, "9False":30, "10False":31, "11False":30, "12False":31}


I know it looks kinda... gross... but it works! Before I only had 1:31, 2:29, 3:31, etc etc and I was trying to do some weird workarounds to determine when a leap year was happening and when to add +1 to my total accumulated days... silly me.

This new way is BOSS. Anyway here's a pastebin of the code if anyone wants to yell at me about how stupid it is: http://pastebin.com/wkNKPSUZ

Woo-hoo! Time to move on to the next unit.

Wednesday, June 26, 2013

Achievement Unlocked: You are a masochist.

So here's my problem, guys. I've finished a lesson in Udacity and I found out that my job does not restrict access to Udacity or Youtube, so that's pretty cool... but I'm hung up on one of the "optional questions" at the very end of the unity.

Just one.

Only one question. And I can't figure it out.

And it's probably there to just be like "haha look at this unreasonable question, you should strive to be such a baller that you can solve this one day" but I think the gaming culture of today is keeping me from continuing on without clearing EVERY. SINGLE. QUESTION as if I'll get some virtual trophy for being a cool dude.

And I'm probably overreacting, as well. The problem isn't that complex... here it is:

# Given your birthday and the current date, calculate your age in days.
# Account for leap days.
#
# Assume that the birthday and current date are correct dates (and no
# time travel).
#

def daysBetweenDates(year1, month1, day1, year2, month2, day2):
    ##
    # Your code here.
    ##

I feel like it's going to be very hard to determine what lies between two dates. I can't import any fancy stuff I can only use some loops and basic stuff.

If I figure it out throughout the day I'll post my code so you guys can be proud of me and draw me an achievement trophy and post it on f-book for everyone to see.

Sunday, June 23, 2013

Infinite loops are destroying the global economy.

Why are infinite loops destroying the global economy? Don't ask me.. ask them! But they won't respond to you. No they won't do anything but run around in little circles screaming nonsense and slowly destroying the tiny shred of humanity you left in you.

Thankfully I have enough experience through knowing my nephew that it didn't keep me from tapping away at my keyboard and slamming my head against my desk a few times today until I completed some fairy simple Python problems on Udacity. I did some simple crap with searching in strings and some math-stuff with nested loops, and was rewarded with THIS terrifying masterpiece after completing a "2 gold star" problem:


What the fuck, Udacity. I don't want your demonic lemon-head snake-eye people looking at me with the blood of my loved ones dripping off of their lips. I know they appreciate nested loops as much, if not more, than any other mythical beast, but keep that crap away from me.

Anyway, I'm slowly crawling back onto the code train. My head is already spinning a bit. I think it's because before today the only things I spent my spare-time with were True Blood (watched all 5 seasons in less than a month!), some boy I like (tee-hee), and most recently the second weekend of the third phase beta test for Final Fantasy XIV: A Realm Reborn (come play with me and my kitty-kat man!)


Half-naked man-felines aside, I hope you guys don't mind my posts which are 90% about me being silly and 10% about actually coding. I have more free time now and I'll be posting more regularly, hopefully with some higher quality content! For now, I leave you with my man-cat's butt.

Tuesday, June 11, 2013

Priorities

HELLO Y'ALL.

I know I haven't posted in a while and I have a very good reason for that.. I'm kinda trying to watch all 5 seasons of True Blood before the premier of season 6 on the 16th. Most of my free time is spent watching vampires have sexual relations with things, and now with my watching True Blood there's even MORE of that.

I'll be coding once I'm all caught up, I promise! Udacity is calling my name and twirling it's hair with one finger and such. I can only suppress my raging c0d3rb0n3r for so long.

Love you guys.

Monday, June 3, 2013

Databases suck. I luv Bucky Robertz.

So last week I posted about this amazing exciting new opportunity I have at work to do lots of cool things with databases and learn about coding and blah blah and IT and such.

WELL.. not quite. My interview with the guy I would be working under was really discouraging.. not only because he was super abrasive and asked me questions I clearly did not know how to answer, but because he was very "We do not make mistakes here. I do not tolerate it. We never have fun. We never have time to relax. You'll be in here Saturday and Sunday until 10 PM and will not get overtime pay. This is not IT. We do not use SQL. You will constantly be scrutinized and we will never tell you that you've done a good job. You won't be building anything for years, you'll just be doing bitch work. Blah blah blah."

And like.... okay... no. I kiinda liked MySQL? I guess? It wasn't BAD... it was just.. very limiting, in my opinion. It was useful and stuff to know about, but it isn't something I was crazy about. And to know that I wasn't even going to be doing THAT, for YEARS and I was going to be worked to death? No thanks. I'll just take my OTHER promotion that isn't as high pressure and likely to make me cry.

SO ANYWAY, MySQL is done with for now unless I need it at some point in the future. I got through 75% of the tutorials offered by The New Boston (omfg i love bucky roberts he needs to be my boyfriend)...

DO ME

SO BACK TO PYTHON! I think I've gotten BORED of the whole game thing.. partly because I already wrote a game just like that in college, so I don't want to just do the same shit over again.. so until I get some idea to write something, or someone says "hey write something that does X Y Z" I'm just gonna fuck around on Udacity.