All posts by laimonas

A start of machine learning journey

Early in September, I started taking a course on learning. Essentially it is a course on how to be a better learner. Learning about learning might sound silly, but it was a great course with many great strategies to employ when trying to master new material or acquire new skills.

As part of the course, we had to pick a project that we will use to apply the techniques we were learning. The concept made a lot of sense. In my experience, the best way to learn a practical skill is to combine the theoretical knowledge with practical work, so the project seemed very appropriate.

My project was to take and finish a course on Machine Learning. I knew close to nothing in this area, and it is a field that is hot in software engineering. ML being new to me, it gave me a chance to program using techniques that are completely unknown and that makes things a bit frustrating but also a lot of fun.

The course I went with was Udacity’s Intro to Machine Learning course. So far the intuition to pick that course is proving to be correct. I finished it ahead of my planned scheduled. It took me just a tad over two months, while mostly studying on weekends and occasional early morning.

The most fun part was applying the skills learned from the course at my current job. We do some video processing tasks and such things have been notoriously tricky to estimate how long they will take to complete. With ML, and more specifically regression analysis, it was a breeze to build a model that gave excellent predictions on processing durations. Some of the predicted times were within seconds of the actual times, most within minutes, which was more than sufficient when you consider the processing could last anywhere from 20 to 40 minutes (with some outliers of course shorter or much longer).

My goal was to apply the techniques in some capacity by February 2017, and being able to do that so much earlier was a big boost and motivator to continue going strong. Actually one of the learning course main preaching points was to use what is being learned right away, even if you don’t feel like you know what you are doing. It just strengthens the knowledge and right away deepens your grasp of the concepts that you are learning.

I am highly recommending udacity’s course for the others that might like to start ML journey themselves. It is not very heavy on theory, although one should use the topics presented to dive into more theory online. The examples and mini projects they present are really great, interesting and informative. If you know a bit of python you are pretty much ready to go. Knowing some of the advanced math conceps helps to understand the course better, but it is not necessary in order to use the techniques.

What’s next? I am happy to share that I got accepted to AI nano degree. It does not start until February 2017, so in the meantime, I am taking another ML intro course, this time Stanford’s Machine Learning course which I debated to take before picking Udacity’s option. Stanford course is great, but presents much more theory and is a bit more “drier”, more pedantic. I am on a week 3 now of the course, going ahead as far as I can before Neural Network weeks. That area might prove to be very complicated so it will be good to have as much cushion as possible for quizzes and learning.

 

That’s it for now. I can’t wait to see where this ML journey will bring me. Hopefully, I will continue to deepen and strengthen my practical skills and start applying it in everyday life with regularity.

Experiment: taking notes while reading

This seems to be a common evolution for non-fiction readers:

  1. A love for reading leads to various fiction books. A thought of reading non-fiction does not enter one’s mind.
  2. Continued love for reading and desire to learn more leads to an occasional non-fiction selection.
  3. Non-fiction starts to dominate the reading list until eventually a fiction book is a rare choice.
  4. The realization that “plowing through” non-fiction in the same fashion as fiction leads to forgetting the content way too easily — some sort of notes / review process is added.
  5. Notes / review process evolves as one gains experience with it.

If you read a lot of non-fiction and haven’t started taking notes, I would highly recommend doing so. It might seem like a daunting task at first, but it is actually not that bad and enhances the overall satisfaction with your reads.

The simplest form of note taking is summarizing the book after you read it. I’ve been doing this for six years and have found it to be very useful. It’s a good way to refresh yourself on what the book was about in case you need to make a recommendation to another reader. Summaries also come in handy when you need information that you know you read about but are not sure which book contains it. Often the summary will remind you which one it was.

I’ve found that doing a summary right after finishing the book is the best way to go about it. Make sure you record it somewhere that you can easily go back to when you need it. Google Docs is good and simple, or you can use something more sophisticated like goodreads.com. I wrote a book site for myself that anyone can create an account on and use: trackmybooks.appspot.com. Goodreads is too noisy / distracting for me for this purpose.

For a couple months now I’ve been running an experiment of taking notes while reading. It is a much more intense and in-depth process than summarizing a book. I’ve used it for three books so far and I am enjoying the process immensely.

What held me back from taking notes while reading was fear that it will prolong the reading time greatly, and make it less enjoyable. However, if you change how you read books and combine it with the constant analysis, review, and questioning of the material it leads to a greater understanding, and greater enjoyment. You really start to “feel” the book instead of passing it through your thoughts. And instead of simply reading the book from start to finish, now I do this:

  • Quickly review the book online either on Amazon or Wikipedia to see what is a point the author is trying to make.
  • Get some quick info on the author and what is the author known for.
  • Look at the table of contents and note the name of each chapter so you familiarize with how the book will flow
  • Now read through each chapter: look at the title, for each paragraph read first and last sentences to see if you get the idea of the paragraph and if it is necessary to dig in more.
  • While doing this, summarize what you are reading in your notes, but in your own words. Ask questions, verify the strong points author tries to make: do you agree or disagree? does the point make sense? what are others saying about it? The actual place where I take notes right now is a simple paper notebook. Not sure how that will hold up and how I will go about digitizing this.

Essentially you are studying the material. I am still a rookie at this and I am sure my note process will change as I go. My notes might still be too passive, still follow the book too much vs being my own voice. Or maybe not, I just need to continue doing this and evaluate how I feel about the process as I go, and adjust.

Some of the interesting links I found when researching how others take notes:

I think the key is to start simple, not too worry too much if you have the right approach, just pick one and evaluate and then adjust as you go. Personally, I will continue to develop the note taking approach and looking forward to seeing where it will take me.

A great Quora question and answer

Resurrecting the habit of writing regularly on this blog by using it as a place to share and document some of the more interesting content I find.

There was a question on Quora recently: “What are some of the best life tips?” and this answer by Dean Yeong is excellent. It contains number of points and I would like to highlight some of my favorite ones below:

#4. Stop complaining – “it changes nothing at all” – so true. I think all of us go through a phase where our first instinct when things don’t go our way is to turn to complaining. Luckily some realize how wasteful such a habit is and get past it. You are better off spending your energy else where.

#7 Detach your emotions with external things – meaning don’t allow others to influence how you feel and how you go about your business. I think part of this includes surrounding yourself with people who are less concerned about controlling / influencing your feelings and instead are there to share their ideas and support you when necessary.

#12 Take tiny actions, celebrate small wins – this one is big for me personally. Often I witness how people are very dismissive of small steps thinking that they are simply too small to make an impact. When we see people accomplish big things we don’t see the paths that got them there and in truth it often starts with a tiny step. For instance, one Stanford professor seems to have dedicated his all career to this idea with of tiny habits as a way to bring a positive change to your life.

#21 Fail hard, fail often – in my world I translate this to “do not be afraid to deploy” 🙂 Honestly, I don’t do this enough in my life, but when I do, the benefits are very visible. Failing hard and often means trying often and if you combine that with learning from failures that means you are just getting better at what you are doing.

Here are some items on the list that I am reluctant to do, or haven’t done as often as I think I should (#21 is already mentioned above):

#11 Relationship is the place to give – only after having children did I start to learn to live life more selflessly and give to others. It’s still a work in progress and outside of my children I tend to be more reserved and not involved.

#14 Do something that scares you – this one is a tough one. I can count on my one hand how many times I did a scary thing in the last 5 years. That’s a troublesome realization. I need to keep this in mind the next time I get that “this is crazy, let’s not do it” or “I don’t know how to do this or if I should do it” feeling.

#18 Start selling – that’s an interesting one. Couple times in my life I actually did do some selling and was pretty good at it. First experience was selling candy in the market when I was 14-16 years old during summers. Made nice amount of money for cool school supplies and other knickknacks that my parents would not buy. Then later in my life selling my stuff on eBay until I sold all of the things I wanted to get rid off. My first job out of college was private software consulting and writing various programs for a patent lawyer. And then I kind of stopped but I do remember enjoying the process immensely. Just getting a kick out of somebody placing an order and me following through with it and giving back great service and great customer support.

Hope you enjoyed the quora post and my thoughts on it. I am very thankful for people who share their ideas and expertise that they have gathered in their lives. Hopefully all of us can find useful information and learn and share it with the rest of the world.

Having options – not always a good thing

It struck me this past weekend how having options  can be a hindrance to getting things done. I was doing something where a window of “free” time was coming up in the next two hours. As I was about to start reading a book, I thought, “well, what if I did some programming instead?” And of course a debate followed in my head which one to do next. “Couple hours, not a lot of time to do programming, maybe I can respond to emails instead, so I don’t have to do it later? But then reading would be good too. Which one should I do?”

I ended up reading, but this made me think how planning ahead helps to avoid mental debates on what to do next. I usually plan my day a night before but had skipped it for that day and voila. Couple hours might not seem much, but if you are a top performer and keep yourself very busy, couple hours are quite precious.

This situation brought back the memories of times when I was a kid and there usually was only one thing to do. It allowed me to buckle down, and do it. Even if the task was boring, you just kind of did it because there was nothing else to do. It is an extreme in an opposite direction, but something that made me remember how a lack of choice got one moving without too much mental effort in deciding what to do next.

Weekly planning process

horizon

Every week, mostly Sundays, I sit down and go over what happened during the last 7 days and what I am planning on doing next. I have been following this weekly planning process for several years now. It helps in several areas. First, I am more prepared and can get done more. Second, taking time to reflect and look ahead keeps me aligned with my goals and challenges I have set for myself. It is another way to take a step back and have an overview of what is going on.

The planning session process has changed over the years, and it continues to change as I learn new things about myself. Its most recent version has these questions:

  • which habits am I working on and how did I do on them in the last week
  • what were the top 3 most important things I did last week
  • what things did I fail to accomplish
  • did I do what I said are my top 3 things from the last week?
  • what are my top 3 things for the next week

And now I have added on more, “What are you most thankful for?”. I have read that it is a good idea to practice gratitude. So I am trying it out and so far I do indeed like it. I actually love it, especially when I take a moment to be thankful for my family and how lucky I am to have them.

So yeah, if you hear people do more planning but not sure where to start, weekly planning sessions might be a good start. Usually you will need an hour, at least to start with. You can get more detail and intense once you get into planning habit and get a better sense of what you can get done in a week. Until then, start small and improve as you go.

Boring stuff first

Our excitement level is really high when we start doing something that we like and is new to us. Be it a new sport that you just started playing, a great book you have been waiting to read, or a project at work that fits your interests really well. At this stage spending the time and energy on a task is easy. You have a high desire to jump in, take action, and run with it. And then of course life happens, obstacles appear, unanticipated findings and other “derailments” come around and the going gets tough. Hopefully you planned well and can navigate around the obstacles to complete whatever you wanted to complete on time. Always be ready for the process to get tough or boring, so to speak.

This initial excitement in the early stages is the reason why I have been starting to do the “boring” stuff first. I know that boring / mundane tasks will get much harder to do once the initial high wears off. Boring tasks can’t be avoided, so best to plan for them and make sure to do them before or together with the things that excite you.

Take software development for instance. I used to leave the monitoring part of a software release as a last piece in the implementation. The excitement of solving the problem was the main priority. After all, monitoring can be a mundane and thus a very boring task. The first time around you are excited to wire up probes and get notified when things fail. But after going through the process several dozen times it gets old pretty quick. You start getting that inkling to release the feature first and then add monitoring pass later. Of course, that is not a good idea. Although it is better than nothing, it can get forgotten or done haphazardly. That’s why whenever possible I layout the monitoring and logging first and then tackle the implementation that I wanted to build.

This rule should not be applied if you are prototyping or trying things out. When you are learning, it is best to remove the boring stuff altogether and focus on the meaty parts. Remove the obstacles for learning. However if you have a good idea of where you are going with the implementation, do yourself a favor and think of the boring stuff you need to do and make sure you get that done as early as possible.

Quick tip on learning

In software engineering you are always learning. Technologies are young and ever-changing so staying on top on the latest trends is important. Yet it can also be time-consuming and often skipped. Recently I found a way to brush up on various tech topics in an afternoon or less.

Go to a site like stackoverflow.com and look at the most upvoted questions for your language or technology area of interest. I just did this for C# and was pleasantly surprised how useful it was to go over the posts. Even if posts themselves might not give you all the answers you need, you can use them as a starting point to branch out. Similarly by checking what is trending for a week or a month can give you some useful insights into common issues and conversations.

I used to ignore these top lists or “trending” lists, and I think that is still good idea to do in news sites or social media sites. Often these lists will be influenced by advertising and will waste your time. But now I realize that in some areas these lists are quite useful so I should use it where applicable.

Obviously that is only a one way to learn but I figured I will share along. Based on my observations at the very least it gives you broad topics that you can then narrow down on or gives you an idea what others are looking at and struggling with so that you can come in and help out or at least think about these problems as an exercise to keep your mind sharp.

Learning Spanish progress

Learning a new language is a popular goal to set. Now that the world is more connected than ever it can be quite useful to speak a few languages. In addition to physical travel, we are now exposed to each other much more closely over the internet and interacting with people in multiple languages is much more common than it was previously possible.

I started learning Spanish mostly for fun. Spanish is a good fit for me because of where my wife and I vacation most frequently. We have visited Puerto Rico, Dominican Republic, and Costa Rica just in the recent years. We love the culture, weather, and the people and will continue to visit Central American and eventually South American countries in our future. She speaks Spanish quite well but up until recently I only knew an occasional word or a saying. So I decided to change that so that the next time we visit I can interact with the locals more. Also I love learning. Acquiring knowledge is a fun process and I decided to go after it.

I have been working on Spanish on and off for two years now, with some mixed results. Just to give an idea of the progress, I started with zero knowledge and the best I have done so far is have a somewhat decent conversation with a Spanish tutor on Skype. In between, it has been a lot of ups and downs, progress and frustrations, and all part of the learning adventure.

Duolingo has been the most influential and wonderful tool. You don’t have to know the language at all when you begin. If you spend a month with Duolingo you will get enough of the vocabulary for the most rudimentary conversations. I like their manageable sizes of the learning sections. That helps to get a sense of making progress. And making progress helps tremendously with motivation to continue to learn. The user interface is fun and it even has point systems and other “gamification” aspects to it to keep the learner engaged.

One year in with Duolingo, I felt like I knew a lot of words but speaking was still tough. I would “freeze up” whenever I had to say a sentence spontaneously. After all, you can’t hide from the fact that in order to speak the language you have to practice speaking it. It sounds so obvious but the mind has its ways of hiding that truth from us. Besides, for the most of us it feels so intimidating to approach a Spanish speaking stranger when you have absolutely zero confidence in your speaking skills. So you try to avoid for as long as possible. But the truth is, if you want to speak it, you have to actually speak it. That was when I decided to start looking for Spanish speakers.

Internet can solve many ills and that includes finding the language partners. Italki is by far the leader in language learner community. It is a site where you can find tutors as well as other people learning languages and connect with them via Skype sessions. I have had 5 tutoring sessions so far. Two of them awesome, one so-so, and two absolutely terrible. My first time around I think I had the best session ever. To my surprise I could explain to the tutor where I lived, what I was doing, what was my family doing, etc all in Spanish and without much trouble! I had never done that before so I was feeling ecstatic. But then once the initial excitement worn off, it was getting difficult to get any good use out of the tutoring sessions. I am not sure what was I missing, but I felt like I wasn’t learning much and then eventually started to dread the sessions. Currently I am taking a break from them and see if I need to try something different.

I also tried connecting with just regular Spanish speaking people that were learning English. The results again were mixed. You get to talk to people and practice language skills while learning about the culture of others, which is wonderful. However there are also some issues with the approach. First, I think it is much harder for beginners to talk to strangers who are so much more advanced than you in their native tongue and also speak great English. They end up dominating the conversation and have no patience for your slow pace. Second, most of the people I ran into were young students that loved talking about music and movies at the level that does not interest me at all. So basically finding a common interest was tough. After about five sessions I stopped as I was getting bored and learning very little.

So what am I doing now? To keep the vocabulary fresh, I am still doing duolingo. Also just started a course on memrise. I need to solve the issue of finding the native speakers or finding the reasons to talk in Spanish. Perhaps volunteer for some organization that will bring me closer to the natives where language learning is not a goal but a way to communicate to accomplish an organizational goal. Let’s see where I end up with this. Safe to say I am not giving up and will continue to move forward.

Eso es todo por ahora, hasta luego!

Fitness update

Barbell lifts has found another fan. I was a complete novice with barbells when I started out so enlisted the help of Starting Strength book. If you are not sure what Starting Strength is, you can read all about it on their site. It is a way of exercising using full body exercises that mostly involve barbells. Even though I was not following a strict Starting Strength program, I still managed to achieve results that I am very happy with:

  • Deadlift increased from 135 to 315 lbs
  • Squat increased from 135 to 265 lbs
  • Bench press increased from 125 to 185 lbs

Keep in mind that this was achieved during the 6 months by an unsupervised novice that guesses as he goes. Who knows how much stronger one could get with a more experienced supervision, and following Starting Strength to a letter.

First time doing 275 pound dead lift, it felt great.
First time doing 275 pound dead lift, it felt great.

For a 170 pound male I was very weak when I started out. Less than my body weight lifts across all three main barbell exercises. How can someone who stays active and exercises pretty regularly be this weak? Well one reason is that I never got myself a personal trainer and guessed a lot. Its a foolish approach but I am just being honest. I made my own routines and tried to copy what I saw others do. Two years ago was the first time I realized that I must be doing something wrong. I was working the machines yet I wasn’t getting that much stronger. I stayed somewhat fit but yet my exercising habits fluctuated. Something had to change.

The first change I did was switch from machines to dumbbell exercises. I saw some advances in the overall fitness and body tone. But again it did not feel right. I wasn’t fully enjoying the exercises and I felt like I was stuck on the same weight levels for too long. Why wasn’t I getting any stronger? In general there could be several reasons why one does not get any stronger while exercising. Sleep and eating habits are two big factors. But if you are getting enough sleep and eating right, then that leaves the exercise routines and the approach as the culprits.

One day while browsing the net for advice I stumbled on this article and it changed everything. Every fad and misconception that the author mentions on his journey to mastering strength and fitness I felt like I had encountered. Reading the article was one of those clarity moments where you realize how little you know and how much you have to learn. Basically, just like the author, I associated the idea of spending a lot of time in a gym and doing “cool” exercises as a way for getting stronger. But it turns out that is just a bunch of BS. The simpler the better and instead of doing fancy stuff, go back to basics.

The article inspired me to drop what I was doing and change things up. After a bit of online research Starting Strength stood out with the number of people liking the program and recommending it to their peers. I got the book and settled on the three barbell exercises. It has been a blast since. The body feels great and I finally feel strong. The feeling of tearing 300 pounds off the ground multiple times is amazing. All of that achieved while exercising only 3 times per week and no longer than 40 minutes each time. Just incredible.

In the 6 months I have achieved more progress in my overall fitness level than I have during my whole exercising history prior to the change. The next steps from here are to continue with the barbell exercises but start adhering to Starting Strength programming more strictly. I didn’t do that from the beginning because I wanted to start and not delay taking action while trying to get it perfect. Also, not sure if I want increase the dead lifts anymore since I am quite happy with where I am now.

Big thanks to Daniel Duane for writing that article and especially Mark Rippetoe for sharing his knowledge with the rest of the world. Your work has helped many to experience the strength they thought they could never have. Keep on rocking!

Looking for perfection

Just ran across an article that had a golden quote in it and I had to share it:

Happiness does not come from a job. It comes from knowing what you truly value, and behaving in a way that’s consistent with those beliefs.

If you showed me this quote as recently as a year ago, it probably would not have meant much. It all changed after reading The Confidence Gap. One of the exercises in the book asks to define a list of values before focusing on any specific goals. The approach felt so strange to me. Values had always seemed so vague and abstract and, quite honestly, useless. Now I realize I used to think of values in vacuum. You need to combine values and goals. A value without action is just a dream. A goal without a value is a temporary relief, a distraction. You will achieve your goal and seek for conclusion but there really is no end. However if you live with in your value system, as long as you take actions that fit the system you will feel satisfied. For if you succeed, you did something that makes you happy, that is important to you. And if you fail, you still worked on something that was important to you. And since it is truly important to you, you will adjust and start again.

It is worth reading the whole article. It has some great advice. It basically boils down to taking a personal responsibility for things that you lack in your life. If your job sucks, it is not your job’s fault, it is actually your fault. Find a way to change what “sucks” about it or change the job altogether. We tend to dream and create “ideal” scenarios in our minds that don’t actually exist. Get real, get out there, and take action.