Announcing The “Stupid” Javascript Framework

This came about after attempting to write the longest and most inefficient getElementById function I could.

http://github.com/psychcf/stupid

Feel free to fork it, add more functions, and make it better (or worse, depending on how you look at it).

Posted in Uncategorized | 1 Comment

My Sumobot From Last Year

I haven’t really shown off any of my robots, so I figured I’d just show one of them quickly.I built this for an event that’s a part of a school-wide  Science Olympiads competition. Multiple schools participate. Since I’m the only real hardcore technology person in my school (there are computer enthusiasts, but none that I know of can program very well, and none of them have built something like this), obviously I get all the complicated work, and nobody else helps, heh. Such is life I suppose, although I’m hoping in college I meet some more people who share an interest.

Here’s the one from last year, “The Nex”. I named it after the weapon from the game Nexuiz, and borrowed the Nexuiz logo for it, since I literally finished this hours before the competition, and couldn’t come up with an original name.

You can see the internals better here:

Just a 7.2 volt battery, two speed controllers, two rather large motors, and a futaba radio system (missing from the picture because I’m reusing it in this year’s robot). I used worm gears to build this, but the problem was that the gears kept slipping, despite my efforts to prevent this from happening. Despite the fact that it barely worked, and that it was just a box that was made from glued together Plexiglas, it did surprisingly well, ranking 8th out of 52 teams at the Science Olympiads event.

I’ll write another post on this year’s robot after the competition. It’s definitely an improvement over last year’s model, and almost completely rebuilt too.

Posted in Uncategorized | Tagged , | Leave a comment

Common Japanese dialogue words

I’m teaching two friends that I’m planning on going to Japan with Japanese, and I put together a list of common dialogue words for them, so I figured I’d throw them up here as well, maybe somebody will find them useful (I can’t seem to find anything that has all these words on it). Actually, this may be the start of a series of posts about learning Japanese, maybe how I’m teaching myself, etc. Anyways, here’s the list:

  • watashi (私) / boku (僕) = me, I (boku used for males only)
  • hai (はい) = yes
  • iie (いいえ) = no
  • nani/nan (何) = what
  • namae (名前) = name
  • sou (そう) = so that’s how it is, that’s how it is, is that so?, really, seemingly, etc.
  • nai (ない) = that’s not how it is (literally means ‘not’, but when used in a single word sentence that’s usually what it means)
  • ii (いい) = good (also used to reject an offer)
  • dakara (だから) = therefore, so, etc.
  • koko (ここ) = here
  • kore (これ) = this (item near the speaker)
  • sore (それ) = that (item close to the listener)
  • are (あれ) = that (item distant from speaker and listener)
  • hontoni (本当に) = really (as in “really?!”, but can also be used as in “He really needs to exercise.”)
  • zettai (絶対) = absolutely, unconditionally
  • yappari (矢っ張り) = also, as I thought, still, in spite of, absolutely, of course
  • mochiron (勿論) = naturally, of course
  • mattaku (全く) = good grief, honestly, seriously (expression of exasperation. As in “honestly, I don’t know why you keep doing that, it’s just stupid.”)
  • hidoi (ひどい) = cruel, terrible, awful (usually means something like “you’re terrible” or “that’s awful”, etc.)
  • matte (待って) = (please) wait (from the verb ‘to wait’, matsu (待つ) conjugated in the -te form)
  • chotto (一寸) = hey! (usually used before matte, eg “chotto matte!”, usually used when the speaker wants the listener to wait)
  • abunai (危ない) = dangerous (when shouted out, it could mean “hey, watch out!”)
  • nee (ねえ) = Hey! (usually used to get people’s attention, not used to greet people. Note that it’s not pronounced as in “knee”, the extra e just elongates the first e, pronounced more like ‘neh’, except without the h. You get the idea.)
  • hora (ほら) = look!, look at me!, look out! (Similar in function to “Hey!” in english, but different from nee in japanese)
  • urusai (五月蝿い) = noisy, loud (Sometimes translates loosely to “shut up!” when used in a one-word sentence)
  • anata (あなた) = you (Don’t use this if the person has told you their name already, it’s considered rude. If they have, just use their name in place of anata.)
  • kimi (きみ) = you (familiar) (This is somewhat similar to ‘bro’ or ‘buddy’ here I guess, don’t use this in polite situations. I hear old people use this a lot, so I guess it could also mean ’sonny’, so I guess it depends on context. Males only really use this. Note that I’m not 100% certain on this one, if I’m wrong please point it out.)
  • suki (好き) = pleasurable, fondness (There’s no Japanese verb for ‘like’, so use this. Sometimes pronounced ’ski’.)
  • kirai (嫌い) = dislike, hate (There may be a verb for this, but I’m not entirely sure)
  • desu (です) = not a real word, just used to end sentences when speaking in a polite manner. Can also be pronounced ‘des’.
  • ano (あの) / eto (えと) / sono (その) = umm…, err…, well…, etc.
  • doushitano (どうしたの) = what’s wrong? (usually pronounced doushtano)
  • nandemonai (何でもない) = easy, harmless (often used as a response to doshitano)
  • betsuni (別に) = nothing, not particularly (also a response to doshitano)
  • douzo (どうぞ) = go ahead, take it, come in, etc. (this word has a lot of uses, can be used after someone knocks on a door, when someone is offering something to someone else, etc.)
  • miru (見る)/mite (見て) = to look / look, respectively (mite can be used as an interjection, eg “Mite!” means “Look!” Mite itself is a request to look at something though.)

These are pretty much used all the time, some more then others, but I personally hear them used a lot in the things I watch. I find that the best way to memorize words is if you use them in context, even if it’s in the middle of an English sentence (eg, “I hontoni need to eat some food, dakara I’ll go to the kitchen.”), but, if possible, stick to Japanese sentences (unless you don’t know enough yet to use complete sentences). If you’re still having problems memorizing them, the next best way is probably to just watch stuff and listen for the words (although, this may not work with the words that are used less often).

Of course, if you want you can see a dictionary definition by copying the kana for the word and pasting it into a site like jisho.org.

(11/25/09) Update: added some more words that I forgot about

(11/26/09) Update: added some more words

Posted in Uncategorized | Tagged | 1 Comment

I’ll be back… soon…

So, if you haven’t talked to me in the past month or so, it’s probably because I’ve been so busy with school. Between writing my Intel paper, keeping up with the insane amount of homework, taking care of college apps (which I’m doing as I speak), and other things, I’ve been crazy busy. If you don’t already know, I’m involved with my school’s IB diploma program, it’s basically like AP but on steroids (It’s accelerated courses, but you not only have to take a test, but you also have to write numerous essays, as well as take a philosophy course. The grading system is a lot more like the one in Europe too, so the exams are much more challenging from what I can tell. Essays and exams are graded from 1-7, most people get a 4 or 5.) The good news is that I already got a 6 on the IB physics exam and a 7 on the IB math exam, so I’m in really good shape. I need to also teach myself the Physics work that we did first quarter, since I was so busy with other work that I didn’t have enough time to study and really understand the work. I’m really happy with my Intel paper though, it’s entitled “Improving the Security of a Multitouch Padlock Through Dynamic Time Warping Algorithms.” Here’s the 100-word layman’s summary:

The project I worked on is an on-screen padlock meant for use on multitouch displays, such as the iPhone (the “pinch-to-zoom” gesture is an application of such a display). It’s unique, because it actually tracks the finger movements while the user is inputting the combination, so that only the person who trained the padlock can unlock it. It uses a signature verification algorithm to do this. Since there is a combination aspect to the padlock as well, the programmed signature of the user can be encrypted, and as a result is more secure then a signature-based authentication alone.

Here’s a screenshot of what I’ve done so far with the padlock:

padlockscreenshot

It’s about 2400 words with an abstract, and 13 pages long, so I’m pretty happy with it. I still need to work on some of the code for it when I get my life back though, it’s something that I need to get finished in time for other competitions where I’m presenting the thing in front of a judge. The nice thing is that since I did this as a part of a mentorship with NYU Poly, they let me borrow a laptop with a multitouch screen, which is pretty awesome. I still need to tweak the paper a bit more as well, even though the deadline for Intel is past, I’m entering it into some other essay-based competitions, as well as using it for my extended essay for the IB diploma.

I’ve only got about a week of ‘lunatic mode’ before I can take it easy again. The crazy thing though is that after december I have so much to catch up on in my personal life. The first and most important is to start work on Lucid again. We’ve been discussing some ideas in private that we really think would be killer features (we’ve kept this private due to some concerns from the other project members, I’ll leave it at that). I’m really excited to work on Lucid again, and I definitely think doing some real work that I enjoy will give me a huge morale boost when it comes to doing my schoolwork (or, like it did Freshmen and Sophomore year, it will take over my life, heh). After that week, all I have to worry about is a world literature essay for English, and staying caught up in my classes. I’ve got IB exams in May as well, but that’s not until May.

On top of that I want to teach myself some japanese; some friends of mine (Ian, also known on the interwebs as Phandentium, although he wants to change it or something, and Mike, an IRL friend) are planning out a trip to Japan some time in august. Since hiring a translator would cost a huge amount of money, I’m teaching myself the language instead (and, trying to get the other two to learn a bit, but I think they’ll be relying on me for the most part). Hopefully I’ll be able to rake together enough money to pay for it.  I have to work pretty hard at this if I want to be prepared in time. At least during the summer I won’t have school to worry about, so I can study harder then. I’ve got a good grammar guide to work with, and I’m learning vocab mainly from things I watch/read, as well as from word lists on occasion. I do know a pretty good amount, but definitely not enough to be practical at this point.

Then of course I have some reading that I want to do, mainly some ebooks that I started but never finished. There’s a math book that a friend of mine lent me so I could teach myself matrices, but I haven’t gotten around to reading it yet. I may also want to skim through the bonus content of Freakonomics, read through David Kahn’s “The Code Book”, and maybe read through Malcom Gladwell’s new book (although, some parts of his books put me to sleep, while others are quite interesting). There’s also some shows/anime that I downloaded but haven’t watched yet, but I won’t get into them, since this post is already pretty long.

So yeah, looking forward for his eternal hell to finally be over. I’ve had a few mental break downs (mainly because I’ve always had a habit of procrastination, which I had to change in a fairly short timespan), but I think I’ll make it out ok. I suppose it’s better then being bored to death in regents-level courses. College is going to be awesome, hopefully my IB credits transfer so that I don’t have to retake boring liberal arts courses. I think just taking courses in something I actually have an interest in will be a welcome change in my life, right now the only two courses I really enjoy are math and physics, but I definitely like programming/computers more. I just hope I get into SUNY Stony Brook, right now that’s my number one choice. My SAT scores and GPA seem to be in the range that they’re looking for, so I should be able to get in (plus, as you can guess, my extracurriculars look freaking awesome with all the open source work I’ve done). Their CS graduate school is ranked 31st out of all of the colleges in America, which is pretty awesome, given it’s a state school. I’m still a bit unsure of the atmosphere there, but the people I’ve talked to from LILUG who go there say it’s great. I’m applying to 9 colleges though, so I can always figure out where I want to go later.

Regardless, I’m definitely looking forward to getting my life back.

Posted in Uncategorized | Tagged , | Leave a comment

Bullet Hell Games

I’ve never really been into 2D shooters, but recently I’ve found a new genre that is pretty awesome, named “Bullet Hell”. What sold me on these games was a game called rRootage. There’s also a port for Linux (and apparently an iPhone app as well). Below is a video of me playing one of the stages of the game.

There’s some other games like this such as the Touhou series, which I’ve been meaning to play, but don’t have the hard drive space for ATM.

The first few levels of rRootage are easier, but they start to get harder after stage 4A. It’s definitely a fun genre once you get past the whole “too many bullets, I can’t do this” mindset.

Posted in Uncategorized | 2 Comments

Appeal to linux, get tested early in development

I’ve been seeing a lot of OSS software lately that isn’t supporting linux, but could easily. Especially 64 bit users, which are growing in numbers thanks to ubuntu making 64 bit linux so damn easy.

Linux users are naturally early adopters (thus, they use linux). Limiting the support for this platform is a big mistake, because they are more likely to test the software early, and report bugs whenever there’s a problem.

Now, that doesn’t mean that this is always the case, I’ve met some pretty stupid linux users, but the majority are involved with open source in some way, even if it’s not programming.

What I’m trying to say is, I really want Gears to work on my main box, but it isn’t just limited to that. Firefox extensions really should support 64 bit, because by default 64 bit firefox is used in 64 bit Ubuntu, as with most other distros. Personally, I’m not going to start using 32 bit firefox just for Gears, the disadvantages outweigh the advantages.

Anyways, that’s my rant. Now go fix the problem. Thanks.

Posted in Uncategorized | Tagged , , | 4 Comments

Double Guitar Solo

Holy Jesus.

I think the most impressive part is where he plays two completely different parts on each side. (2:20)

This just amazes me.

Posted in Uncategorized | Tagged , | Leave a comment

How Chrome will improve other browsers

After reading Alex’s post, I’ve thought about what chrome should be, and what tech editors don’t seem to get.

I think the point of Chrome is to really get some ideas rolling for the major browser vendors. Specifically, threads. Threads are great, and I really do think browsers should start using them. I’ve been wanting this for a very long time. Chrome will (hopefully) start getting the browser vendors motivated to try them out. But, when you use threads excessively, it adds un-needed overhead (which is exactly what Chrome is doing). The way they sandbox plugins using them is a good plus, because it takes the blame off the browser when a plugin crashes. Pages, however, should definitely let the browser take the blame. I feel that it makes fixing renderer and js engine bugs less important when you use threads, since their consequence isn’t as great. On top of that, using a thread for every page is just wasteful of resources. Think of what would happen if several popups opened up (all having some sort of “shoot the monkey” flash game). Yikes.

So, how would things work in a perfect world? Browsers could get the renderer, and the js engine on separate threads (either both on the same thread, or each having their own). This way, the browser will work well on a multi-core system, but it doesn’t become a “thread whore”. When you think about it, the user only uses one RIA at a time, and most RIAs don’t use the CPU when they’re not being interacted with (and if they do, they should really use worker pools). Epiphany, Gnome’s web browser, implements this behavior, and it works very nicely. All while avoiding the need to spawn a bazillion threads while doing so.

So, Not only is the press making crazy stories (as you can see from Alex’s blog), but Chrome isn’t what they’re making it out to be. It’s not “Google is taking over the earth”, it’s more like “Google is trying to bring their ideas to the table”. And quite frankly, I can’t wait to start seeing the browsers follow Google’s path, and implement threads (sparingly, of course).

Posted in Uncategorized | 1 Comment

My thoughts on Google Chrome (Part 2)

Ok, so I tried out Chrome. It’s pretty damn fast. If it’s that fast on linux, I’m going to be very happy. I also like how the UI is very condensed. It has some quirks with javascript stuff though.

I also saw something weird involving dijit.Menu, I think those are artifacts of iframes being shown.

Anyways, it’s nice. The dom could be a bit faster, but it’s not bad.

I wonder if they’ll use the native UI toolkits for OSX and Linux.

Anyways, I still don’t see the point.

Update: I’m kinda agreeing with this post as well…

Update #2: interesting… there’s some weird stuff going on in their ToS

Posted in Uncategorized | Tagged , | Leave a comment

Text-based battle engine in python

I wrote a simple battle engine in python while I was teaching a friend about the aspects of OOP. Somebody may find it useful, so I’m just throwing up the package. It’s licensed under the AFL. Enjoy.

Download

Posted in Uncategorized | Tagged , , | Leave a comment