Today's physics recitations went much better than yesterday's. I used more of my natural teaching style today. Fewer people showed up today, which is a little discouraging, but at least the few people that show up probably want to be there. Small groups are easier to work with anyway. I collected their first homework problem today but I haven't looked through the stack of papers yet.
The math thing I worked out yesterday is used in the actual process of RSA encryption and decryption. Now I'm working on my RSA key generator, which is a mess. After I first coded it, I found there was some kind of nasty bug that made the keys not work. I replaced a chunk of code and checked my prime number generator, but the problem is still there (maybe even worse). If I can work out this bug it would be a good coding day.
I ran across an article today about a company that uses Stirling engines with solar collectors. That's pretty smart. So this morning I was looking at solar power stuff and coding RSA stuff, instead of preparing for my recitations.
18 August 2005
17 August 2005
need for speed
I had my first recitations for the new session's physics class today. It went pretty rough. The class is non-calc E&M. I think I like the calc-based classes better. I was supposed to go through three problems, but I got through one in the first recitation and two in the second. On top of that, I got the late afternoon sessions, everybody's already spaced out by then. Fortunately I only have six more work days for this session. One is tomorrow. Hopefully in the fall I can snag a calc-based physics TA spot.
I killed the time between recitations by going over the new modular exponentiation algorithm I found a couple days ago. It's really not so much the math that's the clever bit as the implementation in the code. I put it into my program and ran it side by side with the old method. I was expecting maybe Corvette vs. Model T results. It's more like the speed of light vs. a Model T. Probably worse. The new method is so fast that its processing time doesn't even register, even when I max out the new unsigned long long variables. Here is why the new method is faster:
Problem: 4353^(10^18) mod 13562
Number of operations required for old method: 10^18.
Number of operations required for new method: 60.
So I'm using the new method from now on.
I'm somewhat tempted to get bigger numbers, but I estimate that even the mythical thousand digit data type would take 3325 operations at most. Working that out proved that the algorithm goes as the log of the exponent. Somebody somewhere was very clever indeed.
I might poke at the RSA stuff a little more tonight, but more likely playing the pirate game and going to bed early.
I killed the time between recitations by going over the new modular exponentiation algorithm I found a couple days ago. It's really not so much the math that's the clever bit as the implementation in the code. I put it into my program and ran it side by side with the old method. I was expecting maybe Corvette vs. Model T results. It's more like the speed of light vs. a Model T. Probably worse. The new method is so fast that its processing time doesn't even register, even when I max out the new unsigned long long variables. Here is why the new method is faster:
Problem: 4353^(10^18) mod 13562
Number of operations required for old method: 10^18.
Number of operations required for new method: 60.
So I'm using the new method from now on.
I'm somewhat tempted to get bigger numbers, but I estimate that even the mythical thousand digit data type would take 3325 operations at most. Working that out proved that the algorithm goes as the log of the exponent. Somebody somewhere was very clever indeed.
I might poke at the RSA stuff a little more tonight, but more likely playing the pirate game and going to bed early.
mmm...donuts
I actually have to work today. I'm teaching recitations at 3 and 5, but I have to do most of the prep work yet so I'm up early. Fortunately I went to the store yesterday so I have donuts, which help ease the pain of getting up before I want to.
I really want to see another Hard Lessons show. Sadly, the week I am going to be back in Michigan they are going to be down South.
I really want to see another Hard Lessons show. Sadly, the week I am going to be back in Michigan they are going to be down South.
16 August 2005
a pirate who doesn't do anything
Just woke up. Probably going back to sleep.
Don't know what I'm going to do today. Had enough of the C++ crypto math stuff yesterday. I think I need a break from the pirate game too.
I know I have to put together some kind of mini-syllabus for my recitations tomorrow. I'm going to be teaching recitations for PH 203, an entry level E&M class. I met with the prof and the other TA's yesterday. For some reason I am only counted as 3/4 of a TA, so they spent some time delberating this. One thing very different from my last class is the amount of structure. I got a sheet with all the problems I should do in recitation over the next 3 weeks. Another sheet has all the grading criteria - this took a full page. I am doing two recitations a day for three days a week, for the next three weeks. Except I have today off. I'm not supposed to help grade exams either - what a shame.
The class has 90-95 students in it, so it's like five times the size of my last class. Even so, this summer session is supposed to be four or five times smaller than the class during the academic year. Fun fun.
I think I might get out and about today, when I actually feel like getting out of bed. It seems like a nice day out. Maybe explore campus, or visit the Lancer Evos. But for now, I'm going back to sleep.
Don't know what I'm going to do today. Had enough of the C++ crypto math stuff yesterday. I think I need a break from the pirate game too.
I know I have to put together some kind of mini-syllabus for my recitations tomorrow. I'm going to be teaching recitations for PH 203, an entry level E&M class. I met with the prof and the other TA's yesterday. For some reason I am only counted as 3/4 of a TA, so they spent some time delberating this. One thing very different from my last class is the amount of structure. I got a sheet with all the problems I should do in recitation over the next 3 weeks. Another sheet has all the grading criteria - this took a full page. I am doing two recitations a day for three days a week, for the next three weeks. Except I have today off. I'm not supposed to help grade exams either - what a shame.
The class has 90-95 students in it, so it's like five times the size of my last class. Even so, this summer session is supposed to be four or five times smaller than the class during the academic year. Fun fun.
I think I might get out and about today, when I actually feel like getting out of bed. It seems like a nice day out. Maybe explore campus, or visit the Lancer Evos. But for now, I'm going back to sleep.
15 August 2005
cypherpunk
And so another week begins. I spent most of my weekend in pirate-related activities, either playing my new game or reading my pirate book. Today I have a meeting with the prof I'm TAing for. Since this summer session is only three weeks long, I'll probably be pretty busy for the next couple of weeks.
I found my cryptological mathematics book and I've been flipping through it. Last time I got into this crypto stuff I wrote a couple short C++ programs to do the hard math stuff for the RSA algorithm so I could see how it worked. I looked at them briefly yesterday and I think they can be improved. I used a method from abstract algebra that will actually let the computer calculate things like 4353^53216 mod 13562, but there are always better ways. If you just tried calculating it directly, the number would blow up and wouldn't fit in any variable type. Using the abstract algebra method, it actually works and the processing time goes as 53216 for the above example. Wikipedia's article on modular exponentiation actually has a better way, so I printed the article off and I'm going to see if I can work through it. Wikipedia claims the processing time of this new method goes as log (53216), so I want to try it out.
(The answer to that example is 4059, by the way.)
Edit: After an embarassingly long time trying to calculate processing time (I'm no hardcore coder), I quickly showed that the processing time is indeed directly related to the size of the exponent. I kept adding zeros at the end, and the time went from 4.5ms to 4.5 seconds or 45 seconds. I might try for 450 seconds when I look over new method again, and 4500 seconds when I go to my TA meeting.
Edit 2: I tried for the 450 second run, but it turns out the required exponent was larger than my data type could hold. After blowing out several other data types I'm currently using something called an unsigned long long, which I'd never heard of but is capable of storing values up to about 18.4 quintillion. The unsigned helps with that, and for some reason it also runs faster than a standard variable. So basically I've been doing some data type optimization so I can run some serious benchmarks. Now that that's settled, I'm going to try for 300 and 3000 second runs.
I found my cryptological mathematics book and I've been flipping through it. Last time I got into this crypto stuff I wrote a couple short C++ programs to do the hard math stuff for the RSA algorithm so I could see how it worked. I looked at them briefly yesterday and I think they can be improved. I used a method from abstract algebra that will actually let the computer calculate things like 4353^53216 mod 13562, but there are always better ways. If you just tried calculating it directly, the number would blow up and wouldn't fit in any variable type. Using the abstract algebra method, it actually works and the processing time goes as 53216 for the above example. Wikipedia's article on modular exponentiation actually has a better way, so I printed the article off and I'm going to see if I can work through it. Wikipedia claims the processing time of this new method goes as log (53216), so I want to try it out.
(The answer to that example is 4059, by the way.)
Edit: After an embarassingly long time trying to calculate processing time (I'm no hardcore coder), I quickly showed that the processing time is indeed directly related to the size of the exponent. I kept adding zeros at the end, and the time went from 4.5ms to 4.5 seconds or 45 seconds. I might try for 450 seconds when I look over new method again, and 4500 seconds when I go to my TA meeting.
Edit 2: I tried for the 450 second run, but it turns out the required exponent was larger than my data type could hold. After blowing out several other data types I'm currently using something called an unsigned long long, which I'd never heard of but is capable of storing values up to about 18.4 quintillion. The unsigned helps with that, and for some reason it also runs faster than a standard variable. So basically I've been doing some data type optimization so I can run some serious benchmarks. Now that that's settled, I'm going to try for 300 and 3000 second runs.
13 August 2005
odd man out
I just got back from the physics grad party. It was good, but also disturbing. By far most of the people there were married (or close enough). Not even just recently married, either - one couple for five years, another for three. It wasn't just a barbeque, it was a dinner party. They drank, but it wasn't anything at all like Wine & Cheese Night. Even just talking about video games it was clear I'm from a different generation - the guys all played Doom where I played Half-Life. Not only is everyone further along in grad school, but it seems like most of the grads took a couple years off before going to grad school. They're old. So I'm the odd man out.
I talked with one of the Ph.D. guys about MSU's cyclotron. In some detail. He knew enough about NSCL to visualize the N4 experimental chamber where I worked. His research has something to do with neutron-emitting properties of neutron-bombarded uranium, which not only has weapons applications, but also no other applications. He doesn't mind. I've already vowed to not work for the government - especially not our current government - so I contrasted his work my own desire to break into industry. I think the others think what I'm doing is kind of interesting. However everyone ended up talking about working out and doing triathlons and the Tour de France (snobbily) so I got left out. I had an OK time overall though.
If you're waiting for the next update on my iTunes top ten (which I know all of you are), don't hold your breath. I wiped the track playcounts and disabled all views that show those numbers. I like listening to the same song looped for hours and when that's reflected in iTunes I feel stupid. My music reflects how I'm feeling and I don't change how I'm feeling every four minutes. What's the current song? Well, it's by Linkin Park, but not one of the ones I usually listen to though. And I'm listening to it on iPod, in iTunes, in the car, everywhere. Even typing this entire post.
Here's an analogy question for you: book on ancient arms races is to playing Empire Earth as book on pirates is to ____. I've been reading my new pirates book and I got an irresistable urge to play a pirate game, so I went out and got Sid Meier's Pirates! It's awesome. I played it so much last night that when I finally shut it down, it was 4:30 AM. I spent all afternoon at this dinner party thing, so immediately after I post this entry I'm going to play until 4:30 AM again and then sleep until noon. Spanish treasure galleons, be advised: the brig-of-war Defiant is coming for you.
I talked with one of the Ph.D. guys about MSU's cyclotron. In some detail. He knew enough about NSCL to visualize the N4 experimental chamber where I worked. His research has something to do with neutron-emitting properties of neutron-bombarded uranium, which not only has weapons applications, but also no other applications. He doesn't mind. I've already vowed to not work for the government - especially not our current government - so I contrasted his work my own desire to break into industry. I think the others think what I'm doing is kind of interesting. However everyone ended up talking about working out and doing triathlons and the Tour de France (snobbily) so I got left out. I had an OK time overall though.
If you're waiting for the next update on my iTunes top ten (which I know all of you are), don't hold your breath. I wiped the track playcounts and disabled all views that show those numbers. I like listening to the same song looped for hours and when that's reflected in iTunes I feel stupid. My music reflects how I'm feeling and I don't change how I'm feeling every four minutes. What's the current song? Well, it's by Linkin Park, but not one of the ones I usually listen to though. And I'm listening to it on iPod, in iTunes, in the car, everywhere. Even typing this entire post.
Here's an analogy question for you: book on ancient arms races is to playing Empire Earth as book on pirates is to ____. I've been reading my new pirates book and I got an irresistable urge to play a pirate game, so I went out and got Sid Meier's Pirates! It's awesome. I played it so much last night that when I finally shut it down, it was 4:30 AM. I spent all afternoon at this dinner party thing, so immediately after I post this entry I'm going to play until 4:30 AM again and then sleep until noon. Spanish treasure galleons, be advised: the brig-of-war Defiant is coming for you.
12 August 2005
yar
I bought a new book today. It's about pirates. Yar!
I just got the pirate book because I like pirates and I'd been meaning to get this one for quite a while. I kind of wanted an engineering-techie book, but the engineering section at Borders is 95% books about making battling robots. None of the science or history books really grabbed my attention either. So I got the pirate book.
I only went on campus a little bit today. I got utterly hosed at Hearts. Kind of a funny scene outside Weniger Hall today - one of the newer profs got some huge optical tables delivered, and everyone was hanging around watching as they tried to get them inside. Part of the buildup of Oregon State optics, I guess. The tables weigh a ton - literally - and were in crates that must have been 8' by 5' by 1'. I watched for a couple minutes because I had to give my final summary to the prof I TA'ed for, who was out there because the prof getting the tables is his girlfriend or something. I don't know.
By the way, I found out I'm teaching non-calc E&M next session. More details Monday after a TA meeting (3 other TA's!). Also, I should be getting paid soon. The department office accidentally listed my start work date as 8/18 and not 7/18, so they have to correct some paperwork to make sure I get paid for July. They said I'll also be paid 'for the first half of September' - even though the last summer class ends on 9/2. Then I'll get paid later for the second half of September at a higher rate for the beginning of the academic year. Stipends are so much better than wages.
Today I decided to clean up a little instead of playing games or watching a movie. I did have a pile of T-shirts, so I got to practice my new shirt folding technique on them. I also found my cryptological mathematics book, and I am tempted to find my RSA demo code and play with it some more. It's pretty complicated and I remember my Abstract Algebra class helped a lot with the math, the only thing it was good for (besides proving 3 + 5 = 3 * 5). I remember I got that crypto book from Amazon.co.uk because it's so rare. It came over here with the Pi soundtrack, which I also had to order from England. Both were worth it.
The weather has been cooler here this week, which is very nice. No rain though. I don't think it has rained since I got in my apartment. I have assured it will rain until I'm sick of it in the winter though.
It's going to be a busy weekend. I got the lowdown on the grad party on Saturday, and I might also try and squeeze in another exploring trip. This time, east. I've already been an hour north and an hour west. An hour east is Foster Lake, a recreation area made by the Army Corps of Engineers. Then I still have to see if I can swing a trip up north to meet Fischer somewhere before he goes back to Michigan. At least I won't be bored.
I just got the pirate book because I like pirates and I'd been meaning to get this one for quite a while. I kind of wanted an engineering-techie book, but the engineering section at Borders is 95% books about making battling robots. None of the science or history books really grabbed my attention either. So I got the pirate book.
I only went on campus a little bit today. I got utterly hosed at Hearts. Kind of a funny scene outside Weniger Hall today - one of the newer profs got some huge optical tables delivered, and everyone was hanging around watching as they tried to get them inside. Part of the buildup of Oregon State optics, I guess. The tables weigh a ton - literally - and were in crates that must have been 8' by 5' by 1'. I watched for a couple minutes because I had to give my final summary to the prof I TA'ed for, who was out there because the prof getting the tables is his girlfriend or something. I don't know.
By the way, I found out I'm teaching non-calc E&M next session. More details Monday after a TA meeting (3 other TA's!). Also, I should be getting paid soon. The department office accidentally listed my start work date as 8/18 and not 7/18, so they have to correct some paperwork to make sure I get paid for July. They said I'll also be paid 'for the first half of September' - even though the last summer class ends on 9/2. Then I'll get paid later for the second half of September at a higher rate for the beginning of the academic year. Stipends are so much better than wages.
Today I decided to clean up a little instead of playing games or watching a movie. I did have a pile of T-shirts, so I got to practice my new shirt folding technique on them. I also found my cryptological mathematics book, and I am tempted to find my RSA demo code and play with it some more. It's pretty complicated and I remember my Abstract Algebra class helped a lot with the math, the only thing it was good for (besides proving 3 + 5 = 3 * 5). I remember I got that crypto book from Amazon.co.uk because it's so rare. It came over here with the Pi soundtrack, which I also had to order from England. Both were worth it.
The weather has been cooler here this week, which is very nice. No rain though. I don't think it has rained since I got in my apartment. I have assured it will rain until I'm sick of it in the winter though.
It's going to be a busy weekend. I got the lowdown on the grad party on Saturday, and I might also try and squeeze in another exploring trip. This time, east. I've already been an hour north and an hour west. An hour east is Foster Lake, a recreation area made by the Army Corps of Engineers. Then I still have to see if I can swing a trip up north to meet Fischer somewhere before he goes back to Michigan. At least I won't be bored.
11 August 2005
what day is it, thursday?
Tuesday was the last lab for the class I TA. They're taking their final today. I still have to figure out what class I doing for the last summer session.
I ran across this on the Piled Higher and Deeper site, and I think it's pretty clever.
How to Fold a Shirt
I finished my book on wonder weapons. It was pretty fun reading about ancient arms races, but the tone of the book kept changing as it moved closer to the present. It almost seemed like the author was stumbling over himself to get to his main point. I think he's pretty mad at science for coming up with nuclear weapons. Yeah, the whole nuclear war thing is not cool, but I think the atomic bomb was a necessary move to end WWII. It saved American lives and it demonstrated to the world how horrible nuclear weapons really are. The author also said some things about Alan Turing that told me he hadn't fully done his research. Maybe that's true for the rest of the book too, I don't know. Anyway, when I finished the book I didn't really care for it anymore. Thankfully I only paid $4 for it.
In any case, I need a new book. Just in time, Borders sent me another coupon. They've got my number.
I spent a while sorting through my music from PJ. I finally integrated some of it into my main music collection. Then I accidentally messed up my iTunes library settings, so I have to add everything to my iPod again. When I reloaded it, I came up about 7GB less than before. I think part of the problem is that earlier I just wanted to see the iPod full, but now I'm more in favor of putting music on it that I'll actually listen to. I want to redo my playlists though.
While going through all this music I found again that Freeman's onboard sound card is not fantastic (probably my last complaint about moving from desktop to laptop). However, while reading this month's WIRED I saw an ad for an Audigy 2 for notebooks! I'm definitely getting one of those - think I have to wait for Christmas though...
Today I'm going onto campus for physics grad Hearts and to see what I'll be working on next week. Tomorrow I'm supposed to go out for pizza with the other TA and the instructor, and Saturday is some kind of grad party - ostensibly for someone's birthday, but I think they just like having a BBQ and hanging out.
I ran across this on the Piled Higher and Deeper site, and I think it's pretty clever.
How to Fold a Shirt
I finished my book on wonder weapons. It was pretty fun reading about ancient arms races, but the tone of the book kept changing as it moved closer to the present. It almost seemed like the author was stumbling over himself to get to his main point. I think he's pretty mad at science for coming up with nuclear weapons. Yeah, the whole nuclear war thing is not cool, but I think the atomic bomb was a necessary move to end WWII. It saved American lives and it demonstrated to the world how horrible nuclear weapons really are. The author also said some things about Alan Turing that told me he hadn't fully done his research. Maybe that's true for the rest of the book too, I don't know. Anyway, when I finished the book I didn't really care for it anymore. Thankfully I only paid $4 for it.
In any case, I need a new book. Just in time, Borders sent me another coupon. They've got my number.
I spent a while sorting through my music from PJ. I finally integrated some of it into my main music collection. Then I accidentally messed up my iTunes library settings, so I have to add everything to my iPod again. When I reloaded it, I came up about 7GB less than before. I think part of the problem is that earlier I just wanted to see the iPod full, but now I'm more in favor of putting music on it that I'll actually listen to. I want to redo my playlists though.
While going through all this music I found again that Freeman's onboard sound card is not fantastic (probably my last complaint about moving from desktop to laptop). However, while reading this month's WIRED I saw an ad for an Audigy 2 for notebooks! I'm definitely getting one of those - think I have to wait for Christmas though...
Today I'm going onto campus for physics grad Hearts and to see what I'll be working on next week. Tomorrow I'm supposed to go out for pizza with the other TA and the instructor, and Saturday is some kind of grad party - ostensibly for someone's birthday, but I think they just like having a BBQ and hanging out.
07 August 2005
damn it feels good to be a gangsta
I just finished watching Office Space. I love that movie.
It's about 11 PM local time. The space shuttle is supposed to land around 2 AM local time. Since I don't have to work tomorrow, I'm going to try to stay up for it. No promises though. I haven't bothered to get cable TV yet (no CNN), but I found a webcast.
Since I have some time on my hands before then (and I finally graded those prelabs I had been putting off) I am thinking about crazy stuff. Like how I hate batteries. It just seems to me there's got to be a better way to store energy. Unfortunately my background is in physics, not chemistry, so I really have no idea how batteries work, or what a better alternative would be.
Then there's my professed interest in solar power, photovoltaics and whatnot. My physics background SHOULD be able to make all that clear, but semiconductors were not gone over real well. Hell, I know less about transistors now than I did before physics tried to explain them (I took some EE before that). I'm not entirely happy with my undergraduate education. To improve this, my grad classes are going to be heavy on Solid State Physics. I think Oregon State is trying to go big time in optics, but they do have a good Solid State program here, so I'm in a good position. I get the impression that's going to be important in whatever I go into.
(sooner or later I'm going to have to stop saying "whatever I go into" and go into something.)
I've also been sentenced to a year of Quantum Mechanics. They don't think I have deficiencies in anything, they just feel QM is good for everyone to have. I also managed to talk them into giving me E&M as well. At least I kind of like E&M. Then I've got my business classes, and a bunch of seminars on the side. I'll be busy.
Dr. Warren recommended I take a stupid physical activity class to round everything out. I agree. I like the looks of the Badminton class. I remember Badminton fondly from my required high school gym class. I teamed up with another band geek in that course. We sucked at everything except Badminton and swimming, but we didn't care. Basketball was especially painful. People assume that because I'm tall I can play basketball, but I have no talent for it. On top of that you've got all of basketball's ridiculous rules, and you've got a recipe for failure worthy of Emeril. BAM! Consider it kicked up a notch.
There's also a 'Relaxation' class. No Wallyball though. Or archery. I got to the longbow part in my book of wonder weapons, and now I want to try archery.
Edit: Now they're saying the shuttle is supposed to land around 4 AM local time. To hell with that, I'm going to bed.
It's about 11 PM local time. The space shuttle is supposed to land around 2 AM local time. Since I don't have to work tomorrow, I'm going to try to stay up for it. No promises though. I haven't bothered to get cable TV yet (no CNN), but I found a webcast.
Since I have some time on my hands before then (and I finally graded those prelabs I had been putting off) I am thinking about crazy stuff. Like how I hate batteries. It just seems to me there's got to be a better way to store energy. Unfortunately my background is in physics, not chemistry, so I really have no idea how batteries work, or what a better alternative would be.
Then there's my professed interest in solar power, photovoltaics and whatnot. My physics background SHOULD be able to make all that clear, but semiconductors were not gone over real well. Hell, I know less about transistors now than I did before physics tried to explain them (I took some EE before that). I'm not entirely happy with my undergraduate education. To improve this, my grad classes are going to be heavy on Solid State Physics. I think Oregon State is trying to go big time in optics, but they do have a good Solid State program here, so I'm in a good position. I get the impression that's going to be important in whatever I go into.
(sooner or later I'm going to have to stop saying "whatever I go into" and go into something.)
I've also been sentenced to a year of Quantum Mechanics. They don't think I have deficiencies in anything, they just feel QM is good for everyone to have. I also managed to talk them into giving me E&M as well. At least I kind of like E&M. Then I've got my business classes, and a bunch of seminars on the side. I'll be busy.
Dr. Warren recommended I take a stupid physical activity class to round everything out. I agree. I like the looks of the Badminton class. I remember Badminton fondly from my required high school gym class. I teamed up with another band geek in that course. We sucked at everything except Badminton and swimming, but we didn't care. Basketball was especially painful. People assume that because I'm tall I can play basketball, but I have no talent for it. On top of that you've got all of basketball's ridiculous rules, and you've got a recipe for failure worthy of Emeril. BAM! Consider it kicked up a notch.
There's also a 'Relaxation' class. No Wallyball though. Or archery. I got to the longbow part in my book of wonder weapons, and now I want to try archery.
Edit: Now they're saying the shuttle is supposed to land around 4 AM local time. To hell with that, I'm going to bed.
Subscribe to:
Posts (Atom)
