03 October 2009

Blogging my thesis: 2nd of October

On Saturdays, I usually get to stay home all day, except for a belly dance class and maybe a walk with my husband. What a great time to check mail, apply for Google Wave invites, chech mail, check Facebook, expand my musical horizons, check mail, check Facebook work on my thesis.

What have I done today? My answer is a typical one for a student asked by his advisor what he's done so far:

Er, I have found, I have read, I have understood...


I think I've finally understood the previously mentionned Bernstein method. Understanding is the toughest part (unless you were a sissie wise person and chose an easy subject) - then comes description and implementation. Actually, doing these while trying to understand works really good, I always do that. I now have half a dozen of lines of LaTeX erroneously deleted and product trees implemented in 8 impressive lines of code (n = len(primes), if n == 1: return primes and stuff like that). But all of these were proudly accomplished yesterday, and today, I just read and understood.

Well, the night is still young.

02 October 2009

Blogging my thesis: what's Bernstein thinking?

In his paper called "How to find smooth parts of integers" Bernstein tries to find the 20-smooth part of the number x. He first finds the product of all the primes up to 20, which is 9699690.

Then he writes 9699690 mod x = r and claims that r can be represented as ab, where a = gcd(9699690, x) and gcd(b, x) = 1.

Why? Why would that be true? It's left without proof as if it was obvious, but it's not. What's Bernstein thinking? Why isn't the answer avaliable as a cute Disney DVD?



That's what I'm workin on in my thesis right now.

[Update] Argh, I messed it up. Bernstein doesn't, Pomerance does in his book where he discusses the method and apparently, he does it wrong.

Let's find the 5-smooth part of 22. We have 2*3*5= 30, 30 mod 22 = 8, gcd (30, 22) = 2, thus a = 2, b = 4 and gcd(22, 4) = 2, not 1. Gotcha!

That's what happens when you leave something as obvious instead of proving it properly.

01 October 2009

Moving day at the office, or how the geek works

Lifehacker recently posted Nine Workspaces Where Famous Folks Get Stuff Done: Al Gore's, Bill Gate's, Steve Ballmer's, Steve Jobs'... Nine - isn't one missing? Of course one is! Mine.

My office actually moved last week, so I used this opportunity to take pictures without being considered crazy (just sentimental). So here it goes.

Before:


During:


After:


(If you're wondering about the pink ribbon on my chair, it was a way of labelling it to make sure the movers didn't give it to one of the guys.)

20 September 2009

A little talk with Steve Ballmer

Apparently, Blogger doesn't approve of 900px high picture, so click to enlarge, or check his Facebook page for the nice conversation.

19 September 2009

That baby is a genious!

I'm speechless. Even I have trouble reading Perl.


[Picture source]

Geek gets book

Six years after graduating from high school, I finally decided to read a book. A real book, with a story in it - a novel.

Well, it's not like I haven't read anything since 2003. There was Terry Pratchett's "The Unadulterated Cat":



Or a Dilbert I aquired by marriage:




And of course, I had my nose in many math handbooks or technical books, but none of these were a beginning-to-end read. There were, however, some, including religious stuff or psychological - manipulations are pretty interesting, aren't they?

Once upon a time, I found out a movie called "My Sister's Kepper" was being made. I read a bit about it and found the plot interesting. Right now, the movie is in theaters in Poland and I am planning on going to see it. When it was announced, I reminded myself my best friend's advice: "it's better to read the book first, and then see the movie", and I figured I might as well start now. So, I went on-line and quickly found a cheap used copy of Jodi Picoult's "My sister's keeper".



I love it. The book itself is great, but I am also suprised how fun reading a novel can actually be (thank you school for making me forget that), how rich the narration can be, how many times it is better that surfing the web. I'm past the half already and think I should save it for the days I commute to work - it's not like I have nothing to do at home - but reading has suddently become a bigger temptation than other ways of entertainment.

Well, I guess it's time on getiing some book recomendations... Or first, a recommendation for a book recommendation website. Anyone?

[Update] Well, actually, I just remembered that I had Jane Austen's "Pride and Prejuidice", which pretty much obsoletes half of this post.

18 September 2009

Blogging my thesis

I'm currently in the process of writing my master thesis. Here gos the subject:

Displacement of smooth integers in short intervals and their applications in cryptography

Ain't it the coolest thesis ever?

To be honest, I don't quite see it that way. Anything I want to do inevitably turns into something I have to do. So this post is party a pep talk to myself. I don't think it matters, however: most Fiona Apple's songs are pep talks to herself and boy, do I love them.

Okay, back to the thesis. I will be breaking the RSA cryptosystem. Calm down, your private communication is not in danger. I will not obtain significant results, only a small speed improvement over doing it "the dumb way".

How do you break RSA anyway? The whole idea, is that multiplying two big primes is easy, but having only that result, finding out what the primes were is hard. "The dumb way" is trying all the possible primes. There are some smarter ways, but they only work in specific cases, and the keys used in the real world are wisely chosen, so the tricks don't apply. There's an excellent publication about this called "Twenty years of attacks on the RSA cryptosystem". A great read, and you can skip the formulas if you're not that into maths.

So, I will be factoring big numbers into two big prime factors. To do that, I will be using smooth numbers, which are kinda the opposite of primes: they have plenty of small factors. That part is really easy, and is well explained by Pomerance in his paper "Smooth Numbers and the Quadratic Sieve". The first two pages have it all in elementary language, the later ones are hard even for me.

To find these smooth numbers, I will be comparing three different methods: sieving, the Bernstein method and finding them using error correcting codes based on the Chinese Remainder Theorem.

More on how it goes will (most probably) come.

17 September 2009

Finals finally over.

My finals are finally over. They were tough, as I failed everything I could in June, but well, I wanted a wedding in the middle of the semester, so I got my semester during the holidays. I'm still happy with my choice.

Now to the exciting stuff. First, I had AI and passed after a few hours of revisions. I was totally prepared in June, but made the lecturer pretty angry by not writing the test at the end of the semester (honeymoon) and not taking it some other time as the result of a few misunderstandings, so, no June exam in AI for me. And the lecturer didn't seem really happy to see me in September either. But, I solved all the problems correctly, so I got a C (yeah, that's my school - they love deduction in both senses of that word).

Then came a few "free" days I used to write my networks program. The teacher was really cool for letting me write in C# istead of C, C++ or Java (none of them being my cup of tea), so I had cool tools like Visual Studio (Why can't Eclipse have a "go to definition" feature? Why? Me wants!) , Linq (goodbye, parsing XML, hello, tricky code instead of for loops) and asynchronous sockets, thanks to which I didn't have to create a single thread expilcitely, and yet my application was super-thready.

That was nice, but still, implementing a protocole and a client took me more than these four free days. It took me the entire day I had for learning compilers and one and a half of the two planned for partial differential equations. There went compilers. Fortunately, they were an extra classs I took.

Equations survived. The battle was hard: revising a whole semester in one afternoon and learning the stuff I didn't get in June. At that point, your goal is pretty much not to know less that you did last time, but I think I did know more, and I passed.

The evening after equations was equally busy: the networks exam was the next day. Dear Hubby explained some stuff to me, I was well prepared. Plans for Friday were clear: get to school by 11:30, print network notes, show the program at 12, study with strangers until 14, take exam, leave.

I arrived at 11:30. My printing limit was reached. Then I realized that I needed my advior's signature bad. Really bad. Panic. The advisor is at school only on Thursdays, so what was the probability of him being here on a Friday, out of the blue? Panic. Run. Buy extra printing credit. Run to the lab guy. He not here. Other student waits too, not knowing more than I do. Okay, let's see if by any miracle the advisor hasn't shown up. He has! Two colleagues are waiting by his door and tell me it's for about an hour of waiting. We exchange valuable advice on handling the masters stuff. Lab guy still not here. Go to the admins for the printing credit, thanking heavens for the advisors presence. Get the credit. Print the notes. Oh, here's the other student waiting for the lab guy, e-mailing him. I go upstairs, because the lab guy should be there. He is! Boot pretty pink netbook. Show program. Program is liked! Advisor again. One guy, new to me, is waiting. I sit and wait with him and praise my advisor for the thesis subject he chose me. The guy enters, I start walking in circles in heels. I finaly get there. I learn that my thesis doesn't need to be extended, just finished - great news! Run. Grab coffee. You think you'll learn anything in the last 20 minutes? Not really. Breathe. Relax. Take exam. Unexpected questions. Think hard. Finally!

I'm sleepy. My head aches. I go home and take a nap. Two hours later, my husband comes home and wakes me up. My head still aches. I take meds, planning on going for a walk. I learn that I'm hot, fever sense. Meds don't work. Let's sleep some more. Sixteen hours more. Then Husband makes me wake up, and finally, finally, finally, I get back to something I like to call "normal life".

05 September 2009

Dear diary

This week was really tough, but the best is yet to come (next week).

My AI exam on Tuesday went pretty well. I was well prepared in June and after a bit of revisons, I was able to solve all the problems. Results will be available on Monday.

Coming up: compilers on Monday, partial differentail equations on Thursday, networks on Friday, but no time to study: I'm typing the networks projects as hard as... well, it's not going very well. I can't concentrate - too many websites outhere are calling me from the recently closed tabs. The weather is wierd, my head is aaching and I'm very sleepy in spite of having slept in. It's the weekend and I'm tired. But as I sit here, listing my excuses, the clock keeps on ticking, the deadlines are approaching.

I left work for almost two weeks to focus on school. Work is by far much easier and more rewarding - I get paid and appreciated. At school, it's an honor for you if they let you study there. I can't wait for school to be over.

Yet another bro entered college, majoring of course in computer science. Yet another bro to fight for textbooks with. (We've already started and classes haven't even begun!)

All good things must come to an end - Hubby and I have finished watching (or re-watching, in his case) the first season of House M.D.

Gotta keep on coding.

22 August 2009

There IS growth in simplifying your life.

I recently shared on my feed an article about an article about the myths of simplyfing your life. If I agreed, I wouldn't have much to write, but fortunately, I do not.

First, simplifying and going zen are two different things. Here goes the article:

The objective (if it can be said to have an objective) of zen is not happiness, but to be free from desires. When one is free from desires, he is content with the situation or the here-and-now. When you accept everything as it is, there is no need to have or pursue anything (including possessions, responsibilities, or desires) and one can simplify. There is no change and thus there is no personal growth.

So maybe there is not much growth in zen. But you don't have to be zen in its strict sense to simplyfy your life. Simplifying is to me about getting rid of distractions, of unnecessary things, not all things possible.

The problem with zen is that it's trying to eliminate all the emotions, desires, etc, good and bad. It's not living life to the fullest, but rather the opposite. It's about not accepting the price of unpleasure for getting pleasure. It's sacrificing the good stuff not to have to deal with the bad. I'm not trying to make it sound bad, it's all a mattern of an ethically neutral personal choice, it's just that for me, the more intense way of life is more appealling.

On the other hand, I love simplifying. I love growth, and these two go really well together. Here's why.

1. Simplifying is a goal. Reaching your goal is growth.

It works for any goal. I remember once seeing classmates reading a magazine about fishing and my first thought: what could be more boring than fishing? But to these guys, it was something big. Goals are very subjective: even the smallest goal can be great for someone (remember learing to walk? not so much impressing anymore, is it?) and even the biggest goal can be discredited: what's the point of you speaking 12 languages if I can never talk to you when I need to? My point is proved already.

Okay, but growth for the sake of growth... there must be something more. Well, there is.

2. Letting unimportant stuff go is growth.

Simplifying to me was, among others, shopping less. I had periond of time in my teens when I would enter almist any shop I passed by, always looking for new clothes and make-up - mostly tops and lipstick. Now I'm trying to make a better use of the things I already have and the time as well. Letting it go was more of a natural process than an achievement, but here is growth.

3. Letting small things go leaves more room for the big ones.

The day you realize something is not worth caring that much (my lipsticks don't really define me as a person, do they?), you also realize what is more important. On one hand, the inequality between people and make-up products is obvious, but when you get upset because these great shoes one sale were sold out in your size and you discard the birthday wishes from your friends, you could use a little reminding. We all do at times, and when we get it, that's what I call growth. (I won't even mention where the saved time and energy can go.)

4. Simplyfing makes you happier.

Okay, happiness isn't really growth, but it helps. Here are the most appeling examples to me: having less stuff so there is less to clean and organize, bulk cooking so you spend less time in the kitchen (cooking feels to me like something I have to do and it gets me frustrated easily), unsubsrcibing the old newsletters so you don't have to delete those e-mails anymore and can find the time to write one to an old friend, finally configuring that program right to free yourself from the repetitive task, working out at home or outside so you don't have to budget, pack and plan for the gym and other similar little things.

Just remember: everything should be made as simple as possible, but not simpler.