Tuesday, December 27, 2016

Catching Up on Life Things

My interest in programming has not waned over the course of these last months, though I consistently hit walls and take extended breaks from learning anything new. It is the harsh struggle of learning something without the looming threat of deadlines or the presence of a mentor.

While I feel as though I haven't made much progress on my own, I have taken steps towards securing my learning capabilities. I've enrolled in courses at a new STEM school locally. Well, sort of locally. I commute an hour to attend, but my degree concentration is Computer Science and Game Design. I am well on my way to having a well-rounded education on software engineering with a focus on what makes games what they are. I would have never imagined pursuing a Bachelor's degree in Comp Sci when I graduated from high school.

My first semester left little time for me to pursue anything programming-related (damn prerequisites), but now that the semester is over, I've been cramming everything I can get my hands on about C, trying to beat the clock on these last two weeks of winter break before I start back in with a Python introduction course. My school won't teach C, but will instead jump from Python to C++ to Java. It doesn't bother me, though. C and C++ are both powerful in their own ways and I'll only benefit by learning them both. I figure I'll just skate through Java and apply the programming theory I learn to the other languages I know.

Still, I've come to realize that blogging about programming was helpful while I was actively posting about a couple of years ago. While I work on a personal project related to MUDs, I'll start trying to more actively discuss what I'm learning. So, yay! Activity!

Other life-things going on? I'm happily married now. My husband and I live with my best friend and we play Overwatch together A LOT. I lowkey enjoy Widowmaker but I'm a Zenyatta main. Might be getting back into GW2 or World of Warcraft (???) if school and projects allow, but it's probably not the greatest idea to do either of those things, considering I already moan about not having time to do stuff! I've also discovered that having just a few years of art experience has made me very valuable at school, and I'm glad to have a bit of versatility. I've done more art for game projects this semester than I thought I would and it was a lot of fun. I may post some of those up here. Since the last time I posted, I found a new favorite book series (Patrick Rothfuss's "The Name of the Wind") and I have written an enormous amount of prose for my own characters, as well as designed some content for the eventual MUD I will host.

Will I get around to posting again today? Who knows! But the next post I make will definitely be more interesting than this one.

Monday, March 7, 2016

From October 2, 2015

I apparently had this written back in October of last year when I was working on a calendar program in C, but I never posted it because it was titled "To be written tomorrow..." and I obviously got fucking distracted. Anyway, here's my (very likely hackish) calendar program.

After mulling over this ALL day, here is the answer I've come up with for this programming project.

/* Write a program that prints a calendar. */

#include <stdio.h>

int main (int argc, char* argv[]) {

    int days_month, week_begin, var1, var2;

    printf("Enter the number of days in the month: ");
    scanf("%d", &days_month);
    printf("Enter the day of the week the first day falls upon (1=Sun, 7=Sat): ");
    scanf("%d", &week_begin);

    var2 = 1;
    while (week_begin > var2) {
        printf("   ");
        var2++;
    }

    for (var1 = 1; days_month >= var1; var1++, ++week_begin) {
        printf("%3d", var1);
        if (week_begin >= 7) {
            printf("\n");
            week_begin -= 7;
        }
    }
    printf("\n");

return 0;
}

I looked up the answer in the book answer key and 50% of my program is almost identical to the author's program. Woohoo!
Unfortunately, that last gnarly bit with the if statement is vastly different from his. He used all sorts of maths like remainder and variables - 1 * variables to get his answer. I can't see the relationships of numbers quite that easily... yet. :(

How to Learn How to Program on Your Own Time

An observation from a girl who is trying to learn how to program in her own time

  1. Read books about programming languages
  2. Read blogs (/subreddits/forums/mailing lists) about programming
  3. Be inspired by the big picture constantly
    • Even while working on the little shit
  4. Don't get distracted
  5. Write one-off programs 
  6. Read more books about programming languages
  7. Read more blogs about projects that you are interested in
  8. Don't get distracted
  9. Read other peoples' programs
  10. LOTS of other peoples' programs
  11. Write more programs
  12. Don't get distracted
  13. Think about programming in your spare time
  14. Theorize how a bigger program might work
  15. Write said program
  16. Fix all the bugs in said program
  17. Don't give up
  18. Don't fucking get distracted
I swear, I would be a hell of a lot further along if I could stop playing the same games that are inspiring me to learn this stuff. I feel the same way about this as I have about every musical instrument I have ever tried to learn -- yeah, I know where the keys are and what they do, but not really well enough to put together anything that sounds decent. Damn practice, why u b so hard??