Friday, May 31, 2013

"jif" or "gif"

After seeing a series of amusing Tumblr posts...






...it truly piqued my interest why so many people were posting about it all of a sudden.

Apparently, this happened.

(In case you were wondering, I have always pronounced it "giff", as in "graphics".)

So, yes, it is pronounced "jif", but it will take a long time for me to adjust... if ever. It just sounds so weird to meeeee.

Also, I laughed pretty hard when I Googled "define gif" and hit the speaker next to it. Google wants none of your shit.

Wednesday, May 29, 2013

Also, an interesting read

Andrei mentioned in passing earlier that some of the earliest coders back in the '40s were actually women.

The mathematicians of the time were too concerned with developing mathematical concepts, and most notably, John Backus realized that there were women who were just as brilliant who would be willing to work on groundbreaking projects like those he was planning.

He designed Fortran with the assistance of some great woman thinkers of their time.

I thoroughly enjoyed reading about Grace Hopper, who had quite a hand in early programming. She achieved the rank of US Navy Rear Admiral, and contributed to Backus's work with Fortran.

Anyway, just thought I'd mention. I hope I don't offend anyone with my blog title... Just commenting on the societal notion that girls aren't nerds and definitely don't exist on the internets.

Busy-ness!!

Man, this blog has been lingering in the back of my mind all weekend. o-o;

I feel so bad for not updating it aggh. But I seriously didn't want to do any work on my coding this weekend... I've been madly creative and inspired (and also kicking ass in pvp on ToR with Fiance...)

This morning hasn't been crazily busy by any means, so I took it upon myself to scribble down some more notes from K&R. Mom walked by my desk and made a comment about how fast I write, then became very interested in what I was writing about. I flipped the cover of K&R over to show her, and the following conversation ensued:

Mom: "Coding!?"
Me: *grins* "Include standard input/output dot H..."
Mom: "What the fuck, girls don't code!!"

It made me giggle. C:

Anyway, I'm getting into Character Input and Output, specifically with getchar and putchar. I really have to work at this one to figure out what they're talking about. I'm trying to paraphrase, but I keep finding myself writing their explanations word-for-word because I don't understand them enough to paraphrase. Baahh.

First, I need to transcribe my notes from 1.4. Then I'll move to 1.5, which is input/output for character info. Belowwww the break...


Thursday, May 23, 2013

BAH!

Working on coding and writing tonight, because my fiance has a few projects he's busy with. I took more notes from K&R, but man do I still have a long way to go. No better way to put your knowledge to the test with miniature tests, like using what you've learned so far to write a program from memory.

Looking back over that little chunk of text (I wrote it out in my notebook), I made 4 terrible mistakes that would've kept the whole thing from compiling... The worst one was leaving out the variable assignment!! Aggh!!

It's okay though. Deep breaths, and lots of note-taking. I've taken to slowly working through the descriptions of the statements, going step by step until I'm certain that I understand what they're talking about. If I can keep that up, I think I'll be okay.

Anyway, for more notes, click the break!



Wednesday, May 22, 2013

Update and Blabbering

I'm finding it pretty amusing that, after picking up K&R, I haven't been using King nearly as much. K&R is so concise that it teaches you a LOT in a small amount of time. King is much more expository in style. I think K&R is the best choice if you can keep up with them, but if you don't know what an operand is (or some other term that is used in K&R, I only used that as an example), you will probably cause yourself less grief if you go with a more detailed approach.

Now that I'm reading through, I'm finding that I can skip over huge sections of King. I think I may use King as an extra workbook, at this rate, but it is still good reading that doesn't assume that you already know what you're doing (example: declarations really do need to go before the statements every time. K&R assumes the reader knows this; King spells it out, just in case.).

I haven't posted here in a couple of days because I got into a creative rut, and because I got busy at work. The busy-ness at work comes and goes -- I'm thankful for the time I can spend on personal projects, but I do still have to pay attention to some things (and, occasionally, those things get overlooked because I'd rather be working on anything else coding... Heh...).

The creative rut is exciting, so I let it wrap me up for longer when I get stuck in it. These past couple of days have been filled with gaming, but also with writing. My fiance and I are putting ideas down on paper (at last!), and I'm excited to be weaving his thoughts and my thoughts together. We've been talking about this project for the better part of a month now, and it feels good to be making some solid progress on it. This is the same project that spurred my interest and dedication to learning to code in C.

Anyway, this is somewhat of a rambling post. I'm resisting the urge to monetize this blog, despite how popular it seems to be so far. I know how ads can kill something enjoyable... Of course, that's assuming my rambling is actually enjoyable to any of the people who stop by here haha.

Possibly going to do some exercises today! I'm going to make an effort, anyway! But a good friend is coming to visit, tonight, and there will be chinese buffet and Star Trek movie goodness. That may not leave much room for coding practice. XD

Monday, May 20, 2013

Xcode

Seeing as I do a fair bit of work on my Mac partition, I took the plunge and downloaded an IDE called Xcode.

I wanted to share some of the things I've discovered today while poking around with this powerful application:

  1. IDEs will require some sort of learning curve. Luckily, this one is very straight-forward, but I haven't investigated any for Windows or Linux systems yet. Yeah, go figure that after being so excited to get Linux on my zombiemac, I'm using Mac OSX more...
  2. There is a LOT of good information in the documentation for the IDEs, but chances are, you'll need to sift to get to what you're trying to figure out. The communities are pretty tight-lipped, it seems, and that's understandable. I think, perhaps, they want to protect the diminishing quality of really good coders who legitimately want to know what they're doing. But, that could be a brash opinion from a novice who doesn't really know the communities very well.
  3. For the kind of coding that is tackled in K&R and King, there really don't need to be any shiny bells and whistles. In Xcode, at least, just enter these programs into a "Command Line Tool". It uses C libraries automatically and opens up a Terminal window to produce the effects of the program. I have no idea if other IDEs will have settings like these, though.
  4. I just want to put this out there; Don't forget to compile the code after you've made a change. Seriously, you can make every change you want, but if you don't compile it after, it won't have any effect on your output. I found this out the hard way, despite this being a kind of common-sense thing (and I'm absolutely certain I've read it somewhere before and just forgot with the excitement of having things WORK in Xcode haha).
  5. Xcode can do a LOT of things. The other IDEs you might find are also designed to handle a TON of work. As with anything, take small steps and try not to get overwhelmed. If you don't need a feature (like a graphical interface), don't learn about how to code it right away!
Anyway, now that that's out of the way, here are a few things I was playing around with today. GO FIGURE that "hello, world!" was actually the program that fell victim to my lack of good knowledge with Xcode. After I got the F/C conversion table working, I didn't feel like I needed to go back and do it again, heh.


I'm hoping this can be read clearly enough... (Pro Tip: Open in New Tab, it will let you zoom reeeeal close)

The example to the far left is the original program. It takes the Fahrenheit values, in increments of 20, and calculates the Celsius value by using the algebraic formula.

The middle example converts the integers (int) of Fahrenheit and Celsius into floating-point numbers, so they can be converted with more accuracy. Floating-point numbers allow the usage of decimals.

The right-hand example shows an addition that was suggested by K&R as an exercise; a header to the table.

The next topic in K&R is the for statement. Yay for being excited to carry on with coding before delving into video games! I actually made my fiance go play ToR by himself after dinner so I could work on this stuff! Haha.

Friday, May 17, 2013

Chapter 2 at last!

Just to give you all a heads up, there are some sections of the textbook that I won't necessarily take notes on. It's a great book, and I want to leave some content out of my blog so I don't get hammered with licensing issues or anything. I've been feeling like this is possibly treading a thin line.

I have a lot of respect for this author for making such a great resource, and I want to urge anyone following along to pick up the book as well. Maybe it isn't quite so bad if I generate some publicity for the book, right? :D

That being said, I will stop promptly if this blog is found to be too close to original content.

Anyway, Chapter 2 notes below the break.


Thursday, May 16, 2013

GW2

Finding myself entranced again by the beauty of this game. Just wanted to share.



Of course, it's not nearly as pretty as it could be. My computer is rather dated. But it gets the point across. Meet Yvinne, my evil sylvari mesmer. She serves as the equal opposite of my favorite character, and causes trouble for the sake of storytelling. So nice to have an evil little plot device.
Yvinne's probably neutral evil, but borders on chaotic evil. Silvaria is true neutral, but can sometimes be neutral good, and other times, she's chaotic neutral.
I have some feels for the two of them. Silvaria, in all her incarnations, tends to be drawn to the darkness, and Yvinne is there to show her what the darkness is capable of. It's interesting... to me, anyway.
I might come back and post a pic of GW2!Silvaria, or I might come back and take more notes. Not sure presently...

Chapter 1: Strengths and Weaknesses

I'm having one of those days!! I told myself this morning that I would reward myself with note-taking today if I could finish all of my work. Well, that was peachy, except I haven't been able to find a definitive "end" to my work! Something new skids across my desk every time I finish something else and I didn't even turn my OWN computer on until after noon. Blaargh!

I really wanted to crack open the book and read more after I got home last night, but Guild Wars 2 ate up my free time. It'll be ToR tonight, because I'll want to keep my sicky honey company if he's up to playing. He's got a bad ear infection. :(

He admitted to me this morning that he may put forth a little more effort into learning code. That makes me happy! But it could have just been the meds talking. ;) Heeeehehe.

ANYWAY. You're not here for my BABBLING. Part two of Chapter 1 is beyond the break!


Wednesday, May 15, 2013

Chapter 1: History!

I like this textbook. As I've scanned over the contents, it seems very well-written and clear, with good information and explanations. It begins with the history of C, and how it came to be. The links are going to typically be Wikipedia links that I skim over for additional information and provide here for the convenience of anyone following along.

The textbook I'm using.


Tuesday, May 14, 2013

More Filing and Getting Ready to Take Some Notes

I'm procrastinating again... I really don't want to do this filing.

So I'll make a blog post instead.

Yesterday was odd. I don't know why I was hit with such icky feelings all of a sudden like that. I just know that I felt somewhat like I did back in College Algebra... "This should really make sense, and I feel like this should really work... but it doesn't." From what I understand, there's a lot of that in coding as a whole haha.

It makes me nervous, though, because if I don't have the mind to wrap around these things, my project with my fiance is up in smoke before we can even start on it. He has already determined that he's not a coder. If I can't learn this and get good at it, we'll be a couple of really creative people without the means to produce what we want. Puts on the pressure. :(

I'm also nervous because I'm afraid that these ideas we have aren't going to be interesting to other people. I'm scared that our scope is too big, and we're trying to do too much... Is all of this work going to pay off with a product that is thoroughly enjoyable by everyone, or will Andrei and I be the only ones enjoying it?

Anyway, I'm going to reward myself today. Once I'm done with this filing, I'm going to start taking notes from my textbook in between answering the phone and checking emails. I'm still working on the DG Scripts and triggers for my zone in TBA, I just have to step back from them and tackle something different for now.

Monday, May 13, 2013

Frustrated, Nervous...

Got hit with a double-whammy while I was working on something. Just kind of filled with this anxiety that has my chest all tight and my mind not willing to work.

That makes it exceedingly difficult to absorb and apply information.

I've decided that I'm probably going to take a step back on the scripting. The logic is still not making sense, and that means I rushed in too fast. Maybe it wouldn't be a bad idea to really tackle coding right now, and not wait until I have the scripting down. I thought knowing the scripting would make it easier to learn the coding.

Or maybe I just need to not make any decisions right now and wait until I'm not feeling anxious. :( Wanna go home, but it's not even 3.

Bleh!!

Bleh, I say!!!

Slow Work Day

That means I can work on other things at my desk, yay!

Throughout the day, I'm going to be working on finalizing the last two triggers for my zone in TBA. The first one, I referenced in this post I made the other day, about the rose in the rose bush. I still haven't bugchecked it, but I'm going to today. I also found this from my early posts on the TBA forums:




From Fizban,
The following was written in this post, not in trigedit, and as such is completely untested, but should work, or at the very least work with very minor changes.
Type: Random
Numeric Arg: 100
wait 300 s
if !%self.contents%
%load% mob <insert mob vnum>
else
set curr_item %self.contents%
while %curr_item%
if %curr_item.vnum% == 59320
halt
else
set %curr_item% %curr_item.next_in_list%
end
done
%load% mob <insert mob vnum>
end
...you'd just need to have the load script on her have a check for the vnum of the room she is currently in and then have her load a rose and put it in the container if she is in the appropriate room.




Comparing this to what I have, they are rather different. :/ Gotta work on fixing that.

The next trigger I'm going to work on is going to give a druid healer a few protective spells to cast on people present within the room. Ideally, I'd love for him to have a couple of spells he casts if someone stands in the room long enough, and then stops casting once the effects of those spells are present on the character(s), but that's going to be much more elaborate than a list of random spells he casts every 10 seconds haha.

We'll see what happens. I'm going to be updating the post referenced above with my changelog!! If anyone here is actually paying attention for my bug-checking methods, that's where to keep an eye out!

Sunday, May 12, 2013

Ho Hum

Quiet because of Mother's Day. Not too much happened in the coding area, though I did have a good time with my family today. Fiance and I went to Mom and Dad's for amazing italian take-out, but before the evening was over, Grandma lost her balance and fell. She's been complaining about vertigo, and I think that's what did it. She hit her head, but seemed okay after drinking some cold water.

Fiance and I came home and we've honestly been playing ToR all night. My 'Sin is almost 55, and we're enjoying being beastly together on our mains (he has a Sorc). I totally love playing our toons together, because we can sit and banter back and forth about RP things. I have this tendency of being knocked off of the edges of platforms by knockbacks, and so we were laughing earlier about how his character would be constantly scolding mine for falling all the time.

"Silvaria, we're going to be fighting on a Gravity Hook. DO NOT stand near the edges."
"Okay, okay! I got it!"
"Are you sure? You've almost plummeted to your death how many times? Ten, now?"
"...Eleven, after the last one in the mining shaft....."

We have a lot of fun with our characters, heehee.

Here's Silv with a kind of incomplete set... She's 54 right now and I'm not sure what her gear will look like when she hits 55, but I know I want to change it. We affectionately call this set "swamp beast" lol.



Anyway, not much is going to happen tonight. Just going to enjoy the evening with Fiance and be happy. :)

Saturday, May 11, 2013

Mapping out new triggers

I have two that I'm planning right now... One of them is based on one that Rumble wrote, and the other is one I'm going to tackle on my own.

The point of the first is to respawn a cosmetic item into a container. The item is trash and would have no use except to be used as a token of friendship or affection. It is a white rose that the player would have to "pluck" from a rose bush. Unfortunately, the triggers can't reload items directly to containers, so I need a mobile to do it for me. My nymph seemed the best choice. It will look like this, more or less:

Name: Reload Rose in Rosebush - Obj 59319
Vnum: 59305
Trigger Intended for: Mobiles
Trigger Type: Load
Numeric Arg: 100
Argument: None
Commands:
if %self.contents% < 0
eval %self.contents%
if %self.contents.vnum% == 59320
halt
break
if %self.contents.vnum% != 59320
%purge% %self.contents%
end
if %self.contents% > 1
set nymph mob 59309
set rose obj 59320
%load% %nymph%
%echo% A beautiful nymph steps out from a tree nearby and approaches the rose bush.
%load% %rose% %nymph.inv%
wait 2s
%echo% She examines the rose bush and tends to it gently. Where her hands pass, more roses bloom.
%force% %nymph% put %rose% in %self%
wait 2s
%echo% Satisfied, the nymph nods and seems to melt into the foliage, ignoring all around her.
end

I'm going to pause here for now, and map out the other trigger in a while. Perhaps going to game for a bit after I test my logic for this particular trigger. :)

Edit: Logic was faulty in a few different places... I'll map out what changes I make here, I just don't want to think about it right now so I don't get too frustrated. XD

Change 1:
Trigger Intended for: Objects
Trigger Type: Global Random
(It'll have a chance to fire every 13 seconds without anything actually happening this way.)

Change 2:
Commands:
if %self.contents% < 0
eval %self.contents%
if %self.contents.vnum% == 59320
halt
end
if %self.contents.vnum% != 59320
%purge% %self.contents%
end
Add line: end
if %self.contents% > 1
(Got an eval error after this change. This is where I took a break. I'm going to have to read up on eval.)

Some Off-Topic Things While I Wake Up

Today is going to be a good day.

Yesterday was good, too, but full of filing and rushing. It left me exhausted and unwilling to do anything but curl up with fiance after movie and sleep.

Speaking of movie! Iron Man 3 was pretty damn good! I won't spoil anything, but we both enjoyed it thoroughly more than #2. Anymore, I judge stories by how well they suspend my disbelief, and after seeing the mindfuck that was Dark City and being seriously messed up for a good two days after that, very few movies are capable of instilling that feeling anymore...

But the action was good, and the story was interesting, even if some parts were not explained very clearly in words. Sometimes it is good to leave things to the viewer's interpretations, but important plot points shouldn't be on that list of things, lol.

Anyway, today is going to be good because it is Saturday and we are being lazy kitties and only doing what we want to do. For me, that is scanning over my C textbook, testing and writing triggers in TBA, and possibly playing some ToR later on. Fiance seems to be pretty happy playing his Sith Sorcerer at the moment, but he told me earlier that we'd be able to write some today, too! Whether that means we RP or world-build, I'm not sure... But either would make me a happy camper!

Anyway, going to go finish my coffee and be lazy. If I take notes today, I will make another post. :D

Friday, May 10, 2013

It's filing day today at work. I can't pay any attention to the web. Sadface.

It's also bring your fiance to work day. The first of many, now that he doesn't have anything to do during the summer. Mwahahahaaa...

We're planning to see Iron Man 3 tonight, but there will be about 3 hours between work and movie that I might be able to work on some things. Still have not figured out the mfollow problem from the last trigger I posted, but finding out he was re-enlisting last night put a halt on any progress I might have been able to make. After talking about that for a few hours, and getting the zombie mac set up, we opted to kick asses on our Bounty Hunters in ToR.

Very unrelated to coding. My apologies. I really don't want to file this paperwork. Aggh.

Thursday, May 9, 2013

Sadhappy

My fiance is re-enlisting into the military. :( Makes me a sad code-girl.

But what makes me a marginally happier code-girl is... I have Ubuntu Server on my zombie-macbook now.

Seeeeeeeeeeeeeeeeeeeeeee?




Happpyyyyyyyyyyyyyyyy...........

Template 2

Also, expect the template to change while I fight it to look the way I want it to.

This is a nice look. :D