Monday, November 7, 2011

imagine you just finished writing 2000 lines of code. now to see if it works... nope, not working. now what? this kind of hopeless situation is exactly what unit testing and cxxtest are used to prevent!

unit testing is the practice of testing if each tiny component of the program works correctly as soon as it's built/linked together with other parts into a bigger unit. this is a practice recommended exponentially more with the size of the program. Why? Because YOU WILL NOT GET EVERYTHING RIGHT THE FIRST TIME AROUND! Then the butterfly effect multiplies it many times over depending how deep in your program it is. these tend to be horrible and hard to find errors that unit testing saves you from.

unit testing is very useful, but constantly testing every single piece of code is a pain. this is where cxxtest comes in. cxxtest is a tool that helps automate testing. this allows you to test more and easily, thereby making unit testing more doable.

in conclusion, unit testing is necessary and cxxtest makes it workable. this can save you a great deal of work, headache and time. i know it did me.

Monday, October 31, 2011

For thous of you who do not know, source control is a way to manage file changes on a program being worked on by multiple people at once. Version control is keeping a copy of the older versions of the program in case you want to backtrack. Source control is a related tool that helps with the merging of shared code edited at the same time by making the process of integrating contradictory changes relatively painless.

A common tool for both is subversion. (yes, i know, it sounds like someone overthrowing the government or something, but not that subversion) Subversion is a powerful and useful tool that can make the task of working with others on a large program much easier. Especially if the group is too busy to be able to always meet, or if some prefer working from home. This can be one of the most frustrating parts of group programing. Especially considering that not all computer programmers have an exactly outgoing and social personality...

One of the biggest problems I personally found when working with subversion, was the terminal. Subversion, or svn, is generally accessed directly and only from the terminal. Especially to an amateur like i was, having to work with an abstract interface like the terminal to access, send and retrieve the files in the subversion repository, can be quite a challenge and can easily develope into disdain for the entire system. Though i freely admitted that svn could be useful, the terminal interface made it so cumbersome to use, that even with the many a shortcut we learned for it, using svn still involved a considerable amount of PAIN.

To solve this problem, for thous who are not familiar with the terminal and want to use svn quickly, especially, I recommend a program called tortoise. It has a simple and familiar windows interface that wraps svn in a usable format, while keeping most of the functions the same. And if ever more versatility is needed, THEN you can use the terminal.

Tortoise also takes care of the rather annoying problem of always typing -m "~~~" to enter in the required comments for your submission lest you get the mystery screen of how-the-hell-do-i-get-out-of-here by providing a comment box. this fixes the annoyance of using svn while keeping all of it's power in tact.

As for whether or not to use svn, unless you can get it done in about an hour, yes. I'd recommend it even for small projects and working alone. Mainly due to the revision control. That's always nice. But also, i can't really think of a reason not to use it. Can you?

Tuesday, October 11, 2011

blog assingment 2

i decided to write about the advantages rather then disadvantages of team programing. i haven't really found any disadvantages to team programing that subversion won't deal with satisfactorily. the only foreseeable problem is that both partners would try to work on the same code with two different approaches.

as for the advantages, it's always better to work in teams. the golden rule of computer programing is 'if you don't know something, the guy on the right probably does', and just having another pair of eyes on your code can help find errors that to the author are no short of baffling. not to mention that you don't have to do the work that your partner does.

i am assuming that the partner is halfway competent here...

the partners can also work together by focusing on what each does best, like logic, syntax, testing, debugging and bringing the chips and drinks, all important aspects of coding and rarely all mastered by a single person. also, for something like the logic of the program, another person may have a different and perhaps better idea. even a novice programmer can help improve the program just by sharing a different look on the logic with the team.

a program that would be a horror to do alone, even with a single partner, suddenly becomes much easier.

Tuesday, September 20, 2011

i'm not at all sure what i'm 'good' at, but loops and understandable code seem fairly easy.

i tend to get how to make my loops do what i want them to. it's the functions they use that can be a problem... (like fprintf) I don't usually have problems with the logic, just the occasional one off error. i don't tend to have trouble with this so i guess i know it.

Making my code understandable shouldn't be too hard ether, i just need the comments to become a habit. this isn't hard. i'm doing it already. ...though it does get cluttered occasionally.

i need to get better with hierarchy, the overall design of the code. just viewing the code as a whole and planning it out from the start.

i'm okay with tests i guess, but have no clue about debuggers. my only experience with debuggers is the bomb lab, and i really doubt i could ever use one in a real life situation. this is one thing i need to get out of this class.
Temporary in use for csci class
this is the divider.

Friday, May 23, 2008


ok, this took me a while. sorry. anyway, golden week was great. i spent three days at a frends house teaching english, babysitting his two brothers and playing zelda for the wii. =] he seems to love a movie called battle royal i also went to see namahage with him. (japanese ?devil?) amung other things, I finally got a bow! I also found a manga called fary tail made by the same person as rave master. I also did a bunch ou other things that I don't remember anymore... I was kind of busy (lazy) so I chouldn't update while they were still in my head. well, my story is starting to take shape now. and I'd say it's a pritty awsome one too. over 80 pages and 400 kills by th main caracter alone. I'll stop there since i don't want to spoil it and have to start writeing it again now. bye.

Thursday, May 1, 2008

something new

hey, i finally posted pictures. (just one) it's at the vary bottom of the blog and it will change occationally. (the first one is my uniform scince people have been constantly pestering me to show them. if you missed it... sucks.) speaking of uniforms, i finally got my kyuudou cloths. (will post eventually for a limited time =])
well, that's all for now

Tuesday, April 22, 2008

sunday school?!

i didn't really have a weekend this week. Saturday: kyuudou- we had a archery turnament in a not-so-near city... from 6 am to 6 pm... 12 houres! why you whould need (or want) a turnament that long is beyond me. (oh, and our school's archery seems to be made of fail. out of 20 shots the boys hit 7x and the girls only 3x (3!!!) and only one made it thrugh the first round of the individual competition. oh well, that's what happens when your teacher cn't hit the target to save his life.) but scince i miledly enjoy kyuudou, it wasn't that bad. but...
sunday: school- you may ask; why the hell do you have school on sunday? the answer is- i don't know. for some reason our school (and only oure school) had school this sunday. at least they gave us monday off though.

while we're on the topic of school, today we had tests all day and scince i had nothing to do i wached dvds all day and tormented math teachers with difficult problems.
Also my friend. Kayla, seems to be having some problems in school. she wrote this-

school life is pretty diffucult. not because im mentally exerting myself in any way possibe, but because of all the rules! oh my god! i was attalked today by this old japanese bat, because i was wearing a scarf on my way to school and listening to music! i wasnt even in the gate yet and she starts screaming at me in japanese!( this is when my niave foiener act comes into play) she started pulling at my headphones and hollering at me to put them away( keep in mind im 40 min early for school). it would not have bothered me if she hadnt been screaming, but i was almost braceing myself so she wouldnt hit me! skirts must come below the knee. no hair clips, no makeup, regulated socks, regulated shoes( even when your out side of school! ) no going out on weekdays except for club activities( i do anyway) no haveing a boyfriend( do anyway ) your nails must not have anywhite showeing, no nail polish, your hair must be in a low ponytial or pig tails that tuck behind your ear, no earings, non text books are not allowed beyond the gate( ha *ha, try and stop me fools! ) no jerwlery of any kind, and lastly, no colorful braces.isnt that crazy!!!! im gonna frickin die! ive already had mini brawls with the crazed faculty members twice now!i swear these women need to get laid! im pretty sure thats the reason they are so uptight! also, i learn notheing! they dont teach me, or even attempt to. i was under the impression i would have some sort or curriculum. all i do is sit around and read. other then that i only have classes to learn japanese. how am i suppose to get credits!....but other then that its pretty fun~.~the food is great and i really like where i am. dont get my wrong, i am haveing lots of fun, its just that a few inconsistancies are stressing me out....ok, what i meant to say, is that if that old bat of a woman, that has been attalking my individuality would some how just fall into a well, all the worlds problems would be solved. world peace, would also ensue*_*.

She then goes on about the deliciousness of melon bread. (i'm shure you recognise the author from the previous 2 emails i posted)

anyway, the sakuras bloomed, they're very pritty. don't worry, i'll post pictures... eventually. (i'm tormenting you)

well that's all, unttil the next time i remember to post.

Saturday, April 12, 2008

first week done

School is fun!
scince i'm years ahead of everybody i can just ignore the lesson and focus on wether or not i can understand the words. (no stress/struggle =]) I'll also be learning string theory, calculus and japanese (by reading manga) and teaching english in my free time.
after school i have kyuudou (archery). it takes a chunk out of my day but it's interesting. (not that hard... yet) i also sometimes try to explane some implications of string theory, which thay have absolutly no idea what is. This has earned me the nickname "god". (one of my ckassmates called me that on several occations. I hope it'll last.=] =] =])

well, other than that, just the usual. Great food (takoyaki, yakisoba), great Anime (code geass r2, soul eater, ect.), great manga (claymore, mai-hime/otome, and over 200 pages of tsubasa (today alone)) and japanese. 8-]

everything is perfect. (exept for the uniform *grumble*)

Tuesday, April 8, 2008

school started and i have to ware a tie. ich

in other news, code geass r2 is out (along with a bunch of other anime), i despise my school uniform and disgaea 3 is coming out soon =].

http://www.youtube.com/watch?v=s9-1LG0C4jA&feature=related (yes, moonfall)

Tuesday, April 1, 2008

japan (finally)

Sorry for not updating my blog. (forgot i had one, hehe...) Anyway, I'm in Japan now and "all is well" is an understatment. My host family is really nice. The fact that they don't understand much english means I have to speak all japanese. (we actually understand each other fairly well) In other news, i think i broke a world record. Within four days of entering the family, i turned my brohter into an otaku. Day two i showed him Code geass and Claymore and within three days he finished bouth. Thats 26h of anime. (even i can't do that, and the only thing he saw prior was DBZ and Conan) PS: the second seasson of Code geass starts on the sixth.

I'll be starting school next week so i can't wait. speaking of wich, i had a vary amusing conversation with a friend of mine over e-mail:

1) i visited my school taday. im gonna frigin die! we pray at least three times a day and have require mass two times a year. he he...we`ll see about that. hell hath no fury....on the bright side i get to keep my red hair and guaged ears. they thought my hair was natural. that makes me so happy because i want looking foreward to stripping it and since so many exchange students have guages that are too big to be taken out and look pleasant, i get to keep my guages as long as they are clear. if you`ve ever seen a guy with 0 guage you know what i mean.

2)O.K, I'm not even going to talk about your school. (the torture) but, despite this being the otaku birthplace there are suprisingly many people who are still stuck at pokemon and conan. (nick's host siblings for instance don't even know conan, i think. i recomended elfan lied. hehehe) turns out, i somtimes know more about japan then japanese people. anime excluded. (why not cut udon, what katami is, so on) anyway, it's good that you can keep your hair, but nothing is worth praying 3x a day. (that's why i hate catholic schools)
well, try to survive with minimal mental damige if you can,

3)i am not! do you hear me?! not going to pray!!!! dambit!!! i would like to see them try and make me! mwa ha ha aha!...let the blood bath begin.....anyway, im starting to relate to your observation on the japanese culture. however my host family reads manga, so they at least they have good tast in that. the anime on tv is absolutly dispicible though! and why is everyone still stuck on conan? that was popular in america for a while but not this long.

PS: conan is over 900 episodes long (yes, not 90, 900)

well her family dosen't belive so it should be fine.

I hope this makes up for not posting for a while.

Monday, December 3, 2007


Disgaea prisim rangers:
a funny parody on power rangers Disgaea style!