Monday, August 19, 2013

Day 4

What if all you understand
Could fit into the center of our hand?
Then you found it wasn't you

I have 11 straight days of vacation.  Today is day 4.  I thought I was getting burnt out before vacation;  its only getting worse.  So far I've managed to re-learn php and mysql and create a website login system that follows most of the security best practices that aren't dumb (its funny how much more code you have to write).  Now, all I have to do is prototype an integration with a web payments system, redesign part of the data prototype, finish a stand-alone skin quiz app, write an app that shows live DOTA2 scores which requires figuring out how to automatically discover and connect to live DOTA2 games AND also some friends at work and I have discussed yet another app idea involving taxi drivers.  In addition, I need to get my car fixed, get my bike fixed, deal with my car paint, get some work done on the apartment, consult an FAA medical examiner about getting my medical back, start meditating again, start lifting every day again, start eating smoothies every day again, cook more to avoid spending so much on going out, try several new healthier foods, buy a new [nice looking] motorcycle jacket for impressing girls, go salsa dancing a lot to work on my dance game, and check out some kind of male fashion sub-reddit so I can finally start dressing better.  And simultaneously lose and gain a ton of weight.  And train myself enough so I can start bicycling to work.  I also need to take some stuff to the computer recycling center, get a second seat for my motorcycle so I can carry a girl, and get a consultation for hair transplants so girls stop mistaking me for a 32 year old.  Also, I need to get more sleep.

Also, somewhere in there I need to relax or go outside or something.  Vacation.



So...as you can see its not going as well as I'd like.  I did a lot of programming, but it was the difficult kind.  In fact, I have a theory.  Let me share it with you.  Its called "the fog."  The fog is what happens to my brain when I try to do the following all at the same time:
1. design work
2. learning (new API, best practices, etc)
3. implementing (writing code)

All three of those are a cluster fuck that taxes my brain and prevents me from coding for long periods of time, which means lots of breaks.  During those breaks, I have to avoid video games that use a lot of brainpower.  So, Starcraft is out.  I've had some luck with Classic Unreal Tournament (UT '99) -- that game is a purely twitch game.  It also makes me miss Lan Parties.

In contrast, when I am only doing #3?  Implementing?  I can code for 10 hours straight.  But here is the problem:  I will rarely only be doing #3.  Most of the things worth doing, where you break new ground or make money where other people havent, are going to require more than #3.  If you just want to write code that you already know how to write, you're just going to be another employee at some software company that is not in the top 5 in the world.  Maybe I should do that for a while to take a break;  I don't know.

Anyway.

I've been fairly productive.  I mean, at least the login part of the website is done.  Thursday I played some weird game at the salsa club where I tried to get girls to turn me down for dances and discovered that that was surprisingly hard--the less effort I put into asking them the more they wanted it.  Its sad that you basically have to sacrifice all of your human empathy in order to get good at hitting on girls, but its still fun.  And yesterday I rode my bicycle for far longer than I can normally endure, until I felt like I was about to pass out and my left hand started going numb.  And then I rode for another hour.  And then I turned back to come home.  I did make it all the way across the water to almost-bellevue before turning back, but by the time I got home I was limping.  Given that I didn't even make it to bellevue, I don't think I will be able to commute via bicycle all the way by the end of my vacation, but I can sure as hell try.  I suppose when commuting I wont need to save any energy for the return trip.

Today was kind of a waste.  I hardly got much programming done.  I played a lot of video games and watched TV and did a bit of walking around outside by my mind just feels cloudy, like its difficult to concentrate.  I probably need a real vacation--one where I don't have to do any work.  However, I only have 7 days left and a shit ton of stuff I want to get done.

Oh and I also need to do laundry.

Friday, August 16, 2013

[coding] Creating a Secure Login System, Part 1

Creating a secure login system is a key part of blah blah blah blah /intro.

When I was in high school, I wrote the website for the lan party I used to run.  I'm pretty sure I stored the user and password in cleartext in a mysql database, and even if I had heard of password hashing, the concept would have sounded like some unbelievable mission impossible shit.  Now that I have to implement a login system for realz, I've been reading a lot of articles, pseudo articles, and stack overflow opinions on password security.  Things are quite different now.  Hashing passwords isn't even good enough.  You need salts.  You need stretching.  You need all kinds of shit.  I thought I would take a break from learning php and mysql again to comment on some notes I've taken.

Concerning passwords:

The best password, obviously, would be a minimum of 64 characters long and include lower case letters, upper case letters, numbers, symbols, unicode characters, klingon symbols and markings from an extinct redneck dialect of elfish that fell out of use after the first age of middle earth--most of which cannot be typed with any keyboard we here possess.  Actually it would be best if the passwords included characters than cannot be typed with any keyboard.  Then no one would ever crack the passwords. 

Obviously we are going to need to salt them with a source of entropy based on two hydrogen atoms having quantum sex with either other, and OBVIOUSLY md5 and sha1 can't be used because some guys on the internet said so on stack overflow;  clearly the hashing method we should use needs to be some kind of super secure algorithm that is so new no one, anywhere, has released a builtin library for it.  Anything php supports must already have been cracked.

Of course rolling your own crypto algorithm is not a best practice.  What we should really do, therefore, is maybe we should just not let anyone log into the system at all!  Since we're an american-based company, the cunts at the NSA can just send us a secret letter and make us turn over all of our customer data anyway.
OR

We realize that there needs to be a balance between security and ease of use.  I'm actually not storing any payment data in our own system anyway, so the worse an attacker should be able to do when hacking someones account is change their membership level or cancel their account.

Monday, August 12, 2013

Not all those who wander are lost

It is a strange experience to be both part of and not part of a subculture.  I've experienced this a number of times.  I attended the DOTA 2 International Tournament off and on with a friend who was visiting.  Everything about the tournament was familiar:  the ambiance (felt like a typical con), the excited personalities of the other attendees, etc.  The only thing I didn't get was the actual screen.  DOTA 2 is a somewhat unique 5 on 5 game based on a user mod made for the Warcraft 3 back in the day.  It was grown into something of a phenomenon.  A very complicated phenomenon.  Perhaps you've heard talk about the difference between knowing the mechanical rules of chess and actually knowing how to play.  DOTA 2 takes that concept a thousand steps further.  I have, technically, played a game against bots.  I have no idea what was going on in the tournament games, except that whenever people in the audience started screaming; when I knew someone was about to die and watched the scoreboard.

Some of the people we were hanging out with at the tournament with were stayed in a hostel.  I've never been in a hostel before, but when we visited them for a few beers, the atmosphere felt like everything I had imagined traveling would be like.  Tons of friendly people all over the place, chilling out, free from their daily routines and comfort zones.  My routines have gotten so bad that when its a nice day out I have no idea what to do with it;  enjoying it becomes a chore and I try to decide how to get my bike to the nearest park (soo many hills) and then I think about how my ex girlfriend loved being outside on nice days, and I play video games alone in my apartment just to spite her.  Not sure how effective that is.

Anyway, I feel the travel bug coming on.  I was sitting in a bar for the "after party" of this tournament, watching a bunch of nerds dance surprisingly well to techno music, and musing over how the gender ratio was literally, strictly worse than the gayest gay club on capitol hill, and all I could think about was traveling.  Right now is a terrible time to travel.  I am thinking about my next move in my carreer, and I have side shit going on, and blah blah blah what if I just dropped everything and spend my life savings to stay on Ibiza beach for a summer?

Now. Strippers.

I have been in strip clubs before.  In fact, going to them kind of ruined the idea of strip clubs as mysterious, evil hives of scum and villainy where girls are abused and degraded and etc.  That is basically bullshit.  They are so un-evil is almost mundane.

Anyway, I elected to go to a strip club recently, and holy shit were they aggressive.  I admit, when you abstract away everything a strip club is, the thing I'm really paying for is just to be in a place where girls 1) exist and 2) are friendly and 3) approach you.  Sort of a "in soviet russia girls approach you" joke, but true.  I know that most guys just go there to carefully review their visual assets, but my favorite part is talking to them.  Fake or not, I love their personalities.  And I don't have to worry about coming up with what to say because they do small talk like its their job.

Now, in this particular strip club in Seattle, it was a bit extreme.  I couldn't sit for any length of time without one of them descending upon my like a hawk, sitting on my lap, making fake conversation for a minute and then trying to get me to pay for a lap dance, and then constantly up-selling the type of lap dance (there is more than one kind!  and they always cost even more money) and hounding me to buy more.  One possible reason for their aggression was that strip clubs in Washington state are not allowed to sell booze, which possibly forces the girls to take it upon themselves to ensure that we make bad decisions.  I was not prepared, nor even capable, of saying no to that many pretty faces.  It is literally something I've never had to do before.  I didn't even have the words.  I went to the club thinking that I would lose some singles while sitting at the stage, and then splurge on one or two lap dances.  I lost count of how many lap dances I got, but 10 wouldn't be too far off.  I am now hundreds of dollars poorer, and all I have from it is a memory of 10 different girls rubbing their boobs on my face and 2 of them doing an Oscar-worthy job of pretending they were actually interested in me.

So lets recap.  I put off buying a $500 air conditioner for four years in a misguided attempt to be frugal with my money.  Then in one night I drop even more money in exchange for...essentially nothing.

So, where do we go from here?  Do we continue as planned, trying to set up these side projects, switch jobs, etc?  Do we start planning a trip somewhere?  Do we start going out clubbing more often?  None of these choices are easy, but easy is boring anyway.

I have had this idea of collecting 500 dance rejections.  Why?  Because I hate it when I'm salsa dancing and I ask a girl to dance and she gives me some bullshit excuse.  Hate it.  So I thought I would try to make the rejection a thing I try to acquire, in order to negate my negative emotional response.  Feasible?  Not sure.  But gaining the ability to ask every girl in the room to dance, smoothly, without caring when anyone thinks in an important step into becoming an unstoppable dance...monster.  What I could try, though, is telling myself that every ten dance rejections I earn a lap dance at the strip club from one of the girls that pretended to like me.  Because going to bed after paying a girl to smash your face into her chest is more pleasant than going to bed after ten girls told you they need to "finish [their] water." 

Then again, I should probably never set foot in that place again.

Saturday, August 10, 2013

[coding] Web Deving

All I need is a website with a secure login mechanism that can process payments.  We should have some great skin care related software soon, but unfortunately since we want to make subscriptions work on both Android and iOS, with a one-to-many-to-many ratio between subscriptions, users and devices, we have to implement our own website to make people pay for it.  And having people give us money is the whole point of this thing.

Turns out, logins and payments are the hard parts of web development.  I spend an hour researching best practices for storing logins and passwords and managed to fill up a small page with a checklist of things to do to keep it secure.  And then there's session ids to worry about.

Even worse, PHP appears to remain the most popular language for implementing low-end web backends.  And the language is still a filthy mess.  Even when I just search for something non-denominational like "best practices for secure logins" I find examples in mostly PHP code.

I think I'm going to try ruby instead.  PHP appears to be more popular, and I already know it, but the most important different between PHP and Ruby is that I actually like Ruby, and Ruby doesn't make me want to kill myself.

Friday, August 9, 2013

What's it like at the top of the bell curve?

At work, one of our major business partners, one of the big ones that we jump and do a lot of work for, basically wasted 6 months of my time.  Personally, it wasn't actually a waste because I used the opportunity to learn Android.  Officially, and concerning my career within this company, it was a giant waste of time that set my career back by 6 months.  I'll have to hide how little that bothers me.

Saturday, August 3, 2013

Pet Peeves

It has just come to my attention that in Seattle we are expected to have licenses for our pets.  I found a postcard to that effect in my mailbox today.

My single greatest regret, at least for the past 72 hours, is that I don't own such a pet that I could continue to own in an unlicensed fashion.  In fact, by continuing to not own a pet, I am tacitly obeying this ridiculous law.  This is unacceptable.  I feel like I need to buy a cat or something, just so I can break the rules.

I probably won't though.  Too much work, and cat hair, and I'm beginning to suspect I'm allergic.  What I would like, actually, is to buy stock in a cat.  For example, I would be maybe a 25% owner in an American Shorthair or something more elegant like a fine Chartreux.  Obviously there would be some kind of entity set up for the management of the cat--making sure she has a warm home and some cat friends and some humans to ignore and all the fucking catnip she can trip on and, of course, making sure she stays unregistered.  In fact, at the annual catholders meeting, I would probably vote to changing her name from "Sprinkles" to "Unregistered Cat #0."  Naturally, such an establishment would take like a 7% earnings from the cat for her care.

That's really what I want here--some kind of cat stock, so that I can break the law without having to go to the trouble of actually taking care of a pet.

Fuck you Seattle.