Showing posts with label Geek Stuff. Show all posts
Showing posts with label Geek Stuff. Show all posts

Friday, January 11, 2013

Math

As I mentioned in a previous post, I have re-discovered the joy of math. I have been using Project Euler to refresh and improve my Perl knowledge to help with my new role at work and have worked my way through a few dozen of the problems. I am not ashamed to admit that I am finding it quite fascinating, and very much enjoying it.

The problems cover a fairly wide range, from some combinatorics issues (counting paths in a grid, finding permutations) to number theory (factorization, many problems related to primes.) Thus far they have been fairly easily defined and haven't required any crazy math (i.e. calculus.) That said, as the problems have gotten more complex I have found myself doing some wikipedia research into the underlying concepts. This is great, since I have been interested in number theory (and numerical analysis) for a while but never actually found a reason to dig into it much. I am a huge nerd. He said in a post on a blog about programming about math.

As I have worked through these, I have definitely gotten better at Perl. I still don't love a lot of the choices they made but at least I am learning how to use the more advanced concepts. I've built complex data structures with references (god forbid a language provide multidimensional arrays without making you go through flaming hoops) and even built my first Perl object, which handles arithmetic on arbitrarily large integers. Perl's objects are weird, and carry through the general frat party abandon of the rest of the language. There are no access levels (private, protected) and a lot of the fundamentals of OO seem to exist purely by convention. It's very odd, and very Perl.

Once you solve a problem, a forum is unlocked in which you can discuss that problem. It's common for folks to post their solutions there, and looking over some of the designs can be very enlightening. For every awful brute force approach or esoteric language I have never hear of, there are some very clever analyses that can really expand your knowledge. It also strikes me how often folks 'cheat' in their implementations. For example, if a problem has you summing one hundred fifty-digit numbers and you use a library function that does it in one line, what's the point? Since I am in this at least in part to dig into the math, it just feels like cheating at solitaire to me. I suppose everyone is in it for something different.

While I may not make it through all 409 (and growing!) problems, I do think I will keep going for a bit. After all, I have to finish my sweet sieve of Eratosthenes that can dynamically grow when larger numbers are requested.

Thursday, January 3, 2013

How Did They Move The Satellite So Quickly?

Over this past weekend, we watched Captain America (colon the first avenger.) I like the movie quite a bit but it does have this one, tiny little detail which grates on my nerves every time I watch it. It goes like this: When Captain America first gets his shield the scientist specifically mentions that the reason it's so amazing is that it's made of a material (from a meteorite!) that absorbs all vibrations. Ok, sure, whatever. You need to explain it's awesomeness, I can roll with this. Then, seconds later he deflects a few bullets with it and the shield rings from the vibrations. This, more than any serum-injected supersolders in S&M gear shooting blue laser beams during World War II, is a detail that drives me absolutely bonkers because THAT'S NOT HOW IT WORKS.

Then, over the holiday, we watched The Avengers. While in this one they don't mention the magical vibration absorbing powers of the shield, they do have another scene with it ringing. Since we had seen Captain American (colon the first avenger) so recently, it bothered me again. Like, really bothered me. Like, talk about it on the internet bothered me.

There is actually a phrase for this behavior in the marriage code, and that is "How did they move the satellite so quickly?" This derives from my brother's response when we asked him about one of the more recent bond films (either Goldeneye or Die Another Day.) Despite all of the inherent absurdity of these films (Space lasers! Invisible cars! Tank chases through Moscow!) the speed with which the satellite moved was what he could not get past. We laughed about it at the time, but in his defense, we have both found ourselves falling into similar traps since.

I think that as analytically-inclined people with a basic understanding of science, it bothers us to have folks drop details and then not live by them. The blue lasers those supersolders are shooting? Totally alien technology. Ok! I am fine with that. I don't know about aliens, but I can buy that they shoot blue lasers. Why not? But I do know how sound works. And my brother, apparently, knows how satellites work.

So the next time you get hung up on some silly little detail of a film like this, ask yourself, "How did they move the satellite so quickly?" You know Mary and I will be.

Friday, December 28, 2012

T Minus Four Weeks

Today marks exactly four weeks prior to my start date in London.

Despite two weeks away (a week at the corporate mothership learning my new job and then a week at the in-laws for Christmas) we have made great progress on the London prep. I have booked tickets for us and the cats (flying out Jan 23), we have temporary housing, we have a storage locker for the stuff that is staying and are getting moving estimates for the stuff that's coming, and we've picked out what is what for each of those categories. We have started packing the non-essential stuff that we are leaving behind, and Mary is shifting into "clean the freezer out" mode. It's starting to get real!

The two trips were very successful in their own rights as well. The work trip was mainly to introduce me to my new job and team, and went well. There are a lot of interesting projects going on, and I really enjoyed talking with all the folks I met. I also got re-introduced to the joys of recreational math via Project Euler and will likely be using that to refresh my Perl skills. I haven't used it in a while, and even when I did I allowed myself to succumb to the laziness that Perl inspires rather than keeping myself disciplined into writing decent code. The new group uses a lot of well-structured Perl, so hopefully that will shame me into behaving.

Christmas was fun, and it was nice to see my in-laws. It's always a pretty chill affair, and we were able to relax and chat and unwind from all of the London madness. Per our request for folks to avoid durable goods we got mostly gift cards, though we did get a bunch of travel books for England and Europe which we plan to use quite extensively.