Scala… badass

I have a few friends I talk to about coding.  They’ve listened to me talk up Python in every way except for it’s multi-threading capability.  Writing multithreaded apps sucks.  I can do it, but it isn’t fun.  I get the same feeling about my multi-threading code that I get about my C++ code.  It works, but I always feel like I’ve made a mistake that will come and get me in the night.  I wanted to try the actor model so I gave Erlang a solid 90 days and found it to be an incredibly frustrating experience.  Erlang is neat, but the syntax never felt right to me.  It’s probably my fault for not being smart enough.  People talk about how stable Erlang code is.  I kind of wonder if the barrier to entry is so high that idiots like me don’t ever get far enough with it to go on to write bad code.  Erlang’s success actually has less to do with the language, and more to do with the type of people that grok it.  I’m half joking.

I then looked at Scala because its syntax is more pythonish, but it also allowed me to write functional code when I wanted (I love list comprehensions.  I seriously dream about them).  It also allowed me to use the actor model.  It runs on the JVM though, which historically has driven me crazy.  In my career, I have spent an enormous amount of time debugging java code.  I don’t know if it is the JVM, or java developers, but something about it annoys the hell of me.  There is nothing more annoying than chasing garbage collection bugs and memory leaks on the JVM.

Anyway, Scala (and SBT) make me appreciate the JVM more.  The language is huge and complicated, but you don’t have to know it all to start using it.  The language is still missing a few things (file writing and automatic resource management), but I found libraries to cover those (scala-io and scala-arm) and they work perfectly.  Another one of my gripes with the JVM is dependency management and classpath bullshit, but SBT makes it relatively easy to keep straight.  I installed an SBT plugin that allows me to build jars trivially, and another plugin that builds my Intellij projects automagically, and it all just works.  It works so well, in fact, that I’m starting to like it more than I like python if my code starts getting larger than 100 lines or if it has multiple files.  Dealing with XML in Scala is a dream compared to Python.  My Scala code is concise and easy to read (and fast).  I’m sure the JVM will still annoy me, but the language is such a joy to use that maybe I won’t mind as much (and maybe scala will help me write better code).

Writing multi-threaded code is much better in Scala, I do really like the actor model.  I am probably not writing idiomatic Scala yet, but I’ll get there.  Anyway, after only a few weeks with Scala, I am really liking it.  Hopefully it will stay awesome.

Back on Mac

Well, I’m back on a mac. It’s like a weight has been lifted off of my chest. While I miss the installers that just work on Windows, I don’t really install stuff that often. Everything just works again, particularly the mouse. Windows 8 is great, but until someone builds some really badass hardware, I prefer the mac. The retina display is pretty nice and the track pad with mac gestures is worth whatever the cost difference between a man and pc is. I’m running windows 8 in a VM for my windows specific stuff, and I can use my mac gestures. It’s the best of both worlds. Anyway…

Damnit Microsoft (Skydrive appears to be cool, but actually blows)

I write a spiel about windows 8 and how much I like it, and then you go and suck start a leaf blower when I wasn’t expecting it.

I switched from Dropbox to Skydrive a while back.  It seemed to be exactly the same as far as features, but half the price and somewhat integrated with windows 8.  Then I tried to share a folder with someone.  What an abomination.

In Dropbox, if you share a folder with someone, it shows up in their dropbox folder.   They can edit files or add things or whatever, and as soon as you have an internet connection, you see what they did.  It happens nearly in realtime if your internet connection is fast.  This makes it so you can share a folder with someone, and work on whatever is in that folder with someone easily.  As long as you’re not both in there at the same time, you can make your edits and changes and it uploads it to the cloud behind the scenes.  As soon as they log in, they can pick up exactly from where you left off.  It’s sick.

Skydrive doesn’t let you do that.  It makes you manually log in and upload and download files.  Worse yet, it doesn’t let you upload folders to a shared directory.  I have to create directory structures, and then upload each file to those directories.  It’s so frustrating.

Let me tell you why this matters to me.  I work on music with my brother and some other people.  He lives in Oregon, I live in Colorado.  He shares a folder containing the song he is working on with me, and I open it up, mix it, record my parts, and then close it.  He can then open it up on his end and hear exactly what I did.  It’s brilliant and requires no special software.  It works in Dropbox and I never thought about it.  It just worked so well I never figured it could work any other way.  That’s the mark of brilliant software.  In Skydrive it’s a complete manual mess.  Microsoft already got my $50, so I can’t get that back.  Dropbox will be getting their $10/month for 100GB from me now though with no complaints and Microsoft can suck my skinny white ass.

It’s difficult for me to express how irritated I am.

Dad Update

So Dad had something happen yesterday (They don’t know what exactly) at the fairgrounds and had to have CPR done and is now at the hospital.  It was likely some kind of cardiac event; however, they are not sure what it was and the amount of time his brain was without oxygen is unknown.  He is currently unresponsive to stimulation.  Scott and I flew out here so everyone is here right now.  I set up a website at glenlegler.com where we will be posting updates as soon as all the DNS stuff starts working.  In the meantime we’re posting updates at jlegler.com/glen-legler.  Please let everyone that you think might care know.

The Durability of My Father’s Body Redux

So dad got out of surgery fine.  It was nice seeing everyone and being home.  He was a grumpy man when he came out of surgery so I know where I get that now.  He was back home within a few days and recovering nicely.  That’s the good news.  The bad news is that the pathology report came back on last Friday and the news was not what we had hoped it would be.

Dad had all the margins of his prostate come back negative for invasive malignancy and both lymph nodes come back negative for metastatic malignancy; however, he had fat infiltration on the lymph nodes and there was also seminal vesicle invasion.  There was a lymphovascular invasion present and a perineural invasion present.  Basically, from what I understand, the lymphovascular invasion means that cancer cells are present in lymphatic vessels or blood vessels.  This is bad because it means the cancer has made the necessary mutations to be able to create its own blood vessels and can therefore spread.  A perineural invasion means the cancer has spread to the place surrounding the nerve.  All of this means that the cancer is capable of spreading and likely has.

The pathologist rated my dad T3b N0 Mx.  Here is the chart to figure out what that means:

T categories (clinical)

There are 4 categories for describing the local extent of the prostate tumor, ranging from T1 to T4. Most of these have subcategories as well.

T1: Your doctor can’t feel the tumor or see it with imaging such as transrectal ultrasound.

T1a: The cancer is found incidentally (by accident) during a transurethral resection of the prostate (often abbreviated as TURP) that was done for benign prostatic hyperplasia (BPH). Cancer is present in less than 5% of the tissue removed.

T1b: The cancer is found during a TURP but is present in more than 5% of the tissue removed.

T1c: The cancer is found by needle biopsy that was done because of an increased PSA.

T2: Your doctor can feel the cancer when a digital rectal exam (DRE) is done, but it still appears to be confined to the prostate gland.

T2a: The cancer is in one half or less of only one side (left or right) of your prostate.

T2b: The cancer is in more than half of only one side (left or right) of your prostate.

T2c: The cancer is in both sides of your prostate.

T3: The cancer has begun to grow and spread outside your prostate and may involve the seminal vesicles.

T3a: The cancer extends outside the prostate but not to the seminal vesicles.

T3b: The cancer has spread to the seminal vesicles.

T4: The cancer has grown into tissues next to your prostate (other than the seminal vesicles), such as the urethral sphincter (muscle that helps control urination), the rectum, and/or the wall of the pelvis.

N categories

N0: The cancer has not spread to any lymph nodes.

N1: The cancer has spread to one or more regional (nearby) lymph nodes in the pelvis.

M categories

M0: The cancer has not spread beyond the regional lymph nodes.

M1: The cancer has spread beyond the regional nodes.

M1a: The cancer has spread to distant (outside of the pelvis) lymph nodes.

M1b: The cancer has spread to the bones.

M1c: The cancer has spread to other organs such as lungs, liver, or brain (with or without spread to the bones).

Stage groupings

Once the T, N, and M categories have been determined, this information is combined, along with the Gleason score and PSA, in a process called stage grouping. If the Gleason score or PSA results are not available, the stage can be based on the T, N, and M categories. The overall stage is expressed in Roman numerals from I (the least advanced) to IV (the most advanced). This is done to help determine treatment options and the outlook for survival or cure.

Stage I: One of the following applies:

T1, N0, M0, Gleason score 6 or less, PSA less than 10: The doctor can’t feel the tumor or see it with imaging such as transrectal ultrasound (it was either found during a transurethral resection or was diagnosed by needle biopsy done for a high PSA) [T1]. The cancer is still within the prostate and has not spread to lymph nodes [N0] or elsewhere in the body [M0]. The Gleason score is 6 or less and the PSA level is less than 10.

OR

T2a, N0, M0, Gleason score 6 or less, PSA less than 10: The tumor can be felt on digital rectal exam or seen on transrectal ultrasound and is in one half or less of only one side (left or right) of your prostate [T2a]. The cancer is still within the prostate and has not spread to lymph nodes [N0] or elsewhere in the body [M0]. The Gleason score is 6 or less and the PSA level is less than 10.

Stage IIA: One of the following applies:

T1, N0, M0, Gleason score of 7, PSA less than 20: The doctor can’t feel the tumor or see it with imaging such as transrectal ultrasound (it was either found during a transurethral resection or was diagnosed by needle biopsy done for a high PSA level) [T1]. The cancer has not spread to nearby lymph nodes [N0] or elsewhere in the body [M0].The tumor has a Gleason score of 7. The PSA level is less than 20.

OR

T1, N0, M0, Gleason score of 6 or less, PSA at least 10 but less than 20: The doctor can’t feel the tumor or see it with imaging such as transrectal ultrasound (it was either found during a transurethral resection or was diagnosed by needle biopsy done for a high PSA [T1]. The cancer has not spread to nearby lymph nodes [N0] or elsewhere in the body [M0]. The tumor has a Gleason score of 6 or less. The PSA level is at least 10 but less than 20.

OR

T2a or T2b, N0, M0, Gleason score of 7 or less, PSA less than 20: The tumor can be felt on digital rectal exam or seen on transrectal ultrasound and is in only one side of the prostate [T2a or T2b]. The cancer has not spread to nearby lymph nodes [N0] or elsewhere in the body [M0]. It has a Gleason score of 7 or less. The PSA level is less than 20.

Stage IIB: One of the following applies:

T2c, N0, M0, any Gleason score, any PSA: The tumor can be felt on digital rectal exam or seen on transrectal ultrasound and is in both sides of the prostate [T2c]. The cancer has not spread to nearby lymph nodes [N0] or elsewhere in the body [M0]. The tumor can have any Gleason score and the PSA can be any value.

OR

T1 or T2, N0, M0, any Gleason score, PSA of 20 or more: The cancer has not yet begun to spread outside the prostate. It may (or may not) be felt by digital rectal exam or seen on transrectal ultrasound [T1 or T2] The cancer has not spread to nearby lymph nodes [N0] or elsewhere in the body [M0]. The tumor can have any Gleason score. The PSA level is at least 20.

OR

T1 or T2, N0, M0, Gleason score of 8 or higher, any PSA: The cancer has not yet begun to spread outside the prostate. It may (or may not) be felt by digital rectal exam or seen on transrectal ultrasound [T1 or T2]. The cancer has not spread to nearby lymph nodes [N0] or elsewhere in the body [M0]. The Gleason score is 8 or higher. The PSA can be any value.

Stage III:

T3, N0, M0, any Gleason score, any PSA: The cancer has begun to spread outside the prostate and may have spread to the seminal vesicles [T3], but it has not spread to the lymph nodes [N0] or elsewhere in the body [M0]. The tumor can have any Gleason score and the PSA can be any value.

Stage IV: One of the following applies:

T4, N0, M0, any Gleason score, any PSA: The cancer has spread to tissues next to the prostate (other than the seminal vesicles), such as the urethral sphincter (muscle that helps control urination), rectum, and/or the wall of the pelvis [T4]. The cancer has not spread to nearby lymph nodes [N0] or elsewhere in the body [M0]. The tumor can have any Gleason score and the PSA can be any value.

OR

Any T, N1, M0, any Gleason score, any PSA: The tumor may be growing into tissues near the prostate [any T]. The cancer has spread to the lymph nodes (N1) but has not spread elsewhere in the body [M0]. The tumor can have any Gleason score and the PSA can be any value.

OR

Any T, any N, M1, any Gleason score, any PSA: The cancer may be growing into tissues near the prostate [any T] and may have spread to nearby lymph nodes [any N]. It has spread to other, more distant sites in the body [M1]. The tumor can have any Gleason score and the PSA can be any value.

So dad has a large tumor that has spread to the seminal vesicles but has not been found in the lymph nodes and they are unsure if it has spread anywhere (I think that’s what the x means).  He has a Gleason score of 8 and his doctor wrote in T4 in place of T3b.  We are not quite sure of why other than that it puts him firmly in stage IV prostate cancer and dictates certain treatments (radiation, possible chemo, hormone therapy etc.).  They are going to let him heal up until March and then do radiation in March.  They’ll be checking his PSA levels in 8 weeks.  I hope to god that they come back 0, but that’s what they’ll be watching for and they’ll be monitoring it every 8 weeks from now on I believe.

My initial reaction was anger (as usual).  Now that I have read up on it more I realize that no one really knows what will work on whom.  The treatment results are as varied as the people having the treatments done on them.  Whether or not the patient has a spouse significantly affects the statistical possibilities of the various treatments according to one thing I read.  I am praying that my dad can beat this fucking thing.  We will see what happens.  He seems like he’s in good spirits and I am excited to see him over Christmas.  Anyway, that’s all I’ve got about it for now.

On a completely unrelated note, I was over at Ari’s house yesterday and had just gotten out of the shower and was doing my hair in the mirror in her bedroom.  She had her window open for the first time in a month and was talking to one of her cats and jokingly asking him if the bedroom intruder was outside of her window (a joking reference to the peeping tom she had about a month ago) and then she screamed something along the lines of, “HE’S THERE!”  I turned and looked at her, saw her eyes were huge, turned to my left and saw the dude looking in the fucking window!  Keep in mind that your eyes have to be about 6.25′ off the ground to see in and this prick was basically leaning against the glass.  You can’t accidentally look in unless you’re 7′ tall and happen to be walking through the path behind her apartment on the way to do your laundry at her apartment’s laundry facilities.  He had no business being there other than to peep.  My blood boiled the second I saw him.  I screamed something along the lines of, “YOU MOTHERFUCKER!” and slammed my hand into the window, breaking it and cutting up my hand.  He started running and I ran to the front door in pajama pants and no shoes or anything else on before my brain turned back on.  I started thinking a little before Ari said, “Run Jason!”  I ran outside and circled her place in time to see him running across the park… at least I think I did, I didn’t have my glasses on so I have no idea what I saw.  So basically the creeper peeped into the window and my reaction was to punch out Ari’s window and yell profanities and then run outside in pajama pants in the rain.  Brilliant.

I talked to my brother Scott about it and he made the comment that we both kind of missed out on man-school.  Deep down in my brain stem, in the part of my brain that is ancient and animalistic, I have the instinct… I knew deep in my dna that I should be been breaking something and yelling; however, I didn’t really do anything effective.  If it happens again though it’s not going to go down that way.  I guess I am glad to know that I don’t completely freeze in that type of situation; however, blind rage isn’t much better.  I always suck clutch though.  My second attempt always gets better results.  I hope I don’t have to get a second attempt though.