Saturday, August 27, 2016

What I've been up to these days. (Technically Speaking)

Before I answer that question, I must tell you how I got into Computer Engineering in the first place.
Let's go back, way back, late nineties back, I was a young NCO in an infantry battalion in the U.S. Marines, I had these grand plans, I had all my life mapped out. My life goal then was to be the first Venezuelan born USMC General. For real. I had a few things that stood in the way, one, I was not a. U.S. citizen yet, and another minor thing, I didn't have a bachelor's degree, yet. So the plan was for me to get into the MECEP program, anyway, that's a whole other story, but for now I must tell you that back then I was planning on studying law. Yep, I wanted to have a law degree. This was before I totally understood what it meant to go to law school and pass a BAR and all of that. In any case, in the marines we were allowed to take college courses for free (yes, for free) as long as it didn't interfere with your mission, you could do it. You needed permission from the CO, but you could do it. So, I did, I took College Algebra, Intro to Sociology, Intro to Anthropology and Criminal Justice at Park College on board the USS Austin. I bet you didn't know that Navy ships had college courses, yes, we do, or did back when I was in. So in the Criminal Justice course I totally and completely lost my desire to study law. Our Justice system seemed, well, unfair. I just thought that I would be the world's lousiest lawyer. And frankly, I didn't want to go to school for that long.  I just wanted to get a degree so I could be on my way to OCS and become a Second Lieutenant in the Marine Corps, so school was more of a means to an end. Once I figured that I didn't want to be a lawyer I had to figure out what I was going to do. I took the aptitude exam and got Cop, FBI agent or CIA whatever, I thought the FBI was cool, but I knew in my heart that's not what I really want, that's when I picked up a career guide and saw that engineering was a well paid profession. Could I be an engineer? I thought, I remember my father told me that he started in Mechanical Engineering before dropping out and then going on to study accounting. I remembered how much I liked math, (I actually used to think that I was pretty damn good at math actually) and I also remembered how much I enjoyed programming my first computer, I used to have an old thing running Windows 3. I learned to write BASIC programs in 6th grade. This was the year 2000 and I was completely unaware of all the things going on in Silicon Valley at the time. But I had heard a lot of about Y2K and the .com bust. So I thought it would be cool to be a Computer Engineer, not Computer Scientist because I wanted the title "Engineer" it sounded so, well, professional, serious, rigorous. 

So back to my point, back in the day I thought that Computer Engineering was about building websites, I had effing clue what was coming. I learned about how processors worked, all the way down to the metal, literally. I learned about Circuits and about Discrete Mathematics and some programming in C, and some other neat stuff like Operating Systems and Networking. But I didn't learn anything about the web. I took a course on Network Security, and Cryptography, but I ended up doing an internship at a chip design team, and then I ended up doing embedded firmware after I graduated.

So finally, two years ago, I am in a team doing web services, that's what I've been up to. Yeah, I know it took a long time to get to this, so if you are still with me, thanks for reading (hi mom!)

So yeah, I am now finally doing something that I've been wanting to do for a while. I am doing Ruby on Rails for the most part. Although my team does a bit of everything, really.

In order to get better I've been reading "The Well-Grounded Rubyist" by Black Manning, hands down the best Ruby book I've read.

Another thing I've been working on is how to become a real-life hard-core algorist. For that I am slowly working my way through "The Algorithm Design Manual" by Steven Skiena.

I am still in Chapter 1.

The first chapter talks about the mindset of the algorist (a person skilled in the design of algorithms)
things like finding counter examples, proving correctness of an algorithm and proving things using mathematical induction.

Yeah, about that,

I've been stuck with the concept, yeah, back in school I did all the homework and passed the test back when I took Discrete Mathematics and Stochastic Systems. But, I feel like I just memorized how to work a family of contrived problems and I didn't really, like truly, deeply learned what proving by induction is all about. On the surface it still feels like magic. I mean, Induction seems kind of simple:

Suppose you want to prove that some property about any integer is true,  say, "n times (n+3) is always an even number" you first prove it for a base number 1, then you prove it that if it's true for then it is true for that base number plus 1 then it is true for all the numbers.

What I am still wrestling with is, how in the world do you know it is proven? How do you know you haven't made a mistake? The set of all natural integers is so freaking large, how do you know there isn't a counter case somewhere.

Obviously I still have some work to do. It may seem like this concept is so far removed from the practical world of actually building programs that do things that people find useful and valuable, but indeed it is very much related, here's why:

Induction is Recursion and Software is Recursion.

Yes, that's right, Recursion is just about doing the same step incrementally until you reach the base case. Most problems and algorithms in Software can be modeled as recursive objects.

Permutations? Recursive objects.
Sets and Subsets? Recursion
Graphs? Recursion
Trees? Are you kidding? Recursion
Strings? Delete one element from a string, what do you get? A smaller String. Strings are recursive objects.

So if you understand Induction, you understand recursion, if you understand recursion you know how to model most algorithms.

Monday, April 18, 2016

10 things I love about Seattle and 10 things I don't like about Seattle


1. Scenery: This state is freaking gorgeous. The snow-peaked mountains. The Puget Sound, the rivers, lakes, the parks, Mt Rainier. It's a beautiful area. San Juan Islands, Ferry to Bainbridge, wow, it's overwhelmingly pretty. Specially for me coming from the Tropics, this is very different from what I grew up with. 

2. Coffee: I live within walking distance of Vivaci, Ladro, Torino, Victrola, Vita, not to mention Starbucks Reserve and more. Good stuff

3. Tech Scene: There's competition for hiring the best software engineers, the big companies like Microsoft and Amazon cannot pump people fast enough. There's tons of smaller companies too and all the big players like Google, Facebook and Uber have offices here, if you can code, you work and live here and not have to pay the high cost of living of the Bay Area.

4. UW: The University of Washington is an great organization, the campus is beautiful, and the ties to the tech industries feed the private sector with world-class talent.

5. City Life: Good restaurants, museums, all kinds of cultural festivals in the city center, there's always something to do here. 

6. Pho and Teriyaki. Enough said. 

7. Nerds and Geek Culture. So there's a lot of scientist and engineers here, so, yeah, there's a lot of geek stuff going on, and it's plain awesome. I've never lived in a city where being a geek was the norm. 

8. Dog Friendly City. You can take your dog anywhere. There's a bulldog meetup, there's tons of dogs everywhere, there are more dogs than kids in Seattle

9. Weekend things with the kids: Hiking RattleSnake Ridge, Chilling at GasWorks Park. Going to the IMAX theater at the Pacific Science Center

10. Safeco Field and Century Link: Going to see the Sounders and the Mariners. I heard the Seahawks are good too, I just haven't had a chance to catch an NFL game yet. 

Needs Improvement

1. Traffic. Probably the worst thing about Seattle is it's traffic. I am not one to complain since I don't have a very long commute. (My office is a 2 minute walk) But still, the way the city is structured plus the lack of a solid public transportation infrastructure make Seattle one of the worst places to drive in the United States. 

2. Pacific North West Passive Aggressiveness. Seriously, wtf? People here are the opposite of, say, New Yorkers, they are nice to you and yet cold to you at the same time. This one warrants more in depth analysis. Just know that people here are...different.  We have met many nice people here, but the funny thing about that they are usually other transplants from the East Coast. Our closer friends here are mostly Floridian, although we've met nice people from Utah, California, Oregon and even Australia, but we're yet to be close friends with any native Seattleites, what gives? 

3. The Weather. It doesn't bother me a lot, but I'd be lying if I said that sometimes the constant drizzle doesn't get old. It's one of those things that you don't think about much as you go about your day, but last week when I was driving back from San Francisco, we had nice weather all the way, until we literally crossed the Washington border and bam, that annoying drizzle again. Maybe I am writing this because we had a brutal super rainy winter, but thankfully the weather has been nice lately so it's making up for lost time. When I first moved here a friend told me that locals just pretend like the rain is not there. That trick actually works most of the time. When you've been driving for 10 hours and want to get home safe, the PNW drenching drizzle is the last thing you want to see on the road. 

4. I-5. See traffic, it's so bad it needs its own entry. 

5. Homeless problem. Man, there's a big problem with homelessness in Seattle. You will see a lot of people on the parks, streets, under the highway, every where. 

6. Drug and Crime. It's not Chicago, it's not the Bronx, Hialiah, nothing like that but, there's a lot of car prowling and petty theft.  It's not uncommon to see used syringes laying on the sidewalks or on the public parks. 

7. Anti-tech sentiment: Amazon has transformed South Lake Union into a hub of mid to high rises with a bunch of new office buildings and a bunch of new rental apartments, as a result, rent has gone up and many people resent it, I totally get why people would get upset if their rent goes up, but the way they express it is by lashing out against programmers and transplants, because we must be the cause for everything that's is going wrong in Seattle. It's ironic that the same people who preach about tolerance and understanding and against stereotypes loves to stereotype the typical tech worker as self-absorbed, boring, white, privileged "brogrammer" when in fact, these companies are introducing a lot of diversity to the city. We transplants are helping the economy and are, for the most part, making Seattle a better place. 

8. House Prices: While it's not as bad as the Bay Area, it's getting there. You can still live quite well out of the city, but then you'd have to deal with traffic. See points 1 & 4.

9. Your vote doesn't count as much. We're all liberals here, so what's the point of voting? the vote has been decided already. If you are a conservative here. Good luck with that. 

10. They don't have a Publix here. (This should have been on top of the list)


How does one live a good life?

This is a good question. I don't want to sit here and ramble a long answer. Part of the reason I am forcing myself to write once a day is to improve my communication abilities. 

When it comes to our desires and our feelings there are two different parts that compete for control. There's the "impulsive" brain and then there's the "reflective" brain so to speak. There's a part of you that is concerned about the here and now, it's the part of you that craves to binge-watch netflix, order pizza, sleep, it's the part of the brain that just want to feel good now. It's associated with the primal desires. It wants to eat, sleep, have sex, be entertained. Then there's the part that wants more than that, it wants you to be better, that better can be different things. Maybe you want more money, more fame, more power, or you want a goal that you care deeply about, like building that bike shed, or running that marathon, losing 20 pounds, or helping the needy, or whatever. 

A good life is when you can satisfy both halves, when you can have a good balance between both sides, also, the goals that you pick matter, it turns out that there are things that are not fulfilling, once you have a certain amount of money, more of it won't make you happier, so what does?

It turns out, the old philosophers were right, improving your character makes you happy. Specifically, The 24 character virtues outlined by Martin Seligman: I recommend you take a look.


Saturday, April 16, 2016

Why I had stopped blogging and why I want to start again.

I stopped blogging ironically because I wanted to write better posts. I wanted to share with the world something worth sharing. The problem is, the tasks seemed so daunting that I would just give up before even starting.

I guess I am just giving up on that and just want to just write whatever comes to my head. Is not like that many people read this anyway.

So what would stop me for writing is that I wonder what would I write that people would want to read?

My life is not boring, but it's not really that unique.

So I'll share with you what's important to me. I strive each day to be better than I was before. But what does that mean? Well, I try to be a better father, a better husband, a better engineer and a better person. I am not always successful, but I try not to make the same mistake twice.

So for the past few years I've been working on that, learning what it means to live a good life, and learning what it means to be a better person. There's actually a lot that has been written about that and I maybe I'll get around to listing them.

Another big theme for me has been the quest for being a good software engineer. I have a lot to say that as well.

Monday, April 13, 2015

How to be stupid in the Internet

Rule #1. Have a Narrow Point of View

Never consider or try to understand things through viewpoints other than your own. Of course your point of view is the only one worth considering. It's the right one!

Rule #2. Be very emotional.

The more emotion, the better, anger is best. After all, is good to be passionate, so the more anger, the better, this leaves out other pesky ways of thinking, like rationality, and logic, who needs those? Make sure you get offended easily.

Rule #3. Never Change your mind. 

Never, ever, under any circumstances even entertain the idea that you might be wrong. That's what weak people do, absolute certainty is the way to go. There is no way others could be right, and you could be wrong.

Monday, January 20, 2014

Some unexpected things I've seen in Paris

EDIT: I was going through my blog drafts when I found it.  I wrote this a year and a half ago when Martha and I went to France to celebrate our 10 year anniversary. I couldn't sleep, wrote this and forgot about it.  I thought I put it up anyway.

It's 5:30 AM in France, almost midnight in Florida, can't sleep, can't blame it on the time difference..anyway, This is the list of weird things I've seen in Paris

 1. A group of 10 people dressed like where is Waldo walking around looking at a map

2. 2 little kids almost separated from their parents who were at a sight seeing bus, bus driver did not want to stop, even though the kids were small and the parents were telling the driver to stop. Wtf?

 3. Inside the metro, a group of people dressed like a fruits, they had a whole fruit salad going on, strawberry, banana, and something green, not sure if peas or what.

 4. A police foot chase, near the bridge of locks, the cops were chasing a girl, by foot, car and boat.

5. Not as many Americans as I expected.

Sunday, March 25, 2012

How do you Break the Spell?

I read somewhere, I don't remember where or when, a story about an old lady in 18th century Scotland, (or was it Ireland? England?, doesn't matter where) the thing is this lady's son went out on a fishing boat, and the boat didn't come back, it may have been a storm, pirates, a fire on-board, something happened, bottom line, the ship sailed and it was never heard from again.

After some years, in these situations most people give up on hope on ever seeing their loved ones, but not this lady, she would assert that her son was still alive, she had no reason or evidence that would support her belief, but that didn't stop her. She just knew that her son was out there, alive, somewhere, and it was only a matter of time before she got to see her son again.

I can only imagine what it is not to know what happened to someone you love. I put myself in that lady's shoes and can see where she is coming from. You want to keep the hope alive, you don't want to face the unthinkable, the worst case scenario, the excruciating pain that comes from losing your son.

Perhaps she thought that her son was in some tropical paradise, they wrecked with no way out of it, and settled in with the natives, had 10 kids, and was living a happy life secluded from Civilization. Most likely he drowned in a bad storm, who knows? The question is, which version would you rather believe? The lady, let's call her "Mary" chose to believe the version that made her feel better, not the one most likely to be true. Who can blame her?

As more and more years passed it become more apparent that the son was probably not coming back and Mary would not see her son again. But then, one day, 27 years later, a stranger showed up to Mary's town claiming to be her son.

I can see the commotion, the excitement, he's back! Our Mary was right all along. But then things turned ugly, the guy claiming to be Mary's son, had no resemblance at all to him, the more they town people got to know the guy the more apparent it became that he probably had heard about Mary's story and wanted to take advantage of her.

But Mary saw things differently, she was so happy that her son was back and she thought that the town people were jealous of her happiness she wanted to believe that her son was alive so badly that she ignored any signs that it was not him. He didn't look the same, did not act the same, it was a complete stranger, but she could not see it.

My question is, if you care about Mary, do you make her see the truth or do you let her be happy the way she is?

The answer depends, is she really happy? or does she know, deep down that her son is gone? What if she really believes it? Who are we to interfere? Do we draw the line when she starts to make bad decisions? When others start to take advantage of her faith to gain favors? Do we draw the line when she starts hurting others?

Is it wrong to let her live her life in such delusion? Is it wrong to make her suffer and shatter he hopes?

Some say no, let her be happy. I can relate to that, live and let others live, as long as she is not harming anyone else, that's ok.

But others would say, well, if you care about her, if you really have love, concern and respect for that person, the dignified thing would be to help Mary face reality with courage and strength, help her grieve her loss and move on with her life.

The right answer should be somewhere between those extremes, you can't make a person see reality if they don't want to. You have to let people have the freedom to make their choices as long as they are not harming anyone else. You can provide guidance if they ask for it. But you can't go around telling them how wrong they are.

And that's kind of how I feel about atheism. I see people believing in all kinds of stuff that I see as superstitions, as something slightly above Santa Claus for grown ups. But I can't go around telling people that, especially if they don't want to hear it, if they don't want to question their beliefs. I used to take for granted that since I am always trying to question what I think its true, I thought that others would do the same. But that's not the case, in fact, most people would love to share their beliefs with you, but not the other way around.

But, sometimes, faith can have its consequences, when it goes to extremes, let the law take care of it, otherwise, education will solve the problem, since religion has evolved a lot since the elighqment, I think that it will eventually go away on its own now that we live in the age of information, thanks to the internet, curious minds will have access to other people with the same questions, and ignorance while it may never go away, it will be mitigated effectively.

How is that for a self-delusion?


Monday, March 12, 2012

A tale of two robots

It was the best of teams, it was the worst of teams.

One robotics high school team had all the resources it needed, it had an excellent teaching staff, involved parents, a bunch of smart kids, and adequate funding to go to three Regionals. Let's call this school "A.

Another high school robotics team had enough funding for only one tournament, it had a handful of kids, one teacher, and no parents, not a lot of support, not a lot of evident motivation. Just some kids and a volunteer. This team started building their robot only days before the competition (As opposed to weeks before, which is what A did) Let's call this school "B"

Both robotics team were sponsored by my employer. A few of my co-workers and I spent some time helping out these schools.

One school finished last place in the tournament, while the other ranked 14 out of 63 and played in the quarter finals in the Regional competition. Guess which one won and which one didn't?

If you guessed school A. Guess again. School B made it to the second round. While school A, with all the great kids and staff didn't make it.

I've been trying to figure out why for the past couple of days.

Is it talent? School A had a bunch of smart kids, some of which will probably be accepted to Ivy League schools, a big chunk of them will go to the University of Florida's college of Engineering. So what happened. Was it the way the team was managed? Was there some kind of systematic problem with school A? Was it luck? God? The Liberals?

Although winning is not the most important thing in these Robotics competitions, it does raise an important question. How do you put together a winning robot? How do you get these teams to win?

First let me explain what happened.

Rebound Rumble is this years Robotics Game. In order to win,two competing Alliances compete to score as many basketballs into their hoops as they can during a 2 minute and 15 second match. Each alliance consists of three robots. The higher the hoop in which the basketball is scored, the more points the Alliance receives. The match begins with a 15-second Autonomous period where the robots operate independently of driver input. Baskets scored during this period are worth extra points.

The match ends with robots attempting to balance on bridges located at the middle of the field. In Qualification Matches a team scores extra points if they try to balance in the center bridge with a robot from the opposing Alliance.

Robot A was designed and built to do all the tasks in the game, it had a camera that talked to the processor in order to perform computer vision. It would scan the image it was fed for targets, then it would determine the distance to the target and figure out how much current it needs to send to the rollers that will make the basketball shoot.

Robot A also had an arm controlled with pneumatics that was going to bring the bridge down in order be able to get on the ramp.

Robot B could only do two things, it could move, and it could shoot, there was no time spent trying to get a camera vision thing, it spent no time trying to have a ramp mechanism.

Robot B however, had one thing that Robot A didn't have, it had a student that could drive that robot like it was nobody's business. Not to say that the drivers for Robot A sucked or anything, they were adequate, but Robot B's driver was good, it made no mistakes, and it had a sense of where to put the robot. It knew how to use what it had to get the most out of the game. Robot B had strategy, it could do a couple of things well, and it stuck to it. The team knew strategy, the team was able to build a shooting motion that was repeatable enough that it could land a ball in the basket time after time once it found the sweet spot. Robot B also got lucky, but I'd say that it manufactured its luck.

Did Robot A make any mistakes? perhaps it did. A lot of effort was put on making a mechanism to lower the bridge that was never used and was not crucial to winning the game. As a result, no time was spent on perfecting the shooter. The pit for Robot A was full of well -intentioned, talented people, but, nobody brought up this fact until it was too late.

Lack of vision? foresight? perhaps lack of leadership?

Probably a bit of everything. You need both, you need the talent and the leadership to set direction. You can have a bunch of talent but if nobody knows where to go, you will not get anywhere.

Well, that's all I have for now. I got other stuff going on but remember, be good to each other ya'll.