Chametzathon

2017-Apr-19, Wednesday 08:56
dorchadas: (JCDenton)
Last night after Japanese class, [personal profile] schoolpsychnerd and I stopped by the local watering hole for dinner, since we haven't spent much of our restaurant budget for this month and we both really wanted hamburgers. It's funny--I'll go weeks without eating any bread at all because I don't want any, and all it takes is one holiday saying I can't eat bread to make me want to dig into a nice sourdough with loads of butter.

I got a steak sandwich, the same food I got the first time I ever went there years ago. That time I made the mistake of ordering it rare, because it's steak, right? That's what you do. Well...sure, if you're eating it with a knife and fork. With a steak sandwich it meant I tore the bread to pieces trying to rip off chunks of steak with my teeth, and this time I learned and ordered it medium.


Though looking at it now, it makes me want a cheesesteak...

During Japanese class, I talked a bit with Aya-sensei about Pesach foods and she was pretty dismissive of matzah for not tasting like anything. And mostly she's right, though [personal profile] schoolpsychnerd did manage to find a brand that was olive-oil-and-herb flavored that was pretty good on its own. But just yesterday, I learned that cracker matzah is an invention of the modern age due to transportation and storage concerns, and that previous matzah was all soft like chapatis or tortillas! The source I read is here, though there's also RealMatzah.com, which looks like an Angelfire page from the 90s but has plenty of rabbinical opinions on soft matzah.

Some googling found a bakery in New York that makes it and ships it overnight, but there's no products listed on the website so I'm not sure if it's still in business or not. Maybe we can try making it ourselves, now that Pesach is over and there's no halakhic concerns if we screw up the recipe.
dorchadas: (Angst)
Studying isn't useless! Who would have thought!  photo doomguy.gif

One thing that paying for Japanese lessons has done is that it's encouraged me to pick up my studies in other parts of my life. Playing video games in Japanese, finally trying to read those manga we bought in Japan but that I've never really opened before, and writing more Japanese as well, like the notes we wrote back to our students in Japan after we visited last summer. But the lessons are also paying off in and of themselves, and I'm noticing that my ability to speak Japanese is getting better. I'm still heavily limited by my vocabulary, but that's because memorizing a giant list of words and their meanings is probably the most difficult task of language-learning, in term of effort that must be expended.

For example, at the last class I was at, we read an essay by Hideo Levy about the difficulty of translating the Japanese word 文学者 (bungakusha, the dictionary gives "scholar of literature"). Levy writes that there are connotations of bungakusha being the guardians of the essential Yamato spirit by means of literature, and mentions how as a younger man he was very annoyed about being an eminent writer but not being considered a bungakusha because he wasn't born in Japan, so people thought he lacked a certain...something.

So we started talking about the difficulty of translation, and I brought up playing Pokemon Fire Red and how I had posted a screenshot that was pretty difficult to translate into English in an elegant way. Here it is:


"Kono ore-sama ga! Sekai de ichiban!

Literally, it's just "I am the best in the world," but that doesn't really capture the way that someone saing kono ore-sama is elevating themselves above the person they're talking to, and translating that sense into English is nearly impossible without being really clumsy. The royal "we" kind of works, but that has its own connotations in English that this doesn't. Translating is hard, is what I'm saying. And I'm just a guy with a dictionary and some study, so I don't have to worry about my audience's knowledge, technical limitations (like in a game), meddling executives, and so on. But on the other hand, we were able to talk for forty in minutes, 85% of the time in Japanese, about difficult translating, pronoun selection in Japanese, and the time that [livejournal.com profile] libby_may's husband and [livejournal.com profile] melishus_b wandered around a park in Hiroshima offering people absinthe and two Japanese men chatted with us for about an hour.

All that money and time I'm putting in is working! Just need to keep 頑張るing. まだまだだけど、できるよな。
dorchadas: (Yui Studying)
My last Japanese tutoring session was all about the difference between transitive and intransitive verbs. In English, these tend to be the same verb--"The box moved," "I moved the box"--and when they're not people get confused, like with lay (transitive) and lie (intransitive).

In Japanese, they're almost always separate verbs. That first sentence up there would be 箱が動いた and the second would be 俺が箱を動かした, with the verbs 動く as the intransitive version and 動かす as the transitive one. A huge number of English verbs that are just one word with two senses are two words in Japanese, like "to burn" (燃える and 燃やす), "to begin" (始まる and 始める), or "to finish" (終わる and 終える). And often the intransitive version is the same as the passive in English, even though the passive is an entirely separate verb form. Both りんごが売れた and りんごが売られた can translate as "the apples were sold," though the first sentence could also read "the apples sold" and thus can be modified by adverbs, like りんごがよく売れた, "The apples sold well."

There's a whole giant list of them here if you're curious. It's part of what I used to make my flashcard set.

And that, of course, doesn't get into nuances of use that dictionaries don't always explain. During the lesson I tried to say 戦ってる子供を壊した, but it's wrong. I wanted to say that I broke up the fighting children, but 壊す means to smash a machine. The word I was looking for is 別ける. Similarly, 見つかる is intransitive and 見つける is transitive, but if you want to say that you couldn't find something, you'd use 見つかる. 見つける has connotations of volition, so that would be more like, "I didn't find it (because I gave up looking)."

And the expression for asking for someone else on the phone is Aさんに代わってください, which literally means, "Please changes places with A-san."

Languages are hard.

A learning exchange

2016-May-12, Thursday 12:53
dorchadas: (In America)
Something interesting that's come up in the course of reading 世界の中心で愛を叫ぶ is that both Aya-sensei and I each have our area of expertise to share. She obviously speaks Japanese natively, but she's nisei--she was raised in America, went to American schools, and so on. She has relatives in Japan and lived in Tokyo for several years, but has spent most of her life here. That means that, for example, she has no experience with the Japanese education system.

This came up with the sentence:
「なんか緊張感がないよな」ぼくは言った。「夏休みだというのに、ちっとも勉強に身が入らない」
Which I would translate as:
"Ahh, I'm not feeling pressured at all," I said. "Even though it's summer vacation, I don't have any energy for studying."
So of course if you think of the American education system, that makes no sense. "Even though"? Shouldn't that be "because"?

Well, no, because the Japanese school year begins in April and summer vacation comes during the first semester. Students have to go to club activities and often get homework assignments they have to finish during their vacations. This gives context to the next line, where Aki tells Sakutarō that he'll be fine even if he doesn't try (literally that he's in the 安全圏, a word that means "buffer zone" but which Aya-sensei told me is slang for people who will pass their exams no matter what they do).

It's like when I told Aya-sensei what a 大和撫子 (Yamato nadeshiko) is, which gave her a word for this concept that crops up again and again in Japanese entertainment. It's minor, but it's nice that things aren't just one way.

That was a week

2016-May-11, Wednesday 10:41
dorchadas: (Dreams are older)
Thursday we had [twitter.com profile] xoDrVenture over to watch Revolutionary Girl Utena, and then after she left I got a bit overwhelmed by my upcoming schedule and the fact that the pants I ordered arrived and didn't fit, and I ended up lying down in a dark room for fifteen minutes while [personal profile] schoolpsychnerd did some work in the kitchen.

The next day I sent back the pants and the replacements are in the mail, and then I got home from work, devoured dinner, and immediately turned around and headed out to Call of Cthulhu, which you can read about here. Then we came back home and went to bed.

Saturday was LARP and shopping day, taking up a large portion of the afternoon and all of the evening, but also the day where I received an email from my father with the subject "$" and then checked my bank and noticed a pending transaction for a substantial sum of money. Enough to pay for our upcoming trip to Japan multiple times over. When we called my mother for Mother's Day the next day and asked about it, their reasoning was basically that they're not getting any younger and who knows what might happen. So if you wonder why I'm all #doom all the time, well...

Sunday was the aforementioned phone call and the Beach Party of Hope, scheduled in February. Fortunately the weather cooperated, but those again took up a big chunk of the day. We also wrote a letter to Kaminaka-san, one of our old students from Chiyoda, since we're planning to visit Chiyoda on our upcoming trip to Japan and wanted to let him know! That took a bit of time mostly because I had to hand-write Japanese, which I'm not very good at and which always makes me nervous.

Monday was session six of Warlords of the Mushroom Kingdom, which i haven't written about yet because over half of it was Small-time Peddlers of the Mushroom Kingdom, so I'll do a combined six + seven post next week and edit in a link here when it's written.

Tuesday was Japanese class again, which actually went pretty well. 世界の中心で愛を叫ぶ is getting better now that they're getting into more characterization, and at least with the most recent chapter, I went into class thinking I had a lot of trouble with the reading and it turned out that I actually understood almost all of it. Aya-sensei mentioned that it's easy to get caught up in a couple small things you don't understand and assume it means that you don't understand the larger picture and that's simply not the case, and that's definitely true. I think at this point I'd keep reading the book even if I didn't have class anymore.

Tonight, I have nothing scheduled and I'm going to play Castlevania: Symphony of the Night and watch Aria with [personal profile] schoolpsychnerd, and the only thing I have scheduled that is of any importance is that we're going to write another card to one of our students in Japan. And this Friday we're going out to eat at Travelle and then I don't have anything scheduled for the rest of the weekend. Other than beating Symphony of the Night and finishing up my Ender-kun costume for ACEN. Just need to do the grass block!
dorchadas: (Do Not Want)
(Bullet = dodged)

Background: Aya-sensei and I are reading 世界の中心で愛を叫ぶ and got to a part where Sakutarō is being an idiot. He's angry at Aki because the other boys in his class are bullying him for spending time with her, so he writes in to a Christmas Eve radio show with a song request, talking about how they were going to play Romeo and Juliet in the Culture Festival (true) but she got sick with leukemia (false) and is probably listening from her hospital bed (false). Aki confronts him the next day, and says that she doesn't mind if he talks about her, but there are people out there who are really suffering and she hates it when people are mean to them.

This led to a discussion about how Aki is the ideal stereotype of Japanese womanhood (大和撫子 in Japanese): soft-spoken, self-effacing, beautiful, courteous, caring, with long black hair. Aya-sensei mentioned the pressure that Japanese women are under to conform to this ideal and how she--being raised in America--feels like a lumbering barbarian (not her exact words) when she's around other Japanese women.

Then she asked me if I liked that kind of personality.


I managed to deflect a bit by talking about [personal profile] schoolpsychnerd, who has a lot of those traits. She's softer-spoken (except when advocating for students under her care), loves cooking for people, likes cute things, tends to think of others, dresses more feminine, and probably most importantly for the purposes of the question, Aya-sensei has met her. So we talked a bit about [personal profile] schoolpsychnerd, and then the conversation moved on.

But I realize that that's actually kind of a reasonable accomplishment--I extracted myself from a conversational land mine in another language. I mean, it wasn't really a trap, but it was structured as one, and I avoided it. Points to me!
dorchadas: (Do you speak Elvish)
I didn't have tutoring today since I have book group (theoretically...there may be technical difficulties that prevent it from occurring), so I asked Aya-sensei to give me another chapter of 世界の中心で、愛を叫ぶ to read since I'd have two weeks to read it. Since I'm getting the whole thing as a scanned-in PDF from her hardcopy, I figured I'd post a page so people can see what I'm reading:


Normally I'd have the page festooned with notes of questions I have about particular sentences, vocabulary words and their pronunciations so I don't have to keep looking things up, but I'm still doing an initial read-through to see how much I understand before I do any of that. This page is about how the protagonist and Aki, the perfect Yamato nadeshiko love interest, have been chosen as Romeo and Juliet for their class's performance in the school Culture Festival, and some of the other (male) students are teasing the protagonist over his enthusiasm during the balcony scene. I think.

But yeah, I'm reading a Japanese novel!
dorchadas: (Kirby sweatdrop)
Like I mentioned, I've been reading 世界の中心で愛を叫ぶ and I'm pretty sure that it's helped me identify one of the problems I'm having in trying to learn Japanese--I compartmentalize too much. I have a tendency to want to look every word up I don't know, so I stop when I find something, make a note on the PDF I have of the book with the word and its reading and pronunciation, then go back to the text. But it means that sometimes I'm reading whole sentences, and sometimes I'm reading it one word at a time, which makes it pretty hard to draw meaning from it.

What I really need to do is to read everything through once first, not look anything up, and see how much I understand. Then read it through and note down all the words I don't know, then read it through again with the notes in case I can't remember something.

On the plus side, I've noticed that reading actual written Japanese is helping some vocab stick in my head because I have context for it. It's like how I'll always remember that アライグマ literally means "washing bear," which means "raccoon," because of Kazu trying to explain it with "洗濯ぐま" ("laundry bear").

As for the actual book, I'm enjoying it. I started off feeling like it was being crassly manipulative, but once it moved past the opening frame of sadness and taking someone's ashes far away and went back to the meet cute, it got better. Though it's pretty heavy-handed:
にもかかわらず少女の髪からは、シャンプーというかリンスというか、ほんのり甘い匂いが漂ってきた。

Translation:
But in spite of [walking with a distance between them], from the girl's hair the sweet scent of shampoo and condition hung faintly in the air.
Later, then come around a turn in the path and find a field of hydrangeas, and Aki turns to Sakutarō with sparkles in her eyes and exclaims how much she loves hydrangeas and asks him if he wants to go to hanami together. I can almost see the sweatdrop on his face when he says yes. But it's definitely good practice!
dorchadas: (Yui Studying)
We've mostly been discussing news articles, but last class my tutor had a different suggestion--reading a novel.

Not the 源氏物語 or anything like that. She said that when she was last in Japan, her roommate gave her a book called 世界の中心で愛を叫ぶ (my translation: "I Shouted Out Love at the Heart of the World"), which google tells me has the English title of Socrates in Love. Google also says that was supposed to be the original title, and it does sound better in English. Anyway, my tutor mentioned that she never read it because it sounded like a bunch of sappy mush, but that it might make a good discussion topic.

I'm a bit apprehensive. Partially because while readying the NHK Easy Japanese articles isn't very hard for me, I've never tried to read a novel before. That and going to the Amazon page for the book, the reviews are...mixed. The one that shows up at the top for me starts with, "この本が、日本で一番売れた書籍、になってしまったことが何だかな," which means "Somehow this book has become the top-selling book in Japan..." Not exactly a ringing endorsement. Especially when it goes on to say, "最後は読むのがつらくなってきてナナメ読み," which could mean either that the book became heartbreaking at the end or that it was painful to read because of the mood it was trying to evoke. Judging by the one-star review, I'm going to assume the latter.

Well, maybe I can practice complaining in Japanese!
dorchadas: (Nyarlathotep)
I realized I haven't talked about Japanese tutoring in a while, so here's an update!

I had a rather long period in September when a variety of things, like my tutor being unexpectedly out of town, stomach trouble, and Yom Kippur kept me from meeting for a month, but since then I've gotten back into the groove. I mentioned to Aya-sensei in the first class that I could study up on grammar and vocab on my own time, and what I really needed was someone to actually practice all those words and bits I use, so class is mostly just us talking about whatever comes to mind. She's been giving me articles from NHK's Easy Japanese News section, and sometimes we stick to the topic, and sometimes we don't.

For example, last week's article was about a robot that supposedly can read people's moods and provide recommendations about restaurants and so on and we didn't say two words about it. Instead we ended up talking about Shabbat and what [personal profile] schoolpsychnerd and I do for it--ろうそくを点けて、ワインを飲んで、パンを食べて、祈ります--how long it takes, why Jews go out to Chinese food on Christmas, etc. And I actually really like that we get sent off on tangents so easily, because in a real conversation I'm not going to be able to refer to a script or prepared materials most of the time, I'm going to have to think on my feet, and talking about totally random topics definitely does that.

My stomach still ties up in knots on the way to class every week and I'd rather be hit by a meteor than go, but when I get there it's fine. I mean, that's pretty much the story of my mind, right? Everything is terrible until it happens and things turn out better than expected.
dorchadas: (Chicago)
Yesterday was the third class I had with Aya-sensei, and the first one where we managed to hold a conversation for basically the entire class without long pauses and me staring out the window. I realized that in a one-on-one situation with someone who knows English natively, there's nothing to be gained from me trying to remember a word for longer than a few seconds. If I can't remember it after a moment's thought, or if I can't understand a word that she uses, I should just ask her about it, write the word down so I can practice it later, and move on.

We spent half an hour talking about food, which as I'm sure you know, dear reader, I can go on about at length even in a language that I'm not particularly good at. We actually talked about Fifty Weeks, Fifty Curries, or at least about how [personal profile] schoolpsychnerd makes curry every Sunday and some of them are very weird. She definitely had no idea what to think about スイカのカレー, for example. She also said that a lot of Indian food tends to taste the same to her, but admitted that her major experience with Indian food was eating at Indian buffets as a child. I should have asked where she ate at, since she spent about half her childhood in Tokyo.

It was actually pretty nice, since the first lesson had a ton of pauses while I tried to say things in a probably overcomplicated way and this time we established a flow early and stuck to it pretty well. Maybe I can actually get good at this language!
dorchadas: (Kirby sweatdrop)
Yesterday was a team building day at work. As much as I complained about it, it was actually pretty well-run and inoffensive. No stupid trust fall exercises or silly games, the icebreaker was just "introduce yourself to a couple people you haven't met," and the majority of the day was talking about what it is exactly our department does--summary: we're the ones who make all the money--or discussing different communication styles through the lens of the DiSC, which I had never heard of before. You may be unsurprised to hear that I scored by far the highest on C, with S as the second-highest category.

And even with that low level of intrusiveness, by the end of the day I was still:

Out of energy

I love Introji.

And then tonight I have Japanese tutoring, which is also very well run and extremely helpful in providing a chance for me to actually speak Japanese instead of just reading it (which I'm pretty good at, though still not at newspaper level), but takes a lot of energy to deal with.

That's the eternal paradox of my mental state. Even things I am really looking forward to I often end up dreading at times, with my anticipation wildly careening around like a bat in a Castlevania level. I know it drives [personal profile] schoolpsychnerd crazy sometimes how I'll agree to go to an event, then a few days later act like going will literally lead to my death, then be excited again, all with unpredictable frequency and lengths of time.

I know a lot of people were annoyed about those introvert vs. extrovert articles going around last year and the year before since they painted all introverts as anxiety-ridden wrecks with a deep and fulfilling inner life ruined by those damn extroverts shitting their interactions all over everything, most memorably summed up in this tweet:


And reasonably so. I know plenty of introverts who love social interaction and just need a bit of alone time to recover from it. But not me.

I really am excited about your invitations and the vast majority of the time, when I arrive, I have a great time and I'm glad I came. But often my instinctual first response to any event is, "Uh, I have some forbidden alchemy to do that night..."
dorchadas: (Cherry Blossoms)
And I didn't spontaneously combust or have any of my exaggerated worries come to pass! Overcoming my anxiety like:

Sumo Dodge gif


I met Aya-san at a Starbucks in the Loop and after some brief English introductions, we spent most of the hour chatting in Japanese. That makes it sound much easier than it was, since I spent a lot of time trying to think of the right word or how specifically to phrase what I was trying to say, especially when I was explaining my favorite podcast to her--I said Revolutions, if you're curious--or telling about how [livejournal.com profile] jaiderai conspired to set [personal profile] schoolpsychnerd up with me. But even with pauses and my missteps, we managed to hold a conversation!

Afterward, she mentioned that my vocab is pretty good--which it should be with all the studying I do on the L every weekday--and I told her that I don't want to work on writing practice with her, since if I want writing practice there are plenty of Japanese-speakers I know that I can post to. We'll be working out of the venerable old げんき textbook, which [personal profile] schoolpsychnerd fortunately still has from her college days and going over grammar and its usage in conversation, and then the lessons will just be chatting, which is exactly what I need.

Next week, I undertake that most classic of Japanese experiences: the 自己紹介 (jikoshoukai, "self-introduction.") Better get working on that.

ACEN 2014!

2014-May-19, Monday 21:38
dorchadas: (Enter the Samurai)
Last weekend was ACEN, which I've been going for nine years at this point, though admittedly not consistently. My interests have changed at this point so that I'm not really all that into anime anymore and barely know what's coming out and what's popular, but ACEN is still a great place to catch up with friends that are scattered around the country (or just out of our non-car-owning transit radius) but meet up for a weekend. Several of the people I saw actually didn't even buy con badges, they just came for the company. Honestly I might be getting to that point myself based on the panel content, but I like wandering around the dealer's room too much to just give up on officially attending. The selection is often more interesting than you can find online, probably because there's a lack of IP lawyers standing around like hawks.

And now, the daily breakdown.

Friday
I took only a half-day off from work, because I didn't think that there would be much I wanted to see in the morning and because the AMA started it's summer half-day program on the day ACEN started, fortunately. I expected that [personal profile] schoolpsychnerd and I would arrive at about the same time, but literally as she was walking out the door a student came in who needed immediate attention and she ended up staying much longer than she intended and not arriving at the hotel until around 5:45. Since I had assumed she would be coming around the same time as I did and because I didn't want to haul a lunchbag to and from the con and because I'm really cheap, I didn't have lunch with me and so I ended up mostly just lounging around the room Friday afternoon. I did wander down to the dealer's room and over to [livejournal.com profile] redpikachu's booth (Natural Pop! Made with love) to buy another cute stuffed animal. Last time it was a frog, and this time it was a corgi, and when [personal profile] schoolpsychnerd finally arrived I gave it to her, and, well:


So happy!

We both ate a ton of food, because [personal profile] schoolpsychnerd hadn't gotten to eat lunch either with all the chaos at her school so we stuffed ourselves on apples, bananas, Syrian cheese, olives, almonds, homemade beef jerky, and dark chocolate. Then we went and met [personal profile] fiendishfanfares's husband, who had kindly offered to let us borrow his work laptop to give our panel on Saturday, for info about which see the Saturday section. Then we went back to our room again, powered up the laptop and transferred the presentation over, and ran through it once to make sure that we would be able to pull it off. Having done that successfully and confidently, we headed down to the AMV room.

Watching the AMV contest entries is somewhat of a tradition for [personal profile] schoolpsychnerd and I, though it was most prevalent in 2005-2008, when we were attending multiple cons per year and could see AMVs riffing off of AMVs we had seen at previous cons (like this Azumanga Daioh AMV, made as a parody of this Evangelion AMV which aired six months previous). In 2012 ACEN didn't have any AMV Contest because of some leadership kerfuffle, and since we didn't attend in 2013, and since we hadn't gone from 2009-2011 at all due to the whole living in Japan thing, so I was curious what had become of it and...well, there was barely anything to it. I remember at Otakon they'd have the AMV Contest entry viewings in one of the auditoriums, but this year at ACEN it was in one of the small video rooms and there were never more than a couple dozen people in there at a time. We didn't even get a sheet with the AMVs listed to vote on them like I remember previously. I was glad I managed to identify a VNV Nation just by the style (it was Control, set to a racing anime called Redline), but otherwise the contest was kind of sad, and we only stayed for a bit because a friend had invited us to go to Anime Hell.

We headed over to the place where Anime Hell was supposed to play, but they weren't letting anyone stand in line yet, so we headed up to our room for a bit to wait for the signal. When we got a text, we immediately took the stairs down and walked over to the ballroom, followed the enormous line that had somehow sprung up in the last 15 minutes, and at the very moment that we reached the end of the line, staff announced that the line was closed. While standing off to the side and trying to decide what to do, we ran into [livejournal.com profile] stephen_poon and some other people we knew, and after a brief chat, [personal profile] schoolpsychnerd, [livejournal.com profile] stephen_poon, and I headed over to the Hyatt's lobby bar for a drink and a chat. We were there for maybe five minutes before they called last call, so after some conversation we headed over to Red Bar for a while.

After a lovely conversation about [livejournal.com profile] stephen_poon's trip to Spain, and about Japan with another friend who had come to visit us in 2011, and then [personal profile] schoolpsychnerd said our farewells and headed off to Let's Play Oregon Trail, which we'd been to previously and had a lot of fun watching. It was about an hour in, and while the players this year had done better than last time (where the panicked players had forgotten to buy any weapons and were only able to hunt because the organizers took pity on them and let them buy a pistol), they still kept trying to hunt fast-moving birds with shotguns and not having much luck. After basically everyone starved to death within 30 miles of Independence, Missouri due to chronic incompetence, we succumbed to our tiredness, went back to the room, and slept.

Saturday
We were planning to go to a panel on Chicago's Anime Scene, but we thought that it would be best if we didn't set an alarm, and we woke up just a bit too late to go, so instead we went down to the dealer's room again since [personal profile] schoolpsychnerd had arrived too late on Friday to go before it closed. I had seen that Do Bats Eat Cats had a space in the Artists' Alley, and after seeing their jewelry at a store near us, and now that Japan paid us and we have money, [personal profile] schoolpsychnerd wanted some new earrings.

After getting those, we looked around for a booth selling Japanese tableware to replace the ones we had that have broken over the year, but couldn't find anything. I had figured that somewhere would have chopsticks, or tea cups, or something, but no. The most we found some was kitschy anime mugs. I know we'll be able to get them at the Ginza Festival in August, but it would have been nice to do it now.

Then it was time for our presentation: "Seifuku and Bunkasai: Japanese Education in Anime," which was about the differences in our experience of the Japanese education system vs. how we've seen it portrayed in anime. You can download our slides here if you didn't or couldn't attend, and we have plenty of stories to tell if you want. It's always hard to judge these things, but I think it went well. A few people came up and thanked us afterward, including a guy who had just been shortlisted for JET and was leaving in July, who hadn't been sure he would learn anything in the panel and actually learned a lot, and a woman who asked us about Keion. Also, not many people left during the panel, which is a good sign.

After a break back to our room for lunch (more homemade beef jerky, apples, olives, nuts, and cheese), we went back down to the AMV room and parked in there while waiting on word from one of our friends, and then when we got a text and he was in the General Gaming room, we headed over there and played Once Upon a Time, about which you can read a review I wrote here. A few games of that finished, we went back to the dealer's room again because I wanted an 8-bit Legend of Zelda heart keychain, but while we couldn't find one of those, we found this set of magnets:



On the way back from the dealer's room to the Hyatt, we ran into [personal profile] fiendishfanfares and her family, and while we had missed her daughter's cosplay, we did get to see video of her doing a kamehameha as only a toddler can. Then it was back to the AMV room to catch the re-airing of the contest videos, and while this time the freestyle videos were playing instead of the drama ones, we didn't stay that long because we hadn't eaten lunch in favor of a very large brunch, and they hadn't even handed out a voting card for the AMVs.

Dinner was at the Hyatt's restaurant, which intially looked incredibly expensive for average food, except it turned out that they had a "teriyaki buffet" for $22 that, well:


I was pleasant surprised, considering how much of a hipster foodie snob I am. They also had a dessert bar with cheesecake, which is an excellent way to my heart.

After another brief rest in the room, we headed out to a succession of room parties that lasted the rest of the night, though with one nice interruption. A friend I met in elementary school and have talked to sporadically in the years since then messaged me to let me know that he'd be in Red Bar meeting with some people he knew, and having picked up that I was at ACEN based on my Facebook posts, he asked if we wanted to meet up for a drink.

And we did, and despite all the comments I make about being aloof and having trouble with small talk and blah blah blah, we had no trouble keeping a conversation going despite not really talking in depth since middle school. He also sold us on Wizard World, and while I'm not sure we're going to make it this year due to its proximity, though we might go for the day on Saturday, but we'll certainly try to get there in the future. I've been leery of going to comic conventions, just because I know so little about comics--I had to ask [personal profile] schoolpsychnerd who the Avengers were--but since so much of ACEN was us talking to friends, Wizard World or the various other cons in Chicago could easily be the same thing. And maybe I'd learn something and no longer be a comic Fake Geek Guy.

After a nice conversation and a following succession of room parties and meeting with friends, we elected to skip the rave and the various events happening late at night and went to bed at 12:30.

Sunday
We woke up late and missed the panels we wanted to go to again, including one called "ACEN over 30," which I suspect was placed at 9:15 a.m. because all of us old-timers can't stay up raving until 5 a.m. like the kiddies can. But we slept past it, and after cleaning our room and checking out, we headed down to the dealer's room for one last look around and I managed to find an 8-bit heart keychain. Then we went back to the AMV room, found it was closed, and with nothing further to do and feeling pretty tired, we headed out to the Blue Line and went home.


I'm not sure I'm really the audience for ACEN anymore. I think in the last year we've watched...maybe a dozen episodes of anime, and quite possibly less, because I don't remember when we finished Ghost in the Shell: Stand Alone Complex. It's not that I dislike it or anything, it's just that there's so many things competing for my attention that it tends to fall into a lower tier. I didn't even attend any panels this year other than the one that [personal profile] schoolpsychnerd and I presented.

Despite that, I'm probably going to still keep coming, because it's a great excuse to see people and catch up. Even if I'm not happily going to the various panels and dancing for hours, there's enough there to keep me interested. Maybe we'll even do more panels. I don't care about all the fan panels that take up a big chunk of the schedule, but living in Japan for years does give us a perspective that I suspect a lot of the attendees for ACEN wish they had.

Oh, and cosplay I liked:


Probably the most accurate Sephiroth I've ever seen. Ah, those early Playstation graphics.


Chrono Trigger is one of my favorite games, and this is one of my favorite cosplays.


I'm [personal profile] dorchadas and this is my favorite Mass Effect cosplay at ACEN.


I didn't actually see this guy, I just grabbed the photo from Twitter. But that's awesome.
dorchadas: (Judaism Magen David)
In the past month, [personal profile] schoolpsychnerd and I have been going to a night class at our synagogue about the history of hasidism, or at least how it developed and how it spread so quickly afterwards even though its members were under a ban of excommunication, back when we did stuff like that.

I didn't actually like the Petrovsky-Shtern's lecturing style very much, though it wasn't bad or anything. I've had classes where the professor told us to read a series of webpages to prepare for class and then the actual class was just a restatement of those pages, and this wasn't nearly that terrible. It just rubbed me the wrong way, I guess.

There were some really interesting points raised. Like, how opponents of the Baal Shem Tov often claimed that he thought he was the messiah, but in the single extant piece of writing we have from him, he says:
Because of the great joy that I saw among them, I decided to ascend with them. Due to the great danger involved in ascending to the supernal universes, I asked my master to come with me, as I had never before ascended to such a high level. I ascended from level to level until I entered the chamber of the Mashiach, where the Mashiach learns Torah with all the sages and tzadikim and also with the Seven Shepherds.
Obviously, if the Baal Shem Tov is talking with the messiah in a dream, then he doesn't think he's the messiah.

One thing I hadn't realized was just how much influence chasidism had on modern Judaism. Like, originally the sermons were given by people called maggidim, whereas the office of rabbi was primarily a judicial position, whose adherents spent their time adjudicating cases and answering questions of halakhah. In surviving rabbinical contracts, it's stipulated that the rabbi give two sermons a year, one on Shabbat ha-Gadol before Passover and one on Shabbat Shuva before Yom Kippur. Among the chasidim, though, the tzaddikim acted as both an arbitrator of the law and as the one who gave the sermons, which is basically where the rabbis sit today.

Another point is the blending of sacred and secular. Every act can be holy, which is why there are prayers for nearly everything including using the bathroom, but the idea that ordinary acts can bring one closer to G-d is a very hasidic idea. Back in the day, the primary way to get closer to G-d was to study Talmud, which was limited to male students of yeshivot. So that immediately opens things up to women, the illiterate, people who don't have time or ability to study Talmud, and so on, which is part of why hasidism went from a small movement among ascetics who fasted from Shabbat to Shabbat and lived apart from the community to a group focused on finding G-d through experiencing joy that swept across all of Eastern Europe in a single generation.

Petrovsky-Shtern also threw out an idea at the end of the final class that I thought was very interesting, but he didn't have time to explain it in detail. Basically, he argued that modern hasidism could only have arisen after it spread to Russia from Poland because a lot of its characteristics are very similar to that of the Russian aristocracy. Dynastic succession of rebbes, for example--in Poland, the king was elected--or the way that the entourages of the leaders were very similar to the Tsar's entourage.

I probably wouldn't do it again if I had the chance--see above about the lecturing style--but I would read his books. He just came out with The Golden Age Shtetl, which sounds like exactly the sort of book I like. Yet another one to put on top of the giant pile.
dorchadas: (Dreams are older)
Well, that's finished, then. You can play my final project in the form I submitted it here--click the arrow in the upper left to start the game.

In some ways, the fears I expressed in previous posts were correct. A lot of the syntax we learned dealt with the specific implementation of Python that was used for the class that is not going to be the same anywhere else. Ways to load images, and take in mouse clicks and keyboard commands, and implement elements of the GUI, and so on. It's possible that they're similar to some kind of standard interpretation, but if so, I have no idea because we didn't learn about that. But programming isn't all just memorizing specific commands. It's more about learning ways of thinking and problem-solving skills that you can transfer over into any other programming language other than the one you started learning on, though this is obviously more or less difficult depending on the construction of the particular language.

I did run into some fun moments when I was developing this:



That was how it looked after I implemented multiple asteroids spawning and multiple missiles firing, but before I included anything about collisions. I messed around with it not just for the picture, but also to see if it was possible to have so many objects on the screen at one time that the game crashed, which it didn't. It did suffer from a lot of slowdown, which you'll also see if you try to play the finished version, but fixing that is one of the things I want to mess with now that the actual course is done. Right now it checks for collisions 60 times a second and it doesn't take position into account at all so it checks the entire screen every time even if there's only two objects on opposite ends of the screen. Hacking that down to maybe 4 times a second would probably make it work a lot better. See, an increasing number of objects becomes geometrically more intensive, because each object has to check for collision with everything already there, and everything already there has to check collision with it. Doing that when there's 12 asteroids and a ship and a few missiles and it's all being done through a browser-based code implementation which already slows everything down anyway is overkill.

On a further subject, look at the explosions in the game above. They weren't required as part of the assignment, but they were listed as a bonus step if we felt like we would be able to implement them, and I figured I'd give it a try. It only took about 15 minutes and was pretty easy. It was just loading the game, shooting things, getting an error message, fixing that, repeat until I finally didn't get any error messages. It was pretty much the perfect ideal of what bug-fixing should be like. Though once it worked, the explosion graphic was cycling through the various frames way too quickly and in the wrong location for the sprites, so that had to be fixed, but that just required checking how big the sprite was to make sure that I would cycle through to the next frame properly.

There's still more I want to do now, for my own personal improvement. Make the playing area bigger and the ship and missiles smaller. Maybe add powerups, that make missiles go further, or that shoot out two or three missiles with each press of the fire button, or a shield that blocks a single hit. A limited teleport that moves the ship elsewhere. Make the asteroids only spawn near the edge of the screen and drift toward the center instead of randomly appearing out of nowhere. Porting it over to regular Python instead of Codeskulptor's version of it.

Would I recommend this class? Not really. Even for a free class, I think it focused far too much on the idiosyncrasies of the class's specific implementation of Python and had several lazy practices, like the use of global variables because the GUI can't handle input any other way. That's not to say that I thought it was worthless, because it wasn't, but there are a bunch of other free sources for learning programming if, like me, you're cheapassunwilling to spend money.
dorchadas: (Kirby Walk)
a.k.a.: Lasers, pew pew!

This week and next week are the same project. We're doing an implementation of the old classic asteroids, though our version has sounds and actual sprite-based graphics because the professors programmed a GUI capable of handling such things.

It only took a couple hours to do, though I ran into a problem not based on programming but on math (to the extent that there's a difference anyway). So, you want to move a spaceship in the vacuum of space. That makes you need to take Newtonian mechanics into account, unless you're making X-Wing and want World War II dogfights in space, but we aren't. Except for the friction. We have friction in space. It's in the design requirements for the program.

I guess this like how in Power Rangers the moon has an atmosphere.

Anyway, Newtonian mechanics. If you don't know what I mean, it means that if you go forward, and then go left, you maintain your forward inertia and end up traveling at an angle, so I needed to calculate properly to make sure that happens when you're moving the ship around. In summary, the movement keys control acceleration, not velocity (at least for forward movement). Fortunately, it turns out that it's possible to turn an angle into a movement vector as long as you have the angle in radians, using the cosine and the sine of the angle. The problem I ran into was in correctly adding that to current movement to produce the new movement and make it look smooth, which took an hour and turned out to be incredibly simple, much like my problem with brackets and list comprehensions earlier. Just...add them. And include a constant to make sure the movement is smooth and scales up to the maximum possible velocity slowly, but that's easy enough. I'm starting to wonder how much of programming time is wasted in making simple problems harder than they should be. I guess that's why the Ballmer Peak is a real thing.

This is why I described programming as "math with more words" on Facebook. Even though the programs do the actual calculations for you, you still need to understand enough math to write the equations correctly. Or enough to Google how to write the equations correctly. Ahem.

Also, I wrote this method for the Ship class that handles the behavior of the player's ship:def chargin_mah_lazor(self, pew_pew_pew):
global a_missile
lazor_bank = [self.pos[0] + angle_to_vector(self.angle)[0] * self.image_size[0] / 2, self.pos[1] + angle_to_vector(self.angle)[1] * self.image_size[1] / 2]
if pew_pew_pew == True:
a_missile = Sprite(lazor_bank, [self.vel[0] + angle_to_vector(self.angle)[0] * 3,
self.vel[1] + angle_to_vector(self.angle)[1] * 3],
self.angle, 0, missile_image, missile_info, missile_sound)

We can always use more laz0rs in our games, right? The documentation calls them missiles, but it's not like they have missile graphics. They're little blue star-shaped energy balls. That's as close to an 8/16-bit laser as makes no difference.

On the topic of things I learned this week, I learned about Magic Numbers, which are when you find random inexplicable numbers in the code whose value seems to be pulled out of nowhere. I did that when I wrote Pong and got called out for it, and almost did that this week when I was trying to make sure flying off one side of the screen would put the ship back on the other side. I was all ready to write in the raw numbers of the size of the playing field when I realized that the program template had set the Width and Height as globals precisely so that I could just say, for example, “pos[0] %= WIDTH” and then if I ever changed the size of the playing field, the rest of the code takes that into account and I don’t have the ship randomly disappearing and reappearing in other places.

Next week--the last week of the course--we deal with actually making the asteroids collide with the ship, making laz0rs blow up the asteroids, spawning new asteroids, keeping score, and so on. And then we're done! Though at the moment, my current plan is to keep tinkering with it. Adding some kind of limited-quality teleport, maybe adding powerups, other ships that try to kill you, that kind of thing. Sure, it's derivative, but it'll be a good learning experience.
dorchadas: (Green Sky)
This week was all about classes and objects and object-oriented programming.

Hmm. It's a good thing this class doesn't cover hardware or I'd be writing about master/slave systems.

Anyway, this week we programmed a graphical implementation of Blackjack. To my surprise, the graphical part was really easy--it was the logic of getting the cards to work that was hard and required some banging of my head against the wall. The way they suggested we did it involved three object classes: a Card class that handles the individual cards, including assigning values and suits to each of them and retrieving the proper image for drawing a single card to the GUI, all of which was implemented already in the program template we got; a Hand class that combines cards into a hand, deals with drawing new cards from the deck, and calculates the value of the hand for comparison, and a Deck class that assembled the proper 52 cards into a deck, figured out which card was on top and passed that card to each hand, and shuffled itself when starting a new game. Each class also had a method to report its contents which wasn't useful in the final program but was really, really helpful when I was trying to figure out what the hell was going wrong.

And oh, did things go wrong. Not with the graphical part--that was actually really easy to implement. But getting Hand and Deck to work was an adventure. First I couldn't get it to properly calculate the value of a hand, so it was a wildcard whether you won or lost. Then it was ignoring the ace special rules completely, so the classic blackjack hand was only worth 11. Then the Deck wasn't properly drawing cards, so I was pulling cards aren't that weren't on the top. Then when I fixed that and got both hands implemented, hitting worked, but standing caused an Index Out of Range error on an attempt to access a relative list element (blahblah[-1], which should get the last element in the list no matter how long the list is). Then I went and fiddled with something totally unrelated to fix the problem that after a single game the hands weren't cleared, so a new game would start with the hands from the previous game plus two new cards for each player. When I fixed that, all of a sudden the list index stopped returning errors because reasons, and despite extensive testing I couldn't get the index errors to show up again. Then I had a problem with calculating the score properly because sometimes I was doing it one way and sometimes another way, and sometimes the testing statement I printed showed the one way when it was actually using the other way, which is why you shouldn't rely entirely on print statements to debug your code. Then I extensively tested the program as an implementation in the console and made sure everything worked.

Then I implemented the GUI without problems. Crazy, right?
dorchadas: (Dreams are older)
This week was programming an implementation of Memory (the card game) and a big lesson on lists and dictionaries. There was also a lecture that was mostly devoted to the concept of iterative improvement and how important it is to programming.

The name does basically say it all, but I'll describe it anyway to avoid any confusion--don't do everything at once. Unless you are The One, destined to obtain power over the Matrix and defeat the machines, the programs you write will have errors. Some of them will be obvious because the program won't work at all, and modern languages tend to be reasonably good at telling you where a program breaks if the syntax is wrong. Sometimes the program works but it just provides a bad output, and if the entire program is all crafted at the same time, it's incredibly difficult to figure out exactly where the point of failure is. Much better to do step 1, make sure it works, do step 2, make sure that works with step 1, etc., until the entire thing works together.

Though as a story, sometimes syntax errors just screw things up. I was reading a forum thread where someone was trying to add a Coptic culture to Crusader Kings II and ended up with most of England filled with Noculture kingdoms speaking Noculturian. A later post in the thread suggested an unmatched parenthesis as the most probable cause. Oops.

I still have 100% in the course, though some feedback I got on last week's project was enlightening. I wrote Pong, and there were variables for the width of the paddle, the radius of the ball, the height of the paddle, and so on. When I calculated when score should be counted and when the ball should bounce back, I tended to calculate it in absolute distance by eyeballing it and adjusting the pixel count, and in the end, the program worked, so I submitted it. The feedback suggested I use the variables and that my code was hard to read because I hadn't used them, and until I saw that sentence, calculating the point where a score would be granted as if ball_pos[0] < PAD_WIDTH + BALL_RADIUS: instead of using the direct numerical values, because while it didn't matter here, it's best practices in the future to make sure that if the size of the playing field gets changed, then everything still works properly.

I also relearned the importance of math. For Memory, it's obviously important to know which card the player clicks on, and in the beginning all I could think of was needing a giant if statement--like, if click[0] > 0 and click[0] < 50:, and so on for every group of 50 for each of the cards, but I knew that there had to be an easier way, so I headed to the class forums. Someone there had the same problem, and a comment mentioned integer division, after which the light bloomed in my head and the rest of the coding was pretty easy. Since the cards are a standard width, just divide the X coordinate of the mouseclick by that width using integer division and the whole number left will tell me what card was clicked on. 382 // 50 = 7, so that's the 8th card, because 31 // 50 = 0, so the first card is the 0th card when checking the list of cards.

Incidentally, I think I've learned why Python list indices start at 0 instead of 1.
dorchadas: (Broken Dream)
I don't have as much to report this week. We learned how to use lists and tuples (etymology if, like me, you had no idea what that was), and programmed Pong.

Well, more like pseudo-Pong. See, our implementation doesn't keep track of the ball bouncing off the sides or corners of the paddle by using a "gutter" that's the same width as the paddle. That allows us to avoid having to do complicated math to figure out what direction the ball would have to bounce if it hit the edge, and by going all elementary physics and treating the ball as a spherical object in a vacuum--which, well, it is--we can just reverse the appropriate components of the velocity. It's pretty simplistic, though it was good practice for proper ordering of if-statements and a reminder that copying and pasting code can often be more trouble than just re-writing the same code. I spent ~15 minutes trying to figure out why the paddles were working in one direction but going berzerk in the other until I realized that when I copied the movement code from one paddle to the other, I didn't change all the variables, so the right paddle controlled itself and the left paddle controlled itself and the right paddle. Oops.

If you want to play an awesome version of Pong, don't play my version. Play Plasma Pong.

The overuse of global variables continues, and seems to be completely due to lazy coding for the GUI they're using. As near as I can tell, most UI elements that take player input cannot accept any input other than from the UI itself and can't call other functions, which makes passing variables around among functions difficult at best. It's something I'll have to keep in mind when I try to become a programmer, motherfucker.
dorchadas: (Drop Bear)
There was a forum thread (link provided even though it might be inaccessible) where one of the people in the class mentioned that a lot of the code they were reading was pretty inelegant and clunky, specifically citing the example of using a boolean global variable instead of using the timer.is_running() function to determine whether to award points in the stopwatch game, and that they had provided suggestions of how to improve the person's code while still only grading them on what was in the grading rubric.

Since I already wrote about timer.is_running I won't repeat myself, but I was kind of surprised at the reception the poster got. Even though they specifically said that they didn't take points off for inelegant code, they got downvoted like crazy and some kind of hostile comments, mostly about how this is an introductory course etc. etc. And that's true, but there's no reason to teach bad habits that people will just have to unlearn later. It's easier to learn than it is to unlearn and then learn something different.

I guess it's like the quote goes:
The trouble with most of us is that we'd rather be ruined by praise than saved by criticism.
-Norman Vincent Peale
Huh. Re-reading the thread, things are better now. When I first looked, the OP's posts were all getting downrated quite heavily. Perhaps I was too quick to judge.
dorchadas: (Green Sky)
I'm growing increasingly concerned that the processes I'm learning in this class aren't necessarily transferable, though I suppose that's also true of people who spend a long time with one company and have to work with their proprietary systems. See, the class is about learning to program through making games, and to facilitate this, the teachers made a bare-bones GUI that we use to get images and text to appear. That's all well and good, but I'm running up against programming best practices here. Global variables are bad, but as near as I can tell, the GUI requires the use of global variables to function at all, since some of the functions for manipulating the GUI don't take any inputs. It give me an added impetus to make sure I understand the underlying principles rather than just blinding writing random things until it works.

This week was just learning more ways to manipulate the GUI, though I did learn that graphics coordinates are measured from the upper left of the plane rather than the lower left as one might expect, apparently because of the way old CRTs scanned--from top to bottom and left to right. The actual program was a stopwatch game--stop the stopwatch on a whole number, get a point--and the program dealt with storing the time in deciseconds as an integer, converting that into a minutes:seconds.deciseconds format, and then properly accounting for 60 seconds becoming a new minute, prevent ~.1 from awarding points due to improper rounding, and prevent the player from spamming the stop button on ~.0 to rack up their score.

It's the last one that was a bit concerning. The teachers suggested using a global boolean variable to track whether the stopwatch was running and preventing it from increasing the score if it wasn't, which, okay. The problem is that the GUI includes a timer.is_running() function to innately determine that, which I learned about by reading the documentation, so I just used that. Why didn't the teachers mention that, since they programmed the damn GUI themselves? You'd think that would be relevant in the first assignment where we learned how timers work.

Animecharactersigh.jpg

In other news, I ran into a really odd situation during peer evaluation of last week's project. In the comments on the project, the guy who wrote it copyrighted it. I wouldn't have thought that this was more than an odd quirk of his personality--you're copyrighting a guess the number game? Sure, whatever, dude--except his code didn't even work. And I don't mean in some subtle way that required me to dig into it to figure it out, I mean that I pressed the "Random number 1-100" button and the program threw an error and quit. Not only that, but it was supposed to cycle through again after you ran out of guesses, so you could just keep playing over and over again if you want. His program didn't do that. It went through two cycles, but then threw an error and quit. Not only that, but getting the number correct on the last guess didn't properly credit you. The game just told you you lost and then started over, and then the second cycle was impossible to win because it errored out. I mean, this would have taken literally seconds to figure out from a cursory test, but he didn't do it.

I suppose this is how QA people feel all the time.

Edit: Poking around the class forums on the topic of global variables, I found this quote:
In event driven programming you need to keep state around between event handlers. Using global variables is the easiest way to do this at the beginning level. At the end of the course, I will discuss how you can migrate towards using better practices.

Global variables are bad because they lead to insidious problems that are often hard to track down in larger programs. In the small programs that we are writing here, they are often manageable, even if they are not really desirable (and still can lead to bugs).
So, we'll see how that turns out.
dorchadas: (Office Space)
Wherein I learn not to blindly trust advice from people who are supposed to be my betters!

So, context. This week, we're writing a program that plays a simple "guess the number" game. Using the GUI library that they wrote for the class, we have to make it pop up a window, provide two buttons that changes the range of the game from 1-100 or 1-1000, and an input field for the player to put in their guesses. Then the program gives the player a set number of guesses--because, for example, any number between 1 and 100 can be found in seven guesses using binary searching--and when the player runs out, the game fails the player, prints out what the number was, and starts over.

It's the last part that was giving me trouble. Following the instructions suggested by one of the instructors, I wrote the main part of the program like so:
>>>Call global variables into the function
>>>If statement to check if the player has no guesses left and end the game if that was true.
>>>Decrement the guess counter
>>>Turn the player's input from a string into an integer so it can be compared to the computer's choice.
>>>If statement to do the actual comparing. If the player is wrong, print "higher!" or "lower!" and run through the loop again. If the player is right, tell them they win and start a new game.

The problem I kept running into was that either the game would end after (number of guesses you were supposed to get - 1), or that the player would get the number of guesses they were supposed to, and then the game would ask for one more input, which would end the game no matter what even the player made that guess correctly. Can you see where I went wrong here?

The problem is the order I set up the operations. Since the checking for how many guesses are left comes before the actual processing of the guesses, it means that after the final guess, the only place to go is back to the beginning of the loop and wait for more input. Then it gets that input, realizes that guesses are zero, and quits the game before it processes the guess, so the player gets the correct number of guesses but has to input a last futile guess to correctly end the game.

Originally, I tried moving the decrement to above the if statement, but that doesn't change the order of processes. All it did was meant that the player got one fewer guess than they were supposed to. Only moving the processing of the guess to the end of the function properly kicked the player out after the last guess. At the very beginning, I had put the check as part of a single if statement that also checked the guess for correctness, but that didn't work, and it took me a while to figure out why. The reason is that it's an if statement, not a "perform one or more of the following as may apply" statement, so it had the same problem as my implemenetation above--namely, that it needed an input to realize that the player had no guesses left.


Apparently there's also a while operator, and I could have jammed the whole thing under while guess_count > 0 [blah blah blah] else: print "LOL UR BAD" / new_game(), but we haven't actually covered that and I didn't want to mess with it, though I might go back and screw around with logs to figure out how many guesses the program gives the player instead of hard-coding in the two possibilities--seven guesses for 1-100 and ten for 1-1000.

And I'm sure there are other ways to implement this. One of the things that peer grading the first assignment showed me is that the obviously correct answer that I, of course, used in my personal implementation of the project was not the only possible way to do it. I don't recall where I read it, but I read a quote that said that you can become an adequate programmer working by yourself, and even a good one, but you'll never become a great programmer unless you work on other people's code and have other people work on yours. There aren't any group projects in this class, but grading each other's assignments at least exposes us to the way other people code.

Also, it's the only possible way to do it because the class has thousands of students and nowhere near enough instructors to evaluate everyone's assignments, but the principle still applies.
dorchadas: (Gendowned)
I'm pretty sure this is the week that a lot of people flee in terror when they realize that programming is just math with more words. And not only that, the words are things like "random.randrange()" and "print" and "def" and "if/elif/else" and not actual sentences.

Fucking random.randrange().

Let me explain. In Python, there are two main ways to get a random integer (well, there's probably more, but there are two I know of). There's random.randint(), which returns everything from X to Y inclusive, and random.randrange, which returns everything from X to (Y-1). Forgetting that distinction let me to some problems in my program that I had to go back and fix because the program wasn't returning the full range of possible answers.

The assignment this week was to make a program that plays Rock-paper-scissors-lizard-Spock, has the computer make a random guess, and determine the winner. We haven't learned how to implement dynamic input yet, or how to implement a GUI, so it just takes hardcoded player "guesses" and then returns a range of responses, and it's up to us to show that those responses are properly random and the program interprets who wins and who loses correctly. This takes math.

The hard way is to implement a giant if/elif/else statement using Booleans that takes into account every possible combination of throws, which is really long and annoying, and the easy way is to convert the throws into numbers and use math, since it's possible to plot the throws on a wheel--as in the wiki article linked above--and assign them numbers. Subtract, interpret the number to determine winner or loser, and boom. It didn't take all that long, fortunately, but I do need to go back and look into doing modulo operations with negative numbers. 3 mod 5 is 3, because there's 3 left over after the 0 times 3 is divisible by 5 in integer division, but -2 mod 5 is also 3 because ??? Because of floor division and the difference between 2 and 5? Doing other mod operations makes it seem like that's the case, but I don't want to have developed a rule-of-thumb that turns out to be inaccurate later.

That's the thing--the computer only does what you tell it to, so you need to have at least some understanding of the underlying math or you won't be able to tell when the answer seems wrong. In this week's quiz, I had to build programs to calculate inputs into these formulas: ¼ n s2 / tan(π / n) and f(x) = -5x5 + 69x2 - 47 . Those are the kind of cases where knowing what the answer should be, even as a rough ballpark, is really handy.
dorchadas: (For the Horde!)
I typically like to use the kanji for my tags even if there's a kana equivalent, just because I think it looks more elegant, but sometimes I just don't have a choice because the kana version is far, far more common than the kanji one. Computer programming is one such tag.

So yesterday I started that programming class I mentioned a few months ago. Well, it's not actually the same class, since the original one that I wanted to take ended up being removed or vanishing for no obvious reason, but the new one might be a better fit for maintaining my interest. It's all about using Python for programming games. This week is "Week 0" and so I basically don't have to do anything--my assignment is to submit a program that's one line--but at least it's giving me a nice intro into the format of a Coursera class and what exactly to expect.

There's a custom implementation of Python they built to make it easy to submit programs you can play around with here if you want.

Profile

dorchadas: (Default)
dorchadas

June 2025

M T W T F S S
      1
234 5 678
9101112 131415
16171819202122
23242526272829
30      

Syndicate

RSS Atom
OSZAR »